Viewing 15 posts - 16 through 30 (of 31 total)
lol...........ok, do you have any idea why it is complaining then mate?
Its distinct [ReviewID]'s im looking for. I should also point out that [feManagedReview] is a view.
June 24, 2008 at 10:00 am
Hi, thanks for the reply. Not sure what you mean though........im not using a group by at all.
June 24, 2008 at 9:53 am
Its fine, Got it:
SELECT TOP (@TOP)
cheers
June 24, 2008 at 3:47 am
Hi mate.
Yes ive broken it down and ran the indivdual elements and they all run correctly. This one really has got me stumped!
June 5, 2008 at 10:05 am
Hmmm im now wondering if it is something to do with putting an ALTER command within a BEGIN......END.
Im getting similar weird errors when trying to alter views and stored procs!
June 5, 2008 at 9:54 am
Jason Shadonix (6/5/2008)
Are you sure there aren't any stray characters in your query window? Might try copying the code to a fresh window to rule that out.
Hi.
Yeah 100% sure...
June 5, 2008 at 9:33 am
Hey dude.
OK ive removed the line and my code is such:
?IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_tblProductStockNote_tblLookup]') AND parent_object_id = OBJECT_ID(N'[dbo].[tblProductStock]'))
BEGIN
PRINT N'Adding foreign keys to [dbo].[tblProductStock]'
ALTER...
June 5, 2008 at 8:49 am
Hi im not sure why the ? appeared there. In the error message it just ''.
Anyway, i ran the following:
SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_tblProductStockNote_tblLookup]') AND parent_object_id =...
June 5, 2008 at 7:10 am
Brilliant.
Thanks again Noel..........much appreciated.
June 5, 2008 at 2:05 am
Noooooo the saga continues!
OK........ive made the changes and have ended up with the following:
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'PRIMARY KEY'
AND...
June 4, 2008 at 10:07 am
Aaaaaaarrrrrgghh!!! :blush:
Thank you very much noel. Much appreciated!
June 4, 2008 at 10:01 am
Hello noel..........again many thanks. However it would appear the error is definately in the first few lines. I stripped it back to the following:
IF NOT EXITS (SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS...
June 4, 2008 at 9:54 am
Hi. Once again thanks for your swift response 🙂
OK..........i removed the 'GO's and the code i am left with is:
IF NOT EXITS (SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE =...
June 4, 2008 at 9:40 am
Viewing 15 posts - 16 through 30 (of 31 total)