Viewing 15 posts - 121 through 135 (of 345 total)
I separated the recordset into power on times and power off times. Then join those on the ID where the power off times come after the power on times. Then...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 1:55 pm
memostone86 (10/11/2011)
SQLRNNR (10/11/2011)
toddasd (10/11/2011)
How do you figure HoursOn for 2323 is 7?I come up with ~5h55m on that one.
The lastest status for 2323 on 6/30/2011, the status is on after...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 1:21 pm
How do you figure HoursOn for 2323 is 7?
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 12:54 pm
pdonley (10/11/2011)
toddasd, I believe you are correct. I must have been using the wrong term. I apologize. What you said is exactly what I am doing.
Not a problem. It struck...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 9:51 am
It sounds like you are building the query in the front-end code and then sending that query to the database to be executed. If that is the case, then that...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 9:02 am
chauchs (10/11/2011)
select t1.f1, t2.f1from table1 t1
join table1 t2
on t2.f5 = t1.f5
and t2.f3 = t1.f3
join table1 t3
on t3.f5 = t1.f5
and t3.f3 = (select...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 11, 2011 at 8:05 am
Keopx (10/10/2011)
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 10, 2011 at 1:54 pm
How does this work for you?
alter procedure GetReport
@SpoolID int
AS
declare @sql nvarchar(4000)
select @sql=extrasql from reportspool where spoolid=@SpoolID
exec (@sql)
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 10, 2011 at 8:00 am
Assuming you're doing this on a test server, start with this:
CROP TABLE table1
CROP TABLE table2
(But change the Cs above for Ds. We seem to have some filter here that...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 6, 2011 at 7:10 am
Also, to answer the question you posted the DDL for, your update is safe ...in this sample set. If you get the query John provided and run that, you'll see...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 5, 2011 at 12:36 pm
You can simplify your CASE expression like this:
CASE table2.Code2
WHEN '1-10' THEN 1
WHEN '11-20' THEN 2
WHEN '21-30' THEN 3
WHEN '31-40' THEN 4
WHEN '41-50' THEN 5
WHEN '51-60' THEN 6
WHEN '61-70'...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 5, 2011 at 12:05 pm
branovuk (10/5/2011)
How to use CASE statement (or similar, maybe if?),
because it is not just Update, it is based on data from table2 another values in...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
October 5, 2011 at 7:00 am
But...it's Kansas 😛
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
September 29, 2011 at 3:29 pm
This will give you everything you want to know: http://www.sommarskog.se/dynamic_sql.html
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
September 26, 2011 at 10:30 am
Is there a question here, or is this just a demo of the most convoluted way possible to do table auditing?
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
September 19, 2011 at 10:18 am
Viewing 15 posts - 121 through 135 (of 345 total)