Forum Replies Created

Viewing 15 posts - 1,321 through 1,335 (of 5,504 total)

  • RE: Would you change to a better job for a lot less money?

    Dont let the fact that your current job is boring overrule any other criteria you would otherwise use when evaluating a new opprtunity:

    Is the new job closer to your home?

    Any...

  • RE: error : subquery returned more than 1 value

    The error message usually include a line number to point you in the right direction.

    It can be any of the three updates using a subquery.

    The TOP 1 ORDER BY will...

  • RE: Update Column WHEN table1.field_name = table2.field_name WITH table2.field_name_2

    What are you trying to do?

    It seems like you're looking for a join. Maybe something like this?

    --UPDATE dbo.MasterStage

    --SET Client =

    ...

  • RE: Too much code for this T-SQL

    aaron.reese (7/6/2011)


    unfortunately, the people who wrote the NHS datasets are morons....

    The data gets extracted like this from the source systems in flat file format and loaded to the DW like...

  • RE: loops

    kritikamehtani (7/6/2011)


    logic :---

    SELECT @message = queue_message FROM tablename

    WHERE PK= @pk

    IF (@PK is not null and...

  • RE: Transactions In Stored Procedure

    duplicate post. no replies please.

    Discussion already started here

  • RE: loops

    jasonwi1202 (7/5/2011)


    If you do find yourself stuck in a situation where you need to cycle through every record in a table, here is a good example of how to code...

  • RE: Pivot Table Help

    Please have a look at the CrossTab article referenced in my signature for a different way to do it.

    If you need additional help, please post table def and sample data...

  • RE: Another Query help

    I second Johns alternatives and would prefer option 2.

    To be a little more specific regarding the splitter function: search for DelimitedSplit8K.

    The basic concept: shred the comma delimited list into a...

  • RE: Using SET DATEFIRST 1 (Monday as day 1 )

    pwalter83 (7/4/2011)


    ...

    Thanks, Lutz, I tried but could not work out how to use a calendar date and then storing the same. Do you know if there's another way to do...

  • RE: Interesting datepart results

    Just check the definitions (straight from BOL):

    ISO_WEEK datepart : ...Each week is associated with the year in which Thursday occurs. ...

    and for DATEPART(week):

    ...When datepart is week (wk, ww) or weekday...

  • RE: Different Query Requirement

    Here's a slightly different approach:

    select

    col1,

    col2,

    stuff(

    (select ',' + col3

    from @data d2

    where d2.col1=d1.col1 and d2.col2=d1.col2 and d2.col4=d1.col4

    order by col3

    for xml path('')

    ),1,1,'') col3,

    col4

    from...

  • RE: Transaction Log

    May I kindly ask to stop the discussion at that point?

    I don't see any new (question related) information added since several posts.

    Let's just agree to disagree and move on.

  • RE: PLz help to fix the error

    Are you aware the year 2009 did not have a February 29th?

  • RE: PLz help to fix the error

    It seems like you're trying to compare a varchar and a datetime data type.

    Since the datetime data type has a higher precedence than varchar, the varchar value needs to be...

Viewing 15 posts - 1,321 through 1,335 (of 5,504 total)