Viewing 15 posts - 61 through 75 (of 85 total)
Based on the logic, yes, the procedure exited prior to attempting the update.
October 5, 2012 at 10:15 am
Roland Alexander STL (10/5/2012)
EXEC @return = dbo.my_procedure;
In this...
October 5, 2012 at 10:12 am
The RETURN function can return a value to the caller, but it is up to the caller to capture and process the value:
EXEC @return = dbo.my_procedure;
In this case, (2) is...
October 5, 2012 at 10:11 am
If what you are trying to do is get the first day of the following month try this:
DATEADD(month, DATEDIFF(month, 0, getdate()) + 1, '');
Also, you should know that SQL Server...
October 2, 2012 at 12:52 pm
You're getting an error because the CASE statement needs to be enclosed in parentheses.
October 2, 2012 at 7:05 am
norbert.manyi (10/2/2012)
select * from tbl_Users U where U.active = 1 and U.deleted = 0
It seems that the application owner keeps changing the business logic, so I would...
October 2, 2012 at 6:55 am
Just as an FYI - anything that can be done from Management Studio can be done from VS, provided you have the Ultimate or Database Edition (you didn't mention your...
October 2, 2012 at 6:45 am
An alternate:
create table #tmp (status_id int, status_code char(1), status_sequence int);
insert into #tmp
values
(1, 'A', 1),
(1, 'B', 3),
(2, 'B', 1),
(3, 'C', 1),
(3, 'A', 2);
select
status_id,
status_code
from
#tmp t1
where
status_sequence = (select max(status_sequence) from #tmp t2 where...
September 28, 2012 at 2:16 pm
Then the short answer is, use the variable with the smallest footprint that meets your requirements: in this case, smallmoney.
As to the one-byte difference, I can't say definitively as I...
September 25, 2012 at 9:26 am
So...what's your question?
September 25, 2012 at 9:16 am
User seeks and scans are those initiated by stored procedures or ad hoc queries issued by users (such as you), as opposed to those initiated by the system.
September 25, 2012 at 8:55 am
According to BOL, datepart Is the part of date to which an integer number is added. The following table lists all valid datepart arguments. User-defined variable equivalents are not valid.
User-defined...
September 21, 2012 at 1:11 pm
GilaMonster (9/21/2012)
Just asking if you wanted to think about that some more... 😉
Which is a nice way of saying I may be typing faster than I'm thinking 😉
The thought I...
September 21, 2012 at 9:53 am
GilaMonster (9/21/2012)
Roland Alexander STL (9/21/2012)
Which is the point of using local variables, since it will force a new plan each time the query is run.Errr... really?
Oh, now, was that...
September 21, 2012 at 9:44 am
Viewing 15 posts - 61 through 75 (of 85 total)