Viewing 15 posts - 946 through 960 (of 3,543 total)
Hugo Kornelis (3/19/2013)
David Burrows (3/19/2013)
Shame they did not extend DATEADD to include a time option 🙁They didn't need to. DATEADD has always supported time options.
Sorry I meant an option to...
March 19, 2013 at 11:55 am
mtassin (3/14/2013)
Toreador (3/14/2013)
March 19, 2013 at 8:25 am
You have to cast run_duration to varchar first.
Try
STUFF(STUFF(RIGHT('000000'+CAST(run_duration as varchar(6)),6),5,0,':'),3,0,':')
March 11, 2013 at 9:38 am
Jeff Moden (3/11/2013)
March 11, 2013 at 6:27 am
Lynn Pettis (3/11/2013)
What's wrong with expecting someone who is asking for help with a query to post sample data (regardless of the source of the data)..
I don't think there was...
March 11, 2013 at 6:23 am
SELECT DISTINCT j.name as job_name,
msdb.dbo.agent_datetime(run_date, run_time) AS [run_datetime],
DATEADD(second,DATEDIFF(second,0,msdb.dbo.agent_datetime(19000101, run_duration)),msdb.dbo.agent_datetime(run_date, run_time)) AS [run_endtime]
FROM msdb..sysjobhistory h
INNER JOIN msdb..sysjobs j ON h.job_id = j.job_id
WHERE j.name NOT LIKE 'Backup%'
AND j.name NOT LIKE 'Cleanup%'
AND...
March 11, 2013 at 4:00 am
Brad Marsh (3/10/2013)
the excel sheet has both the data output and the expected result from what I am trying to achieve. There are 2 sheets on the excel document....
March 11, 2013 at 3:16 am
In which case you will have to produce several sub queries to produce totals as sugggested by pete.
Simplistically put
SELECT t.ID,u.Units,v.Initialvisit
FROM t
LEFT JOIN (SELECT COUNT(*) AS [Units] FROM [unittable]...
March 8, 2013 at 11:43 am
I was thinking more on line of
SELECT XX.XY, XX.YY, XX.YX
FROM Properties
JOIN XX ON XX.RMPROPID = Properties.RMPROPID
WHERE Properties.RMPROPID IN (@PROPERTIES)
Which will give you one row per...
March 8, 2013 at 10:10 am
ryan.mcatee (3/8/2013)
I think you want something like this?
or
UPDATE a
SET a.[Col 2] = b.[Col 2],
a.[Col 3] = b.[Col 3],
a.[Col 4] = b.[Col 4]
JOIN b ON b.[Col...
March 8, 2013 at 6:51 am
peterzeke (3/8/2013)
...A single dataset query could be written so that only one row per property is returned...
+1
March 8, 2013 at 6:42 am
Adding DISTINCT to the query will give you the results required as per the spreadsheet.
Two observations.
1. CaseID has different data type in the two tables, presume this is a typo!
2....
March 8, 2013 at 2:31 am
Which table contains Vendor_Code ?
March 7, 2013 at 7:18 am
Add a dataset to the report that queries the ExecutionLog table on the report server and show/hide parts of the report according to the time difference betwen last time the...
March 1, 2013 at 6:49 am
Your code
If cmdExecProc.ExecuteScalar.Equals(True) Then
is comparing two objects, in this case the first column of the first row returned (in you case nothing) and the value True (Boolean) and will always...
March 1, 2013 at 6:38 am
Viewing 15 posts - 946 through 960 (of 3,543 total)