Forum Replies Created

Viewing 15 posts - 2,116 through 2,130 (of 8,416 total)

  • RE: RAISERROR within CATCH not propagated to C# Caller

    Ah right - I see it now. The SELECT 1/0 returns an empty result set. Execute Scalar only opens the first result, so your code never encounters the...

  • RE: Remove duplicate values

    diamondgm (2/26/2011)


    Yeah, I'm aware of the cost of sorting the guid, but it was lame of me not to see what you pointed out about the optimiser - thank you!

    'Lame'...

  • RE: Remove duplicate values

    diamondgm (2/26/2011)


    I was trying to indicate that the order by clause seems inconsequential.

    Yes but calling NEWID() is not for free, and neither is sorting by a uniqueidentifier.

    Thanks for answering my...

  • RE: Function

    diamondgm (2/26/2011)


    I apologise.

    No worries.

  • RE: How to solve this 2 query

    daveriya (2/25/2011)


    But i am getting result,whats wrong in this?tell me

    You may get correct results, but it would be better to use GROUP BY.

  • RE: Remove duplicate values

    diamondgm (2/26/2011)


    However, so far I have found the following method to be the simplest and cheapest for identifying and deleting duplicates:

    SELECT RANK() OVER (PARTITION BY empno ORDER BY NEWID()) RankX

    You...

  • RE: Function

    diamondgm (2/26/2011)


    Maybe this will stir up a hornet's nest...

    By playing devils advocate, could it not easily be argued that RDBMS is all about arrays? Sure we don't call them arrays...

  • RE: Error handling

    Khades (2/25/2011)


    I need to dump some rows into a staging table. However I want sql server to continue with the rest of the rows when 1 or more rows...

  • RE: how to find number of user logged in particular day

    daveriya (2/26/2011)


    what about particular day,i should add where condition.thanks

    Yes, but we careful if the LoginDate column contains times as well as dates:

    SELECT LoginDate,

    ...

  • RE: Change rows into column and vice versa without using pivot method.

    anandvish2006 (2/25/2011)


    Change rows into column and vice versa without using pivot method.

    If the names of the columns need to be dynamic, you can use code like this:

    SET ...

  • RE: Function

    daveriya (2/26/2011)


    Create a function named loadQueryResults() exists that will, when assigned as the value of an array variable, load the results of the following query into that array:

    ...

  • RE: RAISERROR within CATCH not propagated to C# Caller

    Stewart,

    Can you provide a short C# script please - I'd like to see that side of the code too. Also, it would help to know which version and build...

  • RE: Trim Function help

    rocky_498 (2/26/2011)


    Hi Guys,

    I have question regarding Trim function,

    Here is my requirement,

    Address = ADDRESS1+ADDRESS2+ADDRESS3

    I want to trim if there is no Address1 or Address3

    I know i can use...

  • RE: right/left outer join

    daveriya (2/26/2011)


    Does this involves any right ya left outer join?

    Yes.

  • RE: Use of Identity Property to Resolve Concurrency Issues

    It is possible to avoid the dummy column, ever-growing number of rows in the hidden tables, and avoid locking issues by using an approach based on this example code: (the...

Viewing 15 posts - 2,116 through 2,130 (of 8,416 total)