Forum Replies Created

Viewing 15 posts - 1,426 through 1,440 (of 1,473 total)

  • RE: escape characters in query

    Garadin's post points out why I like to put the Carriage Return/Line Feed into a variable constant rather than repeating it over and over. His last one is incorrect.

    Good call....

    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: Extracting a portion of string from a field

    Take a look at this, courtesy of Jeff Moden:

    http://www.sqlservercentral.com/articles/TSQL/62867/

    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: Changing sql keywords to lower or upper

    Why would you do something like this?

    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: Newbie: SQL Query containing logic

    I see that the editor removed XML tags from my post and that is why you dont get the correct results.

    Heh, good, I kept trying it and didn't get...

    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: select within select

    The word "Table" is a keyword. Try using something like MyTable instead.

    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: Newbie: SQL Query containing logic

    Can you guarantee that all error codes are exactly 3 digits in length?

    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: Newbie: SQL Query containing logic

    For the future, when someone asks for table structure / data, please post it like this:

    [font="Courier New"]CREATE TABLE Table1(

    fname VARCHAR(50),

    lname VARCHAR(50),

    error_code VARCHAR(100))

    CREATE TABLE Table2(

    err_cd VARCHAR(50),

    err_msg VARCHAR(100))

    INSERT INTO Table1(fname, lname, error_code)

    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: Newbie: SQL Query containing logic

    My edit went through after your post. Please also provide sample data as so. Make sure you include data that will demonstrate the double entry issue.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Finding Table is empty or not without using count() function

    Beautiful, thank you sir.

    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: Using LIKE with variables in a SP

    That depends on what you'd like to happen in the case that they don't supply either value.

    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: escape characters in query

    [font="Courier New"]

    SET @body =

    'The system has detected the following event: ' + CHAR(10) + CHAR(13) +

    'SQL Alert Notification: No Activity ' + CHAR(10) + CHAR(13) +

    'Date time:' + CAST(@TimeStamp AS...

    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: Newbie: SQL Query containing logic

    Please post your table layouts for us to give you an example query. What you are looking for is just going to be a very simple join, but without...

    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: Finding Table is empty or not without using count() function

    Off Topic:

    Chris, how are you getting your SQL code color coded rather than all Black and White?

    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: ASP Date and Time to SQL Datetime

    Indeed it does. I was using the _ to ensure that nothing wacky happened with the Querystring, but SQL handles the %20 just fine. Thanks Jack.

    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 ""

    Write an Update statement with REPLACE(column,'"','') for each column.

    That replace is: REPLACE ( column, ' " ', ' ') 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]

Viewing 15 posts - 1,426 through 1,440 (of 1,473 total)