To cut a very long story short I want to use varibles in an Alter command in an SP i.e
ALTER TABLE @tableName ALTER COLUMN @fieldName datetime
but it gives me a syntax error. Is there any way around it or should I start hand cranking database mods now.
Regards
Mike
Write an Insert query using a select query that uses a left join. The Join would find all records in the new table and only those that match in the old table you can then use a where clause on the primary key of the old table which looks for Null values. They will be Null in Old where they do...
Why do my triggers fire on an update that effects one row eg
[UPDATE Customer SET CustomerName = 'Some Geezer' where CustomerID = 3]
but not on an update that effects multiple rows eg
[UPDATE Customer SET CustomerName = "No Name" where CustomerName is null] ??
If I run the same...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.