Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 3,544 total)

  • RE: Where clause of an "instead of" trigger

    In a delete trigger you have a 'deleted' table containing the rows to be/have been deleted so you can use this to update ie

    UPDATE c

    SET c.IsEnabled=0

    FROM dbo.COUNTRY c...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: TSQL Logic help needed-- Nested IF

    ChrisM@home (4/21/2011)


    Evolution in practice - don't you just love it 😀

    It is darn near impossible to improve on Jeff's solutions, so must make the most of it while I can...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: TSQL Logic help needed-- Nested IF

    Jeff Moden (4/20/2011)


    If we don't know the length, then we can force the max length for positive BIGINTs and simply remove all spaces afterwards.

    Also if you append the separator to...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Converting row data into colum data

    You will need to sequence the data in a temp table and then pivot

    CREATE TABLE #A (RowID int IDENTITY(1,1),ColNum int,[item number] varchar(20), [product batch] int, [price] decimal(9,2))

    INSERT #A (ColNum...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How replace

    I suspect it is your collation set to 2000 default LATIN1_General_CI_AS

    Try changing the collation during the check, ie

    IF @c COLLATE SQL_Latin1_General_CP1_CI_AS LIKE '[0-9A-Z ]' COLLATE SQL_Latin1_General_CP1_CI_AS

    Note that I changed...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Converting row data into colum data

    Is there a fixed maximum for x ?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Dave Ballantyne (4/12/2011)


    David Burrows (4/7/2011)


    Dave Ballantyne (4/6/2011)


    Any other threadzian going to be at sqlbits ?

    Yarp, Saturday.

    Good to meet you on saturday, it was a fun weekend 🙂

    And you too...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (4/12/2011)


    you cannot, and will not, win that argument. Best to let it go.

    Non Illegitimi Carborundum 😀

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: PatIndex

    UMG Developer (4/11/2011)


    thamatrix1436 (4/11/2011)


    Very odd. Got an error trying to do the conversion...

    Conversion failed when converting date and/or time from character string.

    And thats w/ and w/o the PatIndex in the...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stock Aging Query

    Thanks Flexdog for helping 🙂

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Row to Colums - please help a Newbie

    How many rows per employee?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Iterating trough a recordset, with a unknown nr. columns / and a identifier that is non sequential (1,2,3,4..)

    Change @inputQuery to output only first column and insert into temp table with single column

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Length

    :hehe::-D:crazy::blink::crying::-P

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Output Clause and Identity_Insert

    gregory.anderson (4/7/2011)


    Edit: After re-reading your reply, do I just need to specify the columns that I'm inserting into the archive table then? I'll try that.

    Yes.

    Change

    Into Archive..CorrespondenceReference

    To

    Into...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Add single code using macro in excel

    Lowell (4/7/2011)


    Is there a question in here somewhere? are you trying to do the same in TSQL? this looks like it is concatenating 60 cells into a comma delimited striung.

    How...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 1,111 through 1,125 (of 3,544 total)