Forum Replies Created

Viewing 15 posts - 2,056 through 2,070 (of 8,416 total)

  • RE: complex query

    MonsterRocks (3/4/2011)


    Thanks a lot.... but here #tab1 will be already derived from CTE.... so it will take more table scan... u suggest me to go with this?

    It depends on how...

  • RE: Are the posted questions getting worse?

    Chris Morris-439714 (3/4/2011)


    Dave Ballantyne (3/4/2011)


    SQLkiwi (3/4/2011)


    Plagiarism is when you're pretending the work is your own and not giving proper credit.

    Copyright infringement is when you're reprinting the work without permission.

    It is...

  • RE: Are the posted questions getting worse?

    Plagiarism is when you're pretending the work is your own and not giving proper credit.

    Copyright infringement is when you're reprinting the work without permission.

    It is possible to do both at...

  • RE: complex query

    ramarkishna (3/4/2011)


    Really Nice Solution

    That's almost there, but the output isn't quite right (multiple columns and huge blank spaces). Also the performance will not be as good as the...

  • RE: Get Top and bottom record

    Yogesh Potdar (3/4/2011)


    Thanx - Regarding the parenthesis and standards, can you provide me the standards for writing the SQL Query, as i was looking for those 🙂

    Yes, the syntax is...

  • RE: complex query

    Once you've read that article, this code should make sense:

    SELECT CONVERT(VARCHAR(12), Emp.empno) + ' | ' +

    STUFF(CA1.marks.value('./text()[1]', 'varchar(max)'), 1, 1, '')...

  • RE: Query to delete nth row in a table (SQL Server 2008 Express)

    HowardW (3/4/2011)


    It's important to note that none of these solutions will guarantee to delete the same rows as are being returned by the select statement...

    Hi Howard,

    I agree with your comments...

  • RE: Deleting rows from a table...best way?

    Hi Karen,

    There are a number of strategies; which one is best depends on your precise circumstances. You can find a good general technique in this SSC article: http://www.sqlservercentral.com/articles/67898/. ...

  • RE: Get Top and bottom record

    Yogesh Potdar (3/4/2011)


    Its bit easy you may try this...

    There's no point specifying NOLOCK on a local temporary table, and the syntax that omits the WITH keyword and parentheses around the...

  • RE: Understanding T-SQL Expression Short-Circuiting

    Just to be clear, Bart's example is compiled as:

    SELECT CASE WHEN 0 <= 0 THEN 0 ELSE LOG10(0) END;

    ..which also gives the error (when it should not). Reproduces on...

  • RE: Understanding T-SQL Expression Short-Circuiting

    Gianluca Sartori (3/3/2011)


    It looks like that behaviour is determined by the fact that the code executes inside a TVF.

    It is constant-folding at work. If you replace the literal constant...

  • RE: Subroutines in TSQL

    Eric M Russell (3/3/2011)


    My most recent involvement with querying remote data involves joining huge resultsets originating in a 3rd party Oracle 11g database with reference data in a SQL Server...

  • RE: Subroutines in TSQL

    GSquared (3/3/2011)


    Yep, but I haven't had a chance to try that in anything but proof-of-concept environments yet.

    Understood.

  • RE: Subroutines in TSQL

    Eric M Russell (3/3/2011)


    When I need to join a resultset from a remote server, like from a linked server connection, neither a View or TVF are beneficial. I'll typically execute...

  • RE: Subroutines in TSQL

    GSquared (3/3/2011)


    I've found that if you insert from a remote server into a local table variable, it avoids the DTC overhead, or at least some of it. Huge performance...

Viewing 15 posts - 2,056 through 2,070 (of 8,416 total)