Viewing 15 posts - 271 through 285 (of 345 total)
This will fix what you have:
declare @startdate Datetime
declare @enddate Datetime
set @startdate = getdate()-480
set @enddate = getdate()-90
--set @vStart = select convert(varchar,@startdate, 102)
print @startdate
print @enddate
WHILE (@startdate < @enddate)
BEGIN
print 'delete from vending where...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 27, 2011 at 1:58 pm
I think you're looking for something like this:
CREATE TRIGGER trigger_test ON test FOR UPDATE
AS
SET NOCOUNT ON
IF UPDATE(column9) OR UPDATE(column10) OR UPDATE(column11)
BEGIN
--do your main DML here
END
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 27, 2011 at 7:50 am
Not only confusing, but dangerous! I'm reading Defensive Database Programming by Kuznetsov and he describes where any triggers on the table in the code above will be affected by the...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 25, 2011 at 11:50 am
Ajay.Kedar (4/25/2011)
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 25, 2011 at 7:50 am
SQLkiwi (4/24/2011)
toddasd (4/21/2011)
I didn't know INSERT could have a TOP clause.
It's a good thing to know, because SET ROWCOUNT will not work with INSERT, DELETE, or UPDATE in the next...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 25, 2011 at 7:42 am
opc.three (4/21/2011)
TOP also works with INSERT directly. So this is the case BOL was talking about:
I didn't know INSERT could have a TOP clause. Now it makes sense. Thank you.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 21, 2011 at 1:36 pm
I've been reading about Service Broker with these questions lately and I still have a lot of questions on what exactly it is (even after reading BOL). Anyone here use...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 21, 2011 at 7:19 am
You're in the wrong forum. This has very little to do with SQL Server. My company also has many databases offshore and do you know what I do when I...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 20, 2011 at 7:25 am
Your UDF is based on getting the next box number of that day's orders. So I'm saying don't join tblOrders to avoid locking it and instead pass the procedure the...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 19, 2011 at 10:10 am
Multiple columns (not fields) won't matter. Try it out and you'll see that they are tacked on to the end of the rows just like a scalar total. You'll only...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 19, 2011 at 9:27 am
Yes, you can tack on as many as you like if your additional queries return one value. If they contain more than one row, your results will cross-multiply and we'll...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 18, 2011 at 3:53 pm
Ah, I thought you would copy the whole queries from the first post into the parenthesis. If these are views, then just remove the parenthesis.
SELECT *
FROM...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 18, 2011 at 1:47 pm
Copy and paste what you currently have.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 18, 2011 at 1:21 pm
db2mo (4/18/2011)
What field would I join on? There are multiple fields in the first dataset and only one field in the second dataset.
None, just paste your queries where I...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 18, 2011 at 12:33 pm
A mental point to myself for thinking about the answer and then executing it 😀 It's almost like not cheating!
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 18, 2011 at 11:45 am
Viewing 15 posts - 271 through 285 (of 345 total)