Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 1,920 total)

  • RE: Pivoting specific fields based on the grouping of another field

    Will this help you?

    I am writing this code from my home where i have no access to SQL Server. once i reach office i will check the validity of that...

  • RE: what is the best way insert millions of records?

    yes, as vyas pointed out, use BCP.. very fast utility to bulk insert millions of rows..

  • RE: Dynamic SQL

    David, that was not my requirement, the OP has asked for it 🙂 i tried my level best to produce a result without case and dynamic sql 🙂

  • RE: Dynamic SQL

    Oh man, i very nearly pulled this thing out without CASE and DYNAMIC-SQL...

    here is the code; if in future u are planning to append many extra columns, say e,f,g...

  • RE: Incorrect Syntax near GO

    Is your .Net Code executing the .sql thro sqlcmd/isql or is it reading the whole database creation query into a string and then executing the string using ExecuteQuery ?

  • RE: Incorrect Syntax near GO

    Hmmm..

    Tel me if u did this:

    1. You Right-click on the database, "Create To" to a new SQL Server Window

    2. SAve this script as .sql file

    3. And now u are trying...

  • RE: Incorrect Syntax near GO

    For SQL Server 2005, the compatiblity level can maximum be 90 and there is no command like HONOR_BROKER_PRIORITY

    I tried this code in both SQL 2005 and 2008. i got error...

  • RE: Incorrect Syntax near GO

    One doubt mate, are u trying to run this piece of code in SSMS 2005 or SSMS 2008?

  • RE: Nice one, please read and give your comments.

    Mate, are u sure we have instr function in SQL Server ? :blink: :blink:

  • RE: Dynamic SQL

    I agree with Lynn here... CASE statements look appropriate here and to my knowledge readable too, then why would you prefer dynamic SQL??

    here is a sample code with CASE statement...

  • RE: I don't know how to do it :(

    I always ask people to look up to your post on forum etiquettes Jeff.. i will add that to my signature as well 🙂

  • RE: I don't know how to do it :(

    Exactly Jeff!!

    When the OP is unclear then we are explicitly type-casted to be unclear 😀 :w00t:

  • RE: Dynamic SQL

    rahul.koduru (4/5/2010)


    But, the example I provided is really a short version of what I really need.

    In the actual problem,

    thats the turning point, please be specific with what your requirement...

  • RE: Dynamic SQL

    Thanks Lynn for checking that out!! i was kind of reluctant to post it without testing.. now that u tested and decorated the code, the OP can directly us that.....

  • RE: Deleting the columns from the same database through the script

    hi there, here is the code u asked for.. check the output of this from that print statement.. if that matches your requirement, uncomment the exec part and your requirement...

Viewing 15 posts - 1,846 through 1,860 (of 1,920 total)