Viewing 10 posts - 1 through 10 (of 10 total)
Yeah, I tested it before and it worked pretty fine. So, now I know a little bit of simple Triggers. This works well when bulk inserting records from a csv...
November 30, 2009 at 8:43 am
Thanks Lowell. I haven't worked with triggers before. I appreciate for letting me know how a trigger should be designed and work. I tested your code, it needed a little...
November 30, 2009 at 8:17 am
I think I figured out where the problem was, the IF syntax apparently wasn't correct. The parentheses were missing.
Here is the modified working version -
CREATE TRIGGER tgrDefaultValue ON tblPerson
FOR...
November 30, 2009 at 7:31 am
I had the same problem and was solved by executing the u_tables.sql
I think I accidently ran the delete/truncate script (using cursor) on the master DB and the problem started 😀
Thanks...
July 7, 2009 at 6:41 am
Thanks Stefan
Yeah its easy to read without @SqlString
I removed it and now I am using what you suggested (in the second block).
Regards,
Vishal
June 3, 2009 at 12:36 pm
@All
I think I figured out and the sql using cursor is working fine...I deleted the column UniName (if it was present) and executed the SQL...it then added colum to all...
June 3, 2009 at 7:54 am
Hi David,
I have 4 tables and none of them contains any record, they are completely empty. I have created them and I am trying to add a column.
What do you...
June 3, 2009 at 7:40 am
Thanks David.
I forgot to mention that I corrected it to EXEC (@SqlString) but it didn't work. It giving me an error on - DECLARE @SqlString VARCHAR(MAX).
The error message is -...
June 3, 2009 at 7:16 am
I also tried your method and it is giving me an error on the line EXEC @SqlString. The error message is -
The name 'ALTER TABLE [dbo].[Course]
ADD...
June 3, 2009 at 6:56 am
Hi Stefan,
Thanks for replying. I tried this method in SSMS and I am getting "Command Completed Successfully" message. But the column is not added to the tables. I refreshed them,...
June 3, 2009 at 6:43 am
Viewing 10 posts - 1 through 10 (of 10 total)