Forum Replies Created

Viewing 15 posts - 4,621 through 4,635 (of 5,504 total)

  • RE: Need help with a SQL Query

    Additionally to the test data it would be nice to how you'd provide those multiple reportids (e.g. comma separated, table, xml aso).

    Basically, being a little more specific what you mean...

  • RE: Normalize data using Pivot WITHOUT using Aggregate function

    Justin James (1/4/2010)


    mister.magoo (12/30/2009)


    For the sake of it, a solution which copes with new "ColumnName" values by using dynamic sql (go ahead - pork chop me or whatever you do...

  • RE: XML Query returns zero Records

    The namespaces you need to declare are those used within your xml file.

    In the given case it would be "ns:" and "ax29:".

    The DEFAULT clause within the namespace declaration is the...

  • RE: XML Query returns zero Records

    Your xml should include the namespace declaration in the first row. Something like

    <ns:getPersonnel xmlns:ns="http://www.w3.org/2001/XMLSchema-instance" xmlns:ax29="uri">

    Then you could query your data as follows:

    ;WITH xmlnamespaces(

    DEFAULT 'uri' ,

    'http://www.w3.org/2001/XMLSchema-instance' AS ns,

    'uri' AS ax29)

    SELECT...

  • RE: Running Totals in SQL

    please give us some sample data to play with in a ready to use format. See the first link in my signature for how to do it to get the...

  • RE: Date Query

    select * from wce_history where recordedtime >= dateadd(mm,-2,getdate())

    dateadd is used to calculate date offsets based on a given date. Getdate() is current date, current time. Please see BOL (Books Online,...

  • RE: Interview Question

    venktsrinivas.gv (1/1/2010)


    Pls refer any books with good authour

    Is it possible that you're confused by the "hint "Books Online"?

    If so: Books Online (aka BOL) is the help system usually installed together...

  • RE: Casting the number of decimals in a select dynamically (For eg, amounts based on the number of decimals of the currency)

    The reason why the code in your first sample will not give you the expected results is your ELSE condition:

    since your ELSE condition is of data type DECIMAL, SQL...

  • RE: Query on CTEs

    Jeff Moden (1/1/2010)


    ... Also remember that the definition of high performance "Set Based" code should not be confused with "doing it all in a single query" which may include...

  • RE: Query on CTEs

    Anamika (12/30/2009)


    Actually my question is can't I use the CTE in further part of the procedure. I found the answer is 'no'. before mentioning the CTE in query...

  • RE: "NULL" behaves wierd ...WHY ??????

    Bhuvnesh (12/31/2009)


    but why count(*) will be treated differently from count(id1) though both contains same records?

    Not true.

    Count(*) will count all records in the table (Basically counting the internal id that...

  • RE: Want to use WHILE loop in Stored procedure

    lobbymuncher (12/31/2009)


    ...

    You're on European time? I'll try not to clash with you this morning. I'm bored and it's too early for beer!

    Cheers

    ChrisM@home

    Yep, I live in Germany. Right now it's...

  • RE: Are the posted questions getting worse?

    @Gus:

    Great everything turned into something "different" before the year ends. Let's hope that "different" = "better"!!

    All the best for you and your family!

    @Lynn:

    Glad to hear that both of your...

  • RE: Want to use WHILE loop in Stored procedure

    lobbymuncher (12/31/2009)


    Don't do it like this. Write a query which works, then encapsulate it into a stored procedure. A stored procedure is a query (or set of statements) which has...

Viewing 15 posts - 4,621 through 4,635 (of 5,504 total)