Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,473 total)

  • RE: what is "!="

    Means the same as or NOT type_cd = 'D'. "Not Equal".

    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: what is "!="

    Oops. Meant to edit, not re-submit. See below.

    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: Just pull back the MAX Date

    Ryan Keast (9/4/2009)


    Sorry for the late reply on this.

    When I run that last query I get the following errors -

    Server: Msg 170, Level 15, State 1, Line 33

    Line 33:...

    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: What are best links for Learner SQL Developers?

    I've found this to be more helpful than most of the books I've read:

    http://www.sqlservercentral.com/Forums/Forum338-1.aspx 😉

    Also, following people's blogs, reading the articles on this site, etc.

    It's all 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: Remove leading zeros and add spaces at the end

    Jeff Moden (3/27/2008)


    For example...

    DECLARE @Sku NVARCHAR(500)

    SET @Sku = '000000000000000000000000000000000000000000000000000000012335670000'

    SELECT @Sku AS Original,

    SUBSTRING(@Sku,PATINDEX('%[^0]%',@Sku),DATALENGTH(@Sku)) AS NoLeadingZeros

    Heh... no, you're right, Matt. I was just anticipating the next possible question (I should...

    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: Need OUTER JOIN with INNER JOIN (3 tables)

    drew.allen (9/1/2009)


    You DO NOT want to do a CROSS JOIN here. The problem with your original query is that a LEFT outer join will return all records from the...

    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: Transpose Rows to Columns according to ID

    Do you know ahead of time how many columns you need for this project, or does it vary depending on how many different are in the table?

    This is what is...

    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: Transpose ROWS to COL

    Duplicate Post. Please direct all replies to this thread.

    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: How to extract numberic value

    ramadesai108 (8/31/2009)


    Hi Garadin,

    That worked. Thank you for your time. You saved my life.

    Glad to help. It's not every day I get to save a life!...

    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: Add text to query results

    You're very close, just switch it around slightly to only add the sections when it's not null, like the following:

    SELECT

    IMSV7.TBL308.DESCRIPT, IMSV7.PARCEL.SECTION, IMSV7.PARCEL.BLOCK,

    IMSV7.TBL308.DESCRIPT + ISNULL(' SUB ' + IMSV7.PARCEL.SECTION, '') +...

    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: Help with JOIN?

    The records are likely passing through your join and then being filtered by your WHERE. If the records don't exist, they can't have KUNNR < '0000900000'.

    Try moving the WHERE...

    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: print out an output of cases are pending over 14 days

    I already flagged this mass duping for cleanup since there are 6 of them, so here's what Lynn posted on the other thread (So it can be deleted).

    Lynn Pettis


    First, I...

    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: How to extract numberic value

    This should work.

    DECLARE @TestSeq VARCHAR(20)

    SET @TestSeq = 'A2000'

    SELECT RIGHT(@TestSeq, PATINDEX('%[^0-9]%',REVERSE(@TestSeq))-1)

    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: Pattern matching in TSql

    Pakki,

    You can do something like this:

    DECLARE @TestSeq VARCHAR(20)

    SET @TestSeq = '123-4567-89.123'

    SELECT CASE WHEN @TestSeq LIKE '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9].[0-9][0-9][0-9]'

    THEN 'Passed'

    ELSE 'Failed'

    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: SQL Server not evaluating WHERE before Casting?

    You can't rely on a where clause to stop these types of errors. This will happen quite commonly. Where's are not necessarily evaluated before the select, the only...

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