Forum Replies Created

Viewing 15 posts - 496 through 510 (of 594 total)

  • RE: Correct CASE

    Good gracious, I don't think I've ever seen the word coalesce spelled incorrectly by so many people so many times...

  • RE: Correct CASE

    Try:

    
    
    SELECT
    CASE
    WHEN dbo.PostedTable.MReading IS NULL THEN
    )
    SELECT dbo.TransactionTable.MReading
    FROM dbo.TransactionTable
    WHERE dbo.PostedTable.MGUID = dbo.TransactionTable.MGUID
    )
    ELSE...
  • RE: Retrieve SQL Error Description IN SQL

    Best advice is to handle errors in client program, however, if you really want to know the description within the stored procedure, you can do something like:

    DECLARE @ins_error INT, @err_desc...

  • RE: Dynamic WHERE clause problems

    You're welcome. Sometimes you just have to fall back on an efficient, but ugly, solution... 🙂 Hope everything works out...

  • RE: Dynamic WHERE clause problems

    Definitely, this is not Access JET SQL. That is a significantly different variation from T-SQL. Unfortunately, I don't have the expertise to comment on how stored procedure groups...

  • RE: Need to replace a string in a string with a string

    DECLARE @CompanyName VARCHAR(xxx)

    SET @CompanyName = 'Name of Company'

    UPDATE MyTable

    SET MyField = REPLACE(MyField, '<companyname>', @CompanyName)

    WHERE [Criteria go here]

  • RE: Dynamic WHERE clause problems

    quote:


    ...occurance of the semicolon in your naming convention. Does that have signifigance, or is it just convenient?...


    February 25, 2003 at 9:34 am

    #449702

  • RE: Dynamic WHERE clause problems

    OK, I'm going to chime in once more...

    Actually, I think end-user's code does generate the temp table correctly (see previous post), and I'm not sure technically why end-user's code is...

  • RE: Adding a Column to a Table

    ALTER TABLE TableName

    ADD COLUMN column_name...

    It will add the column to the end of the field list...

  • RE: MySQL SET column defintion

    Not quite sure what you mean...Is the data denormalized, meaning that a single column is storing multiple values for a single piece of data?

    Also, you can ask the...

  • RE: MySQL SET column defintion

    In the conversion of a SET column, simply do a SELECT Setfield+0 to get the actual lookup value (INT) returned.

  • RE: cursor not changing lines...

    quote:


    problem solved.


    I actually looked all over MSDN for a clue into this problem...couldn't find ANYTHING,...

  • RE: cursor not changing lines...

    How are you declaring the cursor and initializing it? Could you post the DECLARE cursor_name CURSOR FOR statement?

  • RE: removing control characters from text field

    An easier way would be:

    UPDATE Table

    SET TextField = REPLACE(REPLACE(CONVERT(VARCHAR(8000), TextField), CHAR(13), ''), CHAR(10), '')

    Not sure if you'd have to use Greg's code for fields where LEN(TextField) > 8000. Greg,...

  • RE: how to populate a variable with a query result

    To get the MachineIDs into a variable, do a SELECT INTO a #temp table before doing the update.

    As for the GETDATE() part of your question, ensure that you strip the...

Viewing 15 posts - 496 through 510 (of 594 total)