Viewing 15 posts - 1,846 through 1,860 (of 1,922 total)
Mate, post your table structures (CREATE TABLE statements), Some sample data (INSERT INTO script), Indexes and Constraints if any and your expected result based on the sample data. THis will...
April 6, 2010 at 11:40 pm
Hi there, this is the working version of the code.. please ignore the code present in the post above
BUT BEFORE U MOVE ONTO THE CODE, I WOULD SUGGEST U READ...
April 6, 2010 at 10:56 pm
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
Viewing 15 posts - 1,846 through 1,860 (of 1,922 total)