Forum Replies Created

Viewing 15 posts - 436 through 450 (of 1,473 total)

  • RE: Date and Time Selection Query

    The complexity required for these statements is a pretty good example of why you should just leave time as a datetime field.

    That said, you can use something like this:

    select *...

    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: Relational update

    That's an interesting update. I'd make sure that this was right, but here is how you'd write that:

    UPDATE P

    SET OrderNo = S.OrderNo

    FROM Payment P

    ...

    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: Distinct one column

    Add it right after all the joins in the CTE.

    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: Remove a Blank Space

    REPLACE(String,' ','')

    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: Cursor, Cursor, Cursor - Need help

    Cross post. No more replies here please. Reply here instead:

    http://www.sqlservercentral.com/Forums/Topic810794-8-1.aspx

    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: Cursor Cursor Cursor - need help

    Any help will be greatly appreciated on this. Also posting this in teh SQL2005 forum to see if any advice from them.

    A couple things.

    First, don't cross post.

    Second,...

    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: Query

    Jus (10/29/2009)


    Garadin..This was plain self join i know....Some time back i have seen a solution to simillar kind of problem in SSC in a different form, i guess they were...

    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: Little help on some syntax

    I'm sorry, was there a question in there somewhere?

    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: Like pattern

    dmoldovan (10/29/2009)


    Seth, I did not (yet) mention PATINDEX. I'd better include the link:

    http://msdn.microsoft.com/en-us/library/ms187489(SQL.90).aspx

    than just mention the topic title...sorry...

    Heh, no, it was my fault. It's how I was considering doing...

    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: Query

    What have you tried so far?

    Look up ROW_NUMBER in BOL and have a look. The idea would be to number all the rows then join the table...

    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: Pivoting multiple record values in one column into separate columns

    If you already have a list of all the languages, a simple crosstab (or pivot, whichever is easier for you) should solve it unless I'm misreading something here. Jeff...

    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: Like pattern

    dmoldovan (10/29/2009)


    I'm still not sure what result do you want to obtain...howhver try to use '[C-F]' / [CDEF] instead of 'C, D, E, F'.

    See also BOL ---> "Pattern Matching in...

    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: getdate() convert function

    lmu92 (10/28/2009)


    Garadin (10/28/2009)


    I do seem to remember that there are slightly different variants of both of these methods that are supposed to overcome very specific problems though (using a higher...

    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: Tables and Stored Procedures

    Err oops, forgot you specified you were using a stored procedure. Yes, they're dropped implicitly when the SP ends.

    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: Tables and Stored Procedures

    That's not going to work out too well. There are a lot of options for doing something like this, but this one isn't going to support concurrency at all....

    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 - 436 through 450 (of 1,473 total)