Forum Replies Created

Viewing 15 posts - 2,866 through 2,880 (of 5,504 total)

  • RE: Tips for writing queries needed

    What exactly do you want to achieve with your approach? It's still not clear.

    Again, please read and follow the instructions given in the article referenced as the first link in...

  • RE: Are the posted questions getting worse?

    jcrawf02 (9/7/2010)


    Do you suppose 5 minutes to return one row of data will be too much for end users? 😛

    Now I just have to figure out what the hell I...

  • RE: Integration of XQuery and T-SQL

    I think it would be easier for most of us if you'd provide sample data and expected result instead of a code snippet (not even sure what programming language that...

  • RE: Using DateDiff to calculate days before a Birthday

    Revenant (9/7/2010)


    The correct way is to celebrate a Feb 29th birthday on the 28th, that's how the Roman (Catholic) calendar does it. In fact, it is not the 29th...

  • RE: Tips for writing queries needed

    Instead of trying to explain what you're looking for it would be more efficient if you would provide table def and sample data in a ready to use format as...

  • RE: Table pivot

    Quite a while ago I thought using PIVOT would be, well... "cool".

    After I figured how the syntax needs to be I was surprised that it didn't provide any performance gain...

  • RE: Need to select all elements of an XML document from an XML data type column

    davidsalazar01 (9/7/2010)


    Hi All,

    Just need to select all XML elements from 2 different XML data type colums in the same table.

    Select XMLcolumn 1 and XML column 2 from 'table name'

    Thanks!

    Try one...

  • RE: Increment by 10 Column Value in select Query

    I would use CROSS APPLY on a 10 row table (or subquery):

    DECLARE @t TABLE(ID INT, SNO INT)

    INSERT INTO @t

    SELECT 1,5124 UNION ALL

    SELECT 2,6231

    SELECT t.ID , t.SNO + z.N

    FROM @t...

  • RE: Table pivot

    ioani (9/7/2010)


    Thank you,

    I managed to solve the problem.

    Would you mind sharing your solution so others might benefit from it?

  • RE: Table pivot

    ioani (9/7/2010)


    Sorry, I have a little error in may sample data. P5 should have only one '20100803' ParameterTimestamp value. The ParameterID should have distinct ParameterTimestamp (the ParameterID and ParamterTimestamp form...

  • RE: Need high resource expensive sql queries

    Errrmmm... that's a requirement not seen very often... 😉

    One option would be to create a c.u.r.s.o.r. on a rather large table (to "avoid" a set based operation).

    Inside the c.u.r.s.o.r.:

    Join a...

  • RE: Need to Cross check for 5 x 5 column

    I would change the design of the table:

    Unpivot the data, reduce it to have only values other than Zero and add a unique constraint on Flg_type.

    You'd basically have a table...

  • RE: Table pivot

    Herer's the CrossTab method I would use. It's describe in more details in the related link in my signature.

    One thing to notice: Your sample data have multiple rows for P5...

  • RE: CAlculate debits and credit total in ssrs report

    anuhya.mudumba (9/6/2010)


    Hey Lutz......

    U r right....i have the same doubts though but i instructed to bring the max benifits of using ssrs and it is one among them.

    i have to do...

  • RE: Union all fields of tables with conditions

    I think you're looking for UNION ALL...

    Select A1, A2 from A WHERE @CheckA = 1

    UNION ALL

    Select B1, B2 from B WHERE @CheckB = 1

    UNION ALL

    Select C1, C2 from C WHERE...

Viewing 15 posts - 2,866 through 2,880 (of 5,504 total)