Forum Replies Created

Viewing 15 posts - 1,696 through 1,710 (of 1,923 total)

  • RE: How to update efficiently?

    I would use Dynamic Update query in this context... But we must also write that dynamic query to neglect SQL-Injections... But when the number of columns to be updated is...

  • RE: How to get row value after GROUP BY by MIN or MAX

    This would work for u!

    ;WITH CTE (Key1,MAX1,SUM2)

    AS

    ( SELECT Key1, MAX(VAL1) as MAX1, SUM(VAL2) as SUM2 FROM @TableVar

    GROUP BY KEY1

    )

    SELECT TAB.Key1 , TAB.VAL1 MAX1 , CTE.SUM2, TAB.SOMEVALUE

    FROM CTE CTE

    JOIN @TableVar...

  • RE: Help with Stored Procedure

    john barnett (4/25/2010)


    ColdCoffee's code runs your stored procedure from your posting. It assumes it is in the same database as your code and has the same owner.

    Spot On, John..

    And Nabha's...

  • RE: Using OPENROWSET to import CSV files

    Thanks, Jeff, for posting your approach.. As i dont have SSMS at home, i will check out your code tomorrow and let you know..

    But i got a doubt here.....

  • RE: Help with Stored Procedure

    Use the statement like this

    DECLARE @OUTPUT_COUNT INT

    EXEC @OUTPUT_COUNT = sp_GetMessageCount '<Your Table Name>'

    SELECT @OUTPUT_COUNT

  • RE: PLEASE HELP !!!!

    SSMS = Sql Server Management Studio.. Invoke it, Open the Database Node and follow what Mr.Lowell had put in his post...Hope this helps you..

  • RE: Where are you?

    Tom.Thomson (4/24/2010)


    ColdCoffee (4/24/2010)


    Nice thread, imho!!

    Me born in , une fois par le territoire français (once a french territory) PONDICHERRY, in INDIA! 😉

    And now working in chennai (again in INDIA) for...

  • RE: Where are you?

    Tom.Thomson (4/24/2010)


    ColdCoffee (4/24/2010)


    Nice thread, imho!!

    Me born in , une fois par le territoire français (once a french territory) PONDICHERRY, in INDIA! 😉

    And now working in chennai (again in INDIA) for...

  • RE: Where are you?

    Nice thread, imho!!

    Me born in , une fois par le territoire français (once a french territory) PONDICHERRY, in INDIA! 😉

    And now working in chennai (again in INDIA) for one among...

  • RE: Quick question about len

    Bhuvnesh (4/24/2010)


    Jeff Moden (4/23/2010)


    Bhuvnesh (4/23/2010)


    Also check ANSI_NULL and ANSI_PADDING settings on both databases ?

    Spot on.

    Jeff , i didnt get you here ? did i suggest wrong workaround ?

    I guess...

  • RE: Using OPENROWSET to import CSV files

    I have 2 solutions in mind.

    Solution 1:

    1. Ask the csv team to tel give us if the extra columns will be added in today's file.

    2. Create many format (*.fmt) files...

  • RE: Using OPENROWSET to import CSV files

    Jeff Moden (4/23/2010)


    Wow... sorry about that, folks. I really lost track of this post.

    Simon, after only 5 months of delay :blush:, do you still need any help on this?

    Jeff,...

  • RE: problem with one to many relationship

    Harsha, there are lot of ways (fast ways included) for performing group concatenation in MS SQL... if u could please post us DDLs for table structures (CREATE TABLE scripts), sample...

  • RE: GROUP BY Query Help

    AndrewSQLDBA (4/22/2010)


    Hope that you don't mind if I take the code apart and figure out how it works, and what it does

    At your will, brother!

    1. The CTE will collect...

  • RE: GROUP BY Query Help

    AndrewSQLDBA (4/22/2010)


    I want only the name associated with the Max(ROWID)

    Check out the last post of mine, you will get only the last inserted row for a date, the date,...

Viewing 15 posts - 1,696 through 1,710 (of 1,923 total)