Forum Replies Created

Viewing 15 posts - 3,511 through 3,525 (of 6,486 total)

  • RE: IN clause in CASE function.

    Another option to try:

    select * from table1

    WHERE CASE WHEN @reviewed = 'P' and reviewed = ('P') then 1

    ...

  • RE: Easy or Hard

    I think the fault lies in the "packaging" and not in the tools per se. Better automation, slicker UI's, etc... in a sense does in fact make it "EASIER"...

  • RE: Parsing strings

    Mark Green (4/28/2008)


    It doesn't seem to recognise the format that I am working with.

    You mind posting a few samples of the format? just to help find the right parse....

  • RE: Parsing strings

    Have you tried simply casting your input string to a DATETIME format? it's fairly robust, and seems to pick up a LOT of formats....

  • RE: user definition function parameters -database name- use

    You can't do Dynamic SQL in Transact-SQL functions.

    You CAN in CLR functions.

  • RE: Nesting Transaction

    Keep in mind that the inner transaction won't actually commit until the outer transaction commits. So - even if the inner transaction finishes, if the outer transaction fails and...

  • RE: Row_Number and Union query

    ganesh.salpure (4/28/2008)


    I know you left out the details for me....your query works...but NOT when I want to filter out the rows . When I apply the where clause (where Rownumber>5....)...

  • RE: Identity Columns

    Steve Jones - Editor (4/28/2008)


    Perhaps pseudo code is too confusing for this one, but there is no sys.columns.is_identity column. Hence that's not a real answer.

    However I can see the confusion...

  • RE: passing parameters to function w/ inner join

    but you're not filtering on the distance at all. The OUTER APPLY made sure of that - besides you're trying to filter the wrong zipcode field.

    Did you try the...

  • RE: passing parameters to function w/ inner join

    1.You're still not referring to that field the way I told you.

    Replace

    t2.Ufn_GetLocationsInRadius.distance,

    with

    t2.distance,

    2. You haven't asked it to return things within the range - you've asked it to return only...

  • RE: two servers same query huge diffrence

    Edward (4/25/2008)


    Hi,

    Please could I have some advice I am running a query on the live node of a cluster it takes well over an hour to run even at...

  • RE: Extracting Rows from Delimited Strings

    n1pcman (4/25/2008)


    SELECT raw_payload,

    LEFT(raw_payload+'+++', CHARINDEX('+', raw_payload+'+++', 1)-1),

    CAST(--NULLIF(

    ...

  • RE: using regular expressions

    I didn't even see then secondary question, focusing instead on the "using regular expressions" from the title. I didn't notice what you were planning on using it for....

    GSquared is...

  • RE: Extracting Rows from Delimited Strings

    All right - one more variation on Adrian's original solution, avoiding the need for the CASE statements....

    [font="Courier New"]SELECT

            LEFT(raw_payload+'+++', CHARINDEX('+', raw_payload+'+++', 1)-1),

            CAST(--NULLIF(

                   SUBSTRING(raw_payload+'+++',

                       CHARINDEX('+', raw_payload+'+++', 1) + 1,

                           CHARINDEX('+',...

  • RE: Extracting Rows from Delimited Strings

    Jeff - that last code nulls out the 0's in the 3rd column - is it supposed to?

Viewing 15 posts - 3,511 through 3,525 (of 6,486 total)