Forum Replies Created

Viewing 15 posts - 3,106 through 3,120 (of 4,081 total)

  • RE: Are the posted questions getting worse?

    I don't believe I've ever used a GOTO in T-SQL, if I ever knew they existed. But today I learned that they "are not uncommon" in T-SQL. ...

  • RE: T-SQL 2005 Help

    The original example was actually following the IF/Begin-End ELSE/Begin-End structure.

    By the way, Alvin, enjoyed the presentation Thursday night.

  • RE: Are the posted questions getting worse?

    Okay... how many people here advocate the use of GOTO statements in T-SQL?

  • RE: T-SQL 2005 Help

    GOTO is not uncommon in TSQL

    Really? It's been so long since I've seen one, that I'd forgotten that it ever existed.

    I'm with Flo. ...

  • RE: Conditional Where or Having Clause

    You might try running the code before making pronouncements like that. 😉

    I'm looking at the following results on my screen right now.

    Status State ...

  • RE: Conditional Where or Having Clause

    Will this work?

    declare @sample table (Status varchar(10), State varchar(20), Name Varchar(10))

    insert into @sample

    select 'Pending', 'Nebraska', 'ABC' union all

    select 'Pending', NULL, 'XYZ' union all

    select 'Active', NULL, 'PQR'

    select *

    from @sample

    where state...

  • RE: Which is more efficient or does it matter?

    You're using the left function in a join, which might prevent proper use of indexes. You might also want to consider an approach like this. Warning:...

  • RE: Help w/View Pivot

    Sure. Have a look at this and let me know if you have any questions.

    declare @sample table (SessionID int, question varchar(30), response varchar(30))

    insert into @sample

    select 1, 'Name', 'Mike'...

  • RE: Loading XML into a relational table

    I just re-read your question. Since you have the metadata that defines names, datatypes, and lengths for your output columns, you could parse those attributes to build a...

  • RE: Loading XML into a relational table

    Read about OPENXML on books online. You can query an XML document and simply write the results to a table, then look at the schema. ...

  • RE: T-SQL 2005 Help

    If you would please write a short script to define temporary tables and put a few rows into them, then people can test their solutions to your problem before posting...

  • RE: Encrypting SQL Code

    have you heard of Schrödinger's cat???

    Heard of it? I'm in the box with it!!

  • RE: Need some help in writing a query

    I just revised the final select clause in the previous post to match your output example exactly.

    It looks like a lot of code, but it runs in a millisecond 😉

  • RE: Need some help in writing a query

    How about this then? I would have had it for you sooner, but your order threw me. Your example shows the combinations in an unusual sequence. ...

  • RE: Need some help in writing a query

    In the code below, the "Combos" cte is used to develop concatenated strings of the TXNCDs for each BON. After that, a simple count of the combinations produces...

Viewing 15 posts - 3,106 through 3,120 (of 4,081 total)