Forum Replies Created

Viewing 15 posts - 946 through 960 (of 1,228 total)

  • RE: Using ROW_NUMBER() function with partition by clause

    Ringo-394296 (4/18/2011)


    Thank you for the for the tip, I did look briefly at these functions but they seem to continue the number series across each window ... is it possible...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    Phineas Gage (4/18/2011)


    ChrisM@home (4/18/2011)


    Plan B, using Lowell's code:

    declare @Last7Days CHAR(8)

    SELECT @Last7Days = CAST(YEAR(CURRENT_TIMESTAMP - 7) * 10000 + MONTH(CURRENT_TIMESTAMP - 7) * 100 + DAY(CURRENT_TIMESTAMP - 7) AS CHAR(8))

    SELECT...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Performance on very large database - Help

    Is there any advantage in includeing all of the columns in that index? Have you tried the same index with no included columns?


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    Plan B, using Lowell's code:

    declare @Last7Days CHAR(8)

    SELECT @Last7Days = CAST(YEAR(CURRENT_TIMESTAMP - 7) * 10000 + MONTH(CURRENT_TIMESTAMP - 7) * 100 + DAY(CURRENT_TIMESTAMP - 7) AS CHAR(8))

    SELECT ...

    WHERE table-name-removed >=...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    Double check the datatype of that INT date column. I reckon it's a text type, not an INT.

    @ninja - good spot, mate - you saw this coming 🙂


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    Try it with the quotes.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Using ROW_NUMBER() function with partition by clause

    You're nearly there...check out RANK() and DENSE_RANK().


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    Phineas Gage (4/18/2011)


    ChrisM@home (4/18/2011)


    How long does it take to run this:

    WHERE table-name-removed >= '20110411'

    1 second...see comments above

    Did you include the single quotes around the number?


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Date as INT - having trouble with comparison :(

    How long does it take to run this:

    WHERE table-name-removed >= '20110411'


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Decimal with Leading Zero

    Ryan Keast (4/18/2011)


    Morning,

    I am importing the following example of data into a SQL 2000 database -

    01|171|Fri|A0277730|.03|1|.0333|JOBS|03/12/10||

    01|171|Fri|A0277742|.03|2|.0333|JOBS|03/12/10||

    01|193|Mon|A0277843|1.45|1|1.4499|JOBS|06/12/10||

    01|193|Mon|A0278032|.03|2|.0333|JOBS|06/12/10||

    01|193|Mon|A0278054|.23|3|.2333|JOBS|06/12/10||

    01|193|Mon|A0278256|1.48|4|1.4833|JOBS|06/12/10||

    When imported the data is being held as .03 and .23 as examples.

    How...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: openquery - stored procedure

    Jeff Moden (4/18/2011)


    ChrisM@home (4/18/2011)


    nikplic (4/17/2011)


    Because, i want to have one code with whom i want to call datasources for my forms. I use FoxPro9 and SQL SErver 2008, and code...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: openquery - stored procedure

    nikplic (4/17/2011)


    Because, i want to have one code with whom i want to call datasources for my forms. I use FoxPro9 and SQL SErver 2008, and code is that write...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Delete with in case statement

    sunnymalhotra (4/18/2011)


    OK, This is what I have implemented.

    If exists (select idbatch from jbjob inner join insts_temp on insts_temp.inst = jbjob.idInst and insts_temp.BusDate = jbjob.BusinessDate and jbjob.idbatch=40)

    Begin

    ...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Delete with in case statement

    Hi Sunny

    Posting your solution may help others with a similar problem - also, it would allow the community to verify your solution and if necessary make further recommendations.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Looking for a MSSQL DBA/Developer job in San Francisco/Bay Area

    carlos 5652 (4/15/2011)


    Are you still in the job market?

    With those credentials my friend he will have been snapped up in 21 minutes, not months 😀


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

Viewing 15 posts - 946 through 960 (of 1,228 total)