Forum Replies Created

Viewing 15 posts - 4,246 through 4,260 (of 5,504 total)

  • RE: How can we extract the complete list of users for a database and whether they are active or not

    Would query sys.sysusers (2K5+) give you the answer you're looking for?

  • RE: DBCC Timewarp

    Alvin Ramard (2/16/2010)


    RBarryYoung (2/16/2010)


    Steve Cullen (2/16/2010)


    It's just a jump to the left. And then a step to the right. 😛

    Put your hands on your hips?

    Yes.

    Raise your right foot. .......

  • RE: Temporal Query Problem

    Ok, now we have 214 SELECT statements. I'm guessing we could wrap those into a statement like

    Select * into claim_statuses from (...)a

    We still don't have definition and sample data...

  • RE: If Else Statment Syntax Error

    Did you actually try to figure out what the error message is telling you?

    If you can't find anything wrong after the if statement in line 10 the reason might be...

  • RE: can't print the value of a local variable

    Lynn Pettis (2/16/2010)


    Easy, the cause is the following lines:

    SET @Jun30Date = CAST('06/30/' + cast(year(@Report_From) as varchar(4)) as datetime)

    ...

  • RE: can't print the value of a local variable

    There is no value assigned to variable @CPU_String.

    This will cause @String2 to be null (adding NULL to a value will result in NULL again).

    Therefore, your complete SQL statement @SQLSubmit will...

  • RE: Rows having records of a perticular type

    Ash-N (2/15/2010)


    That's a good one. No this is not a H/W Question.

    We have a case where we need to get all the records which has a specific criteria. I had...

  • RE: concatinating many records into one row

    Jeff Moden (2/15/2010)


    deveringham (2/15/2010)


    Hi Lutz

    The updated code worked a treat (first time) - thank you

    Dougal

    The next question would be, do you understand how it works and could you use it...

  • RE: Dynamic Query generation

    FANINDRA BHORTAKKE (2/15/2010)


    Thanks again lmu92 for your help,

    I tried the following solution ....

    So what did you get as results when compared to the solution I recommended?

    And, if both solutions return...

  • RE: concatinating many records into one row

    You're welcome!

    Sometimes a working (and maybe even faster) solution is simple but we just can't find it... Been there, done that. 😉

  • RE: Rows having records of a perticular type

    Sounds like a homework question....

    If yes: what specific question do you have? We usually don't do someone's homework, but we'll be happy to assist you if you got stuck...

  • RE: concatinating many records into one row

    Wouldn't the following code give you the same result?

    It should perform a lot better than what you have so far...

    Also, you should consider changing the data type for tmp_restrict [NOTETEXT]...

  • RE: Return dafault values when no rows returned

    Use a Numbers/Tally table or a calendar table to get the weeks you'd like to see as the left part of a left join and use ISNULL() function for weeks...

  • RE: Dynamic Query generation

    Ok, here's what I came up with based on the sample data.

    I'm not sure if it works under all circumstances... Maybe the CASE statements have to be tuned further.

    Furthermore I...

  • RE: concatinating many records into one row

    Would you mind providing some descriptive sample data together with table def and expected result?

    To me it looks like it's not required at all to build those concatenated strings just...

Viewing 15 posts - 4,246 through 4,260 (of 5,504 total)