Forum Replies Created

Viewing 15 posts - 7,441 through 7,455 (of 10,144 total)

  • RE: Please help with a query

    -- generate a row for every unit bought / sold.

    -- I guess this could be adapted to use the least common denominator

    -- Another possibility is to use an iTVF (inline...

  • RE: Today's Random Word!

    dbowlin (9/8/2010)


    This really got me thinking. Instead of the beep/sound that windows makes when you make a mistake or do something fairly rediculuous. It should insult you....

  • RE: how to generate primary key in order if it is in disorder

    seshireddy524 (9/8/2010)


    hi i am generating primary key with identity 10 and i am incrementing by 10.Unfortunatly the order takes place like 10,50,60.so now i want to place them in order...

  • RE: How to collapse a recursive query

    Please adjust either the third query or the sample data so that the third query returns a row:-

    IF OBJECT_ID( 'tempdb..#Sample') IS NOT NULL DROP TABLE #Sample

    CREATE TABLE #Sample (RowID INT,...

  • RE: multipart identifier error message

    bhutchin (9/1/2010)


    I am using sql 2008. This query is designed to get all patients that were readmitted within 30 days of their previous hospital discharge...

    Your "key" filter is to include...

  • RE: Selecting differences between datasets

    richard.kirby (9/7/2010)


    Thanks Chris - looks a lot neater - the only problem I have is that the innermost select fails as the AppointmentDate field where I'm setting some date parameters...

  • RE: substract value from a union query

    sharonmtowler (9/7/2010)


    when the sp was created, distinct was neccessary. table has been cleaned up since.

    i use all the fields in the report,

    replication date is a date field when...

  • RE: Today's Random Word!

    Lynn Pettis (9/7/2010)


    Wanted, one word term for lazy and obnoxious OP.

    Received a PM from a newbie (noobie, no posts as of yet) asking for help. Told him to post...

  • RE: Today's Random Word!

    CirquedeSQLeil (9/7/2010)


    crookj (9/7/2010)


    dbowlin (9/7/2010)


    As the Uniblab would say.

    "Work, Work. Everybody, back to work. Work. Work."

    And just out of curiosity, what would the teleprompter say? :ermm:

    Joe

    Sleep sleep. Everybody...

  • RE: substract value from a union query

    -- do your date arithmetic up front

    DECLARE @StartToday DATETIME

    SET @StartToday = DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)

    SELECT @StartToday

    -- no more DISTINCT: which row would you pick from the dupes?

    -- If...

  • RE: substract value from a union query

    Hi Sharon

    I think this query can be simplified quite a bit. First though, a couple of questions. Is the DISTINCT necessary, and if so why?

    What datatype is the column REPLICATION_DATE?

    What...

  • RE: How to append a multiple rows value into single.

    Here's a nice APPLY version:

    SELECT d.EmployeeName,

    d.Id,

    TicketNumbers = STUFF(iTVF.TicketNumbers, 1, 1, SPACE(0))

    FROM @Tab d

    CROSS APPLY

    (SELECT ',' + CAST(HelpdeskTicketNo AS VARCHAR)

    FROM @Tab

    WHERE id = d.id...

  • RE: Strange--About SELECT @s=@s+name FROM ***

    Madhivanan-208264 (9/7/2010)


    Note that @s1 is declared as varchar(10) whereas @s2 as varchar(20). Use varchar(20) for @s1 and see the result. It gives the correct result

    It's not as simple as changing...

  • RE: arithmetic overflow error

    ekknaveen (9/7/2010)


    aa

    Yeah I know and it's not even wednesday yet.

  • RE: I want to get employee name who is drawing the highest sal in each dept

    You will get much quicker answers if you post table creation / data insertion scripts as follows:

    CREATE TABLE #tblImage (

    ImageID int IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,

    [Image] image NOT NULL,

    [FileName]...

Viewing 15 posts - 7,441 through 7,455 (of 10,144 total)