Forum Replies Created

Viewing 15 posts - 3,196 through 3,210 (of 5,502 total)

  • RE: Is there a Do While loop?

    @ Ken

    Please provide ready to use table def and sample data together with expected result as described in the first link in my signature.

    @mrpolecat

    What exactly is the difference of the...

  • RE: How to use a function in a query?

    And I say shame shame shame shame shame, SHAME ON ME! 😉

    I should have spotted it right away...

    Regarding your questions:

    1 Can you reproduce this?

    2 If yes, why would this happen?

    3...

  • RE: How to use a function in a query?

    grevesz (7/6/2010)


    Hello Lutz,

    I was talking about the SELECT statement in this thread posted yesterday at 4:12:48 PM:

    ...

    This statement, when I run it, returns case when ts_order.trans_type BUY_SELL, as the...

  • RE: Rounding in group by with rollup

    Glad I could help 😀

  • RE: How to use a function in a query?

    grevesz (7/6/2010)


    the string value is not re-interpreted as a SQL statement.

    No, it isn't. The problem is that it isn't returned as a string correctly.

    Regards,

    Gabor

    I don't quite understand.

    What section or character...

  • RE: How to use a function in a query?

    grevesz (7/5/2010)


    Hello Guys,

    Thanks a lot for the explanations and ideas. This is a lot for me to digest, so please bare with me for a day (or two). I am...

  • RE: Need to see if a record exists before I insert into the table

    bryan.duchesne (7/5/2010)


    boy... that was fast... I didnt have a chance to edit my post before your replied but sadly that didn't seem to do the trick. I still...

  • RE: Need to see if a record exists before I insert into the table

    Something like this?

    INSERT target (field1, field2, field3,.....)

    SELECT field1, field2, field3

    FROM Source

    WHERE NOT EXISTS (SELECT 1 FROM target t2 WHERE t2.field1 = Source.field1)

  • RE: How to use a function in a query?

    Lowell (7/5/2010)


    well...this does what you wanted, but look at the results based on your sample data....it's appending a bunch of CASE WHEN statements and stuff....is that what you wanted?

    this statemnts...

  • RE: How to use a function in a query?

    First of all: Thank your for providing ready to use sample data!! 🙂

    Made it really easy to focus on the subject!

    Here are a few items I run across while...

  • RE: How to use a function in a query?

    Regarding question #4: Did you try to right click on the function in question and select "Modify"? 😉

  • RE: How to use a function in a query?

    As a side note: It seems like all you want to do is get a comma separated list columns ofr a table specified by @an_export_id.

    If so, there are concepts available...

  • RE: hi i need cursor program

    rajendra prasad-377679 (7/3/2010)


    ...

    now i am working in one organisation they ask me to write the program for that scenario using cursor..

    that s y i ask help to the experts..like u...

  • RE: How to transpose rows to columns

    Step one: Define a column to be used as a row/column identifer (either column Parameter or a new column using ROW_NUMBER())

    Step two: UNPIVOT the data to get a table with...

  • RE: Select Count Help

    I would precalculate the data per user and day using a CTE or subquery.

    ; WITH cte AS

    (

    SELECT ServiceID ,

    COUNT(DISTINCT DATE) AS cnt,

    SUM(numHours) AS subtotal

    FROM @ServiceDates

    GROUP BY ServiceID, UserName

    )

    SELECT L.ClientID, S.LocationID,...

Viewing 15 posts - 3,196 through 3,210 (of 5,502 total)