Forum Replies Created

Viewing 15 posts - 586 through 600 (of 1,473 total)

  • RE: Storing MySQL Stored Procedure resultset in a SQL Server temp table

    Watch for schema issues as well, I seem to remember having issues with that the last time I worked with MySQL.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: CTE's, Do you use them on an everyday basis?

    I'm still on SQL2000 in my production environment, but I can tell you that I used derived tables daily.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: possibleto create View with Variable inside

    Views don't use variables. But all you'd need to do is get rid of your where in the view and use it in the referencing statement.

    IE.

    create view V_myView as

    Select...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Need helping looping through records to send emails

    I guess I'm unclear on the question.

    I'm assuming you're doing this with a cursor/loop and xp_sendmail?

    Seems pretty straightforward if you already know how to process the table and send all...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Stored Procedure Metadata

    Matt Whitfield (10/1/2009)


    Have some code. The important bit is the CommandBehaviour.SchemaOnly parameter to the SqlCommand.ExecuteReader call.

    So, to use FMTONLY, it'd be... this?

    using (TextWriter tw = new StreamWriter("c:\\metadata.txt"))

    ...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Calculating the Running Sum Conditionally

    Maria,

    You might also take a look at this thread, which shows another application of the quirky update and compares it to other methods.

    http://www.sqlservercentral.com/Forums/Topic789373-8-1.aspx

    While a lot of it might...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: does ident_current() work for uniqueidentifer also

    Stopping to think about this for a few, I realized I could just select each UID (Yeah, the table has a UID already, and it's NOT the field used to...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: does ident_current() work for uniqueidentifer also

    [Edit] Nevermind, apparently I never actually stopped to think about this one, it wasn't really a difficult problem.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: does ident_current() work for uniqueidentifer also

    GSquared (9/30/2009)


    It would be trivially easy to do that in SQL 2005, with the Output clause that added.

    For SQL 2000 (which is the forum you posted in, so I assume...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Stored Procedure Assistance

    The comments about the cursor/complicated TVF are true, and if it's possible for you to re-write this in a set based manner, that would be ideal. As to why...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: How many triggers can be implemented in a single table

    TRIGGERS ARE EVIL!

    But yeah, I agree with Ian, consolidate triggers wherever possible. Although you can set the trigger order, any time you modify/insert/delete a trigger, that order gets changed...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Help writing a SQL

    Jeff Moden (9/30/2009)


    Very cool... Thanks. I'll take a look at the code.

    The two things that bother me about the quirky updates are:

    1) The clustered index is required in the...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Stored Procedure Metadata

    Matt Whitfield (9/29/2009)


    Garadin

    If you're using say SqlClient under .NET then that gives you meta-data irrespective of the presence of rows.

    You can move from one result set to the next with...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Stored Procedure Metadata

    richard.smith 47066 (9/29/2009)


    Hi Matt,

    OK I see what you mean. The only thing is that for every procedure it would have to pass its input parameters otherwise you just get...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Stored Procedure Metadata

    Also, what do you do with multiple result sets from the same SP?

    USE tempdb

    CREATE TABLE Test( TestIntint)

    INSERT INTO Test(TestInt) SELECT 1

    GO

    CREATE PROCEDURE TestSP

    AS

    DELETE FROM Test

    SELECT 'A' A, 'B' B, 'C'...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 15 posts - 586 through 600 (of 1,473 total)