Viewing 15 posts - 4,621 through 4,635 (of 7,191 total)
What version of SQL Server are you using? I think the 4000 character limit only applies in 2000 and below.
John
March 16, 2012 at 5:18 am
Does this not work?
IF NOT EXISTS (
SELECT * FROM sys.key_constraints
WHERE type = 'PK'
AND OBJECT_NAME(parent_object_id) = 'Algorithm_Literals'
)...
John
March 15, 2012 at 6:02 am
Surely it's easier just to DENY UPDATE to all users? Obviously db_owners and sysadmins will still be able to do updates - that may or may not be an...
March 14, 2012 at 7:54 am
Something like this?
UPDATE item
SET taxid = 1
WHERE id IN (SELECT id FROM Inserted)
You can't - or at least shouldn't - have user input in a trigger. If users need...
March 12, 2012 at 8:54 am
All that's going to do is set taxid to 1 for all records inserted. You don't need to use a cursor, either - it's a bad idea from a...
March 12, 2012 at 8:46 am
mandirkumar (3/12/2012)
March 12, 2012 at 8:13 am
Search for tally (numbers) tables on this site. You can either create a permanent one, or you can do it on the fly with a CTE. Once you...
March 9, 2012 at 7:37 am
All that's going to do is set @followingdate to tomorrow's date 30 times, but not display anything until the end. Please will you show what results you expect to...
March 9, 2012 at 7:16 am
Does that not make you curious to find out what results are being returned? Try this:
SELECT convert(varbinary, C.X_stat) & 32
FROM C
John
March 9, 2012 at 5:25 am
I'm surprised it says it's incompatible with int. Have you tried CASTing or CONVERTing?
John
March 9, 2012 at 5:13 am
You're doing it outside of SQL Server, so you don't need to connect. You just need to check whether the service is running. There are a number of...
March 9, 2012 at 5:03 am
Without table DDL (including foreign key constraints), we're just guessing. But all you need to do is add another INNER JOIN clause similar to the existing one. The...
March 9, 2012 at 4:52 am
You'd need to handle that outside of SQL Server. There are monitoring tools that will alert you when services change state. If you want to do it yourself,...
March 9, 2012 at 3:29 am
Because, as Gianluca and BrainDonor have already mentioned, you need to use a split function or dynamic SQL. Make sure you understand the implications of the latter.
John
March 9, 2012 at 2:42 am
Going to Simple recovery option may not solve this problem: if the log file is filled by a single transaction then it doesn't make any difference how often it's cleared.
TRUNCATE...
March 8, 2012 at 1:42 am
Viewing 15 posts - 4,621 through 4,635 (of 7,191 total)