Forum Replies Created

Viewing 15 posts - 2,881 through 2,895 (of 6,486 total)

  • RE: Shredding XML Data Type to Relational SQL Rows

    Ahh...I think the namespace is messing you up. try this on...

    http://www.sqlservercentral.com/Forums/Topic483834-21-1.aspx#bm483865

  • RE: Shredding XML Data Type to Relational SQL Rows

    Brandie - you're going to need to run a "find/replace" on the < and > sign's. SSC is "eating" your XML snippet.

    Replace them with &lt; and &gt; respectively.

  • RE: Query

    Mike - when you say "after" 9, do you mean after the "9" element in the set? or after the nine in the ORDERED version of the set?

    As in:

    1;2;3;4;11;18;17;10;9;8;7;14;15;16;21;22;23;24;25;30;29;28.

    or

    1;2;3;4;11;18;17;10;9;8;7;14;15;16;21;22;23;24;25;30;29;28.

  • RE: Operand type clash: int is incompatible with void type

    So what IS the data type of TimeDifference? When you said is was "in minutes" I was thinking you mean it was INT - is that not the case?

  • RE: Operand type clash: int is incompatible with void type

    Steve Jones - Editor (6/16/2008)


    So, time%60 should work, correct?

    the modulo would work, yes. But in order to perform the division and end up with a numeric or decimal value,...

  • RE: Continuation of: Execution Plans not the same

    Gus' statement is missing a JOIN clause right before that table name. Not sure which one he had in mind, but it kind of looks like a CROSS JOIN...

  • RE: Correlated Joins Using "Apply"

    Having done some amount of testing on this - while this scenario is certainly convenient in some scenarios, it has a tendency to perform on par with CSQ's, so it...

  • RE: View with N to N relationship tables

    I can't help but think that you're "overthinking" the problem. There's nothing special about expressing a query that happens to have a many to many. Just join the...

  • RE: Concatenate Results Into A Single Field

    Jeff - I will post my own script later. I kind of got busy yesterday and didn't get a chance to come back and finish the thought so to...

  • RE: Eliminating Cursors

    TheSQLGuru (6/16/2008)


    Wilfred van Dijk (6/16/2008)


    I agree with Bob. Why write some unreadable code in order to avoid cursors? To my opinion, cursors are easy to implement, very straightforward and the...

  • RE: There is a data source column with no name.Each data source column must have a name.

    hmm...needle in the haystack time. The best I can offer up would be to start commenting sections out to isolate where the error might be. The second...

  • RE: Eliminating Cursors

    samir (6/16/2008)


    Using this method, the SELECT query is executed 'n' number of times, where n is total number of records in the table. I dont think this is optimized...

  • RE: Eliminating Cursors

    Here's the CLR stored proc:

    Imports System

    Imports System.Data

    Imports System.Data.SqlClient

    Imports System.Data.SqlTypes

    Imports Microsoft.SqlServer.Server

    Partial Public Class StoredProcedures

    <Microsoft.SqlServer.Server.SqlProcedure()> _

    Public Shared Sub CLRCursorSP(ByRef Total As SqlMoney)

    ...

  • RE: Eliminating Cursors

    As requested - here's the CLR code I used. First the function:

    Imports System

    Imports System.Data

    Imports System.Data.SqlClient

    Imports System.Data.SqlTypes

    Imports Microsoft.SqlServer.Server

    Partial Public Class UserDefinedFunctions

    <Microsoft.SqlServer.Server.SqlFunction(DataAccess:=DataAccessKind.Read, IsDeterministic:=True, IsPrecise:=True)> _

    ...

  • RE: Concatenate Results Into A Single Field

    Jeff Moden (6/15/2008)


    What's wrong with a good ol' concatenation function that works in 2k and 2k5?

    Absolutely nothing. The two solutions are a bit of a toss-up from what I...

Viewing 15 posts - 2,881 through 2,895 (of 6,486 total)