Forum Replies Created

Viewing 15 posts - 811 through 825 (of 1,473 total)

  • RE: Excluding invalid dates from query

    #1CoolGuy (1/15/2009)


    Thanks Seth for taking the time to help me out.

    I was using Dynamic SQL because the tablename is built is built dynamically based on an input parameter. Sometimes...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: concatenating column values in select when there is a null column

    dmc (1/15/2009)


    True... it is slightly (very slightly) faster. And in billions of rows it could make a difference. But is it wroth compliance of standards and advantages of...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: SHAPE command coming up with error - HELP!!

    SHAPE and APPEND are not valid T-SQL key words. Here's an article on how to use them:

    http://support.microsoft.com/kb/189657

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Excluding invalid dates from query

    If you use SELECT INTO with a temp table in dynamic sql, it won't be available to the proc that called it. Dynamic SQL launches in its own connection...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Transaction Handling

    Transactions are definitely used in SQL 2000. I personally don't have much need for transactions so I don't have a ton of experience working them, but I'd assume you'd...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: SP_ExecuteSQL incorrect syntax

    You shouldn't need the begin and end either or the line feeds either.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: SP_ExecuteSQL incorrect syntax

    Try removing the your char(39)'s.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Tricky T-SQL

    No problem Morris, glad we could help.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: cross tab

    If the amounts sold were directly related to the amounts bought, this would be a good report. If your payroll does the same with hours worked and amount paid,...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Tricky T-SQL

    These are kinda a pain to do in SQL 2000. With SQL 2005, they're cake. Here's one way of doing it in 2000. Please notice the way...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: cross tab

    First of all, a disclaimer:

    The report you asked for is something that is likely best handled in the front end. This really is not a cross tab report (at...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Calculating age

    DECLARE @DOB datetime

    SET @DOB = '1/20/1980'

    SELECT CASE

    WHEN DATEPART(DY,GETDATE()) >= DATEPART(DY,@DOB)

    THEN DATEDIFF(YY,@DOB,GETDATE())

    ELSE DATEDIFF(YY,@DOB,GETDATE())-1

    END

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Adding running number on groups of records in a table

    Had to add to it, a small reward for not allowing myself to respond the other day when I first that post :hehe:.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: highest unused ID

    I agree wholeheartedly Jeff. I mean, it's not like we're here to help educate people or want them to actually learn anything. I for one prefer to answer...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Return Average build cost based on last 5 Orders

    Philip Horan (1/8/2009)


    The original query was amended to add an INNER JOIN to table Products, this can be commented out (but know need to tell you guys that!).

    While many...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 15 posts - 811 through 825 (of 1,473 total)