Forum Replies Created

Viewing 15 posts - 691 through 705 (of 1,228 total)

  • RE: Update Script to select

    rodneykee (1/2/2012)


    Terry,

    This is what I would've done:

    update ipadmin.GL_TXN set defunct = 'Y'

    from ipadmin.gl_txn

    where transacted_on >= convert(datetime, '03/07/2008', 103)

    and transacted_on < convert(datetime, '03/07/2008', 103) + 1

    and belongs_to_hcare...

  • RE: query involving multiple table hierarchy

    Suhanats - I'd recommend you start again from scratch with this query. With all the unnecessary nesting it's almost impossible to figure out what it's doing - and what it's...

  • RE: Can anyone exaplin me this insert statement

    Dev (1/2/2012)


    ChrisM@home (1/2/2012)


    Seems ok so far:

    ...

    What does this return?

    select dbo.GetGlobalUniqueEntityIdentifier('Fireball.dbo.Bond', CONVERT(INT, '0')),

    Ooops. I missed by few minutes. 😀

    Haha! Thinking along the same lines 😎

  • RE: Can anyone exaplin me this insert statement

    Seems ok so far:

    DECLARE @NativeUniqueIdentifier VARCHAR(500) = '0'

    DECLARE @PersistenceSourceId UNIQUEIDENTIFIER = '5C72E9D7-90CB-462C-8D6F-F8AF4163A416'

    DECLARE @EntityType UNIQUEIDENTIFIER = '2026ADB1-83FA-484A-AC95-2136AD94E638'

    DECLARE @ReturnValue VARBINARY(20)

    SELECT @ReturnValue = HASHBYTES(

    'SHA1',

    CAST(@PersistenceSourceId AS VARBINARY) +

    CAST(@EntityType AS VARBINARY) +...

  • RE: Can anyone exaplin me this insert statement

    What does this return?

    select dbo.GetConfigurationValue_GUID('Fireball', 'Fireball Persistence Source')

  • RE: Can anyone exaplin me this insert statement

    ashuthinks (1/2/2012)


    varbinary value yes... but i'm getting null value i dont know why 🙁

    What value are you using for @SourceID?

    What do you get when you run this query?

    SELECT

    Class.EntityType

    FROM

    dbo.MultiSourceTableClassMap TableClass

    INNER JOIN

    Fireball_MetaData.dbo.Class...

  • RE: Loop through data to find consecutive results prior to a certain date within a 6 month period

    gpm.alwyn (1/2/2012)


    Please check this Query,

    ...

    Msg 207, Level 16, State 1, Line 17

    Invalid column name 'ReceiverID'.

  • RE: "Null value is eliminated by an aggregate" Error without aggregates

    Brandie Tarvin (1/1/2012)


    ...Is this a bug in 2005 that I just haven't seen before?

    Hi Brandie, Lutz is spot on; the warning indicates how DISTINCT is processed.

    Paul White has a...

  • RE: update 1 col with values of col2 and 3

    Welsh Corgi (1/1/2012)


    ChrisM@home (1/1/2012)


    stebennettsjb (1/1/2012)


    ohh sorry i was using your examples!

    read the links when you replied.. Sorry for not adding them before :unsure:

    Use single quotes ste (Steve?) - double...

  • RE: update 1 col with values of col2 and 3

    stebennettsjb (1/1/2012)


    Hi Chris,

    Thats got it working! thank you,

    Welsh Corgi sorry for not explaining myself very well, I shall follow your links guide from now on.. Your free to breath...

  • RE: update 1 col with values of col2 and 3

    stebennettsjb (1/1/2012)


    Msg 207, Level 16, State 1, Line 2

    Invalid column name ' ,'.

    Use single quotes ste (Steve?) - double quotes indicate an object such as a column.

    Like this:

    SET col3...

  • RE: update 1 col with values of col2 and 3

    UPDATE Mytable SET col3 = col1 + " ," + col2

    If col1 or col2 are a numeric datatype, I'd explicitly cast.

    If either col1 or col2 are nullable, then...

  • RE: Are the posted questions getting worse?

    LutzM (12/31/2011)


    Wishing you a Very Happy

    and

    Prosperous New Year!!! 🙂

    +1

    All the best for 2012, Threadizens.

  • RE: CTE Performance Compared to a Temp Table

    TheSQLGuru (12/30/2011)


    patrickmcginnis59 (12/30/2011)


    TheSQLGuru (12/30/2011)


    I would try dropping off the PK from the table variable (note you do NOT have a temporary table here - it is a table var with...

  • RE: CTE Performance Compared to a Temp Table

    CTE's work kinda like a view-on-the-fly and SQL Server sometimes balks at the complexity of the resolved query. Chained CTE's are particularly bad, and also those containing UNION as opposed...

Viewing 15 posts - 691 through 705 (of 1,228 total)