Viewing 15 posts - 1,816 through 1,830 (of 6,486 total)
Correct. There are some errors that will return the error to the CALLING context (i.e. the context "above" the one the commands are executing in), instead of in the...
July 28, 2009 at 2:18 pm
shahm10 (7/28/2009)
---------------------------------------------------
Classification | Jan AVG | Feb...
July 28, 2009 at 1:07 pm
Iron Chef SQL (7/28/2009)
how did you insert that white box with the sql code?
Look under the "ifCode shortcuts" while in the edit interface, and pick the [ c o d...
July 28, 2009 at 11:30 am
So - what result are you trying to get to? Are you looking to do averages over BOTH data sets (meaning - go for a UNION ALL set) or...
July 28, 2009 at 11:14 am
mike brockington (7/27/2009)
July 27, 2009 at 3:03 pm
Paul White (7/26/2009)
. (7/23/2009)
Functions can't call stored procedures.
Not strictly true - a CLR user-defined function can perform data access, including calling stored procedures.
The stored procedure code is subject to the...
July 27, 2009 at 2:39 pm
Since the insert failed, the transaction is still committable...because there is nothing IN the transaction.
July 27, 2009 at 12:17 pm
Try/Catch will catch it at a higer scope. Something like this will work:
BEGIN TRY
exec ('select * from mattserver.mytable.dbo.tablename')
end try
begin catch
print 'that is not a valid server'
end catch
July 24, 2009 at 2:51 pm
you need to make sure you have the right data types coming out of the CASE. Case will try to make its best guess which data type to use,...
July 24, 2009 at 12:21 pm
The only option you might have is to capture the change in something that doesn't get rolled back (a table variable for example), then apply the change all over again....
July 24, 2009 at 9:08 am
@@error is fairly limited in what it can do for you. It seems to be useful in catching informational messages, or messages that have been determined not to be...
July 23, 2009 at 3:28 pm
K. Brian Kelley (7/23/2009)
July 23, 2009 at 2:12 pm
It's an actual execution error, which means it doesn't execute anything after the initial error. Meaning - never mind the GOTO's, it's going nowhere after the error.
This is precisely...
July 23, 2009 at 2:08 pm
Carl Federl (7/23/2009)
When used together with...
July 23, 2009 at 10:55 am
Agreed. A function won't do. That said - if you were to replace the word function with "stored procedure", and you probably could do what you're looking at.
July 23, 2009 at 10:33 am
Viewing 15 posts - 1,816 through 1,830 (of 6,486 total)