Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 1,473 total)

  • RE: Ordering and Reordering

    Posting sample data as demonstrated by the link in my signature has a much higher chance of garnering a response here.

    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: OPENQUERY DYNAMIC SQL PROBLEM

    Glad we could help. Thanks for the feedback.

    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: OPENQUERY DYNAMIC SQL PROBLEM

    Paul,

    Try this one:

    SET @sql = N'

    UPDATE OPENQUERY(MYLINKEDORACLESERVER,''SELECT FIELDNAME FROM ORACLETABLE

    WHERE IDFIELD = ' +

    CAST(@AC AS VARCHAR(100)) + ''')' +

    ' SET FIELDNAME = ''' +

    CAST(@myvalue AS VARCHAR(200)) + '''';

    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 with SELECT and COUNT query

    Jack Corbett


    Can you post what your desired outcome looks like? Also post some test data so we can see exactly what you are working with and trying to do....

    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: OPENQUERY DYNAMIC SQL PROBLEM

    Use this to check your strings before you try to exec them. PRINT @sql. Then you can see what you are actually submitting, which right now, has a...

    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: refer from subquery to current record

    It seems to me that you're trying to establish a running count of rows in the table.. Please Note, you MUST have a clustered index on your current ID...

    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: Concat data from two records in same query

    MrBaseball34 (10/27/2008)


    Good job, Seth

    I fixed the problem with the CoPays by loading them in the CTEs with the

    InsPlan stuff I also fixed it to bring over the SubscriberID so...

    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: Correlated Query

    The alternate solution requires a permanent field and an update to the entire table. It would also be necessary to update the totals each time a row was changed or...

    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: Can I use SQL to Update about 20 Triggers for 20 Tables from Text files...

    Hey, couldn't I then, just open up an empty query and paste all the triggers in there and then just execute, rather than going to each table.... doh

    Heh... yep.

    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: SQL-Server 2005: Change Ordinal Column Position

    You should just create views for this purpose(if you really need to create anything at all), as previously mentioned in this thread. What you're basically asking for with this...

    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 with SELECT and COUNT query

    What are you trying to accomplish with this?

    SELECT Col1,

    COUNT(Col3)+COUNT(Col4)+COUNT(Col5)+COUNT(Col6)+COUNT(Col7)+COUNT(Col8)+COUNT(Col9)+COUNT(Col10)+COUNT(Col11)+COUNT(Col12)

    FROM table1

    GROUP BY Col3

    That code won't work because of an invalid group by, and your counts probably aren't going to give you...

    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: Can I use SQL to Update about 20 Triggers for 20 Tables from Text files...

    Even if the triggers are exactly the same, you'll still have to change the ON clause of the triggers, and you should probably change the names of each one as...

    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 help on performance and integrity

    Or... the even more elusive question... what on earth the end goal of this thing really is. Part of the reason we are unable to come up with any...

    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: duplicating records in same table for different key columns

    Indeed. And the best way is probably by using a Tally CTE ;).

    Give this article a read. http://www.sqlservercentral.com/articles/TSQL/62867/

    Then, if you need our help getting that applied 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: How to.....

    Fraggle (10/26/2008)


    Pretty sure this isn't a Florida only forum. However, to my knowledge, SQL Saturday are Florida only. It does have similar counter parts in other states that...

    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 - 1,246 through 1,260 (of 1,473 total)