Viewing 15 posts - 1,846 through 1,860 (of 1,920 total)
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...
April 6, 2010 at 8:51 pm
yes, as vyas pointed out, use BCP.. very fast utility to bulk insert millions of rows..
April 6, 2010 at 7:37 am
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 🙂
April 6, 2010 at 7:31 am
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...
April 6, 2010 at 6:01 am
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 ?
April 6, 2010 at 4:25 am
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...
April 6, 2010 at 4:16 am
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...
April 6, 2010 at 4:06 am
One doubt mate, are u trying to run this piece of code in SSMS 2005 or SSMS 2008?
April 6, 2010 at 4:01 am
Mate, are u sure we have instr function in SQL Server ? :blink: :blink:
April 6, 2010 at 1:14 am
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...
April 5, 2010 at 10:40 pm
I always ask people to look up to your post on forum etiquettes Jeff.. i will add that to my signature as well 🙂
April 5, 2010 at 10:31 pm
Exactly Jeff!!
When the OP is unclear then we are explicitly type-casted to be unclear 😀 :w00t:
April 5, 2010 at 8:53 pm
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...
April 5, 2010 at 8:51 pm
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.....
April 5, 2010 at 8:46 pm
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...
April 5, 2010 at 8:41 pm
Viewing 15 posts - 1,846 through 1,860 (of 1,920 total)