![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
What happens if you say SELECT COUNT(*) as Amount FROM Audittrail a JOIN TransactionType tt ON tt.TransactionType = a.TransactionType JOIN TransactionSession ts ON ts.TransactionSessionID = a.TransactionSessionID AND ts.TransactionTime BETWEEN CONVERT(Char(10), DATEADD(d, - 1, GETDATE()), 101) AND CONVERT(Char(16), DATEADD(d, - 1, GETDATE()), 101) + '23:59:59' LEFT JOIN EventLog e ON a.EventID = e.EventID WHERE tt.JobCode = 'Enforcement' AND a.Status = 'Failed.' -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Joe Horton" <horj235 at lni dot wa dot gov> wrote in message news:e$Uf3YisEHA.3740 (AT) tk2msftngp13 (DOT) phx.gbl... I am having trouble with an Execute SQL Task in my DTS. When I create a simple SQL statement as below - the single result count is available as an Output Variable: SELECT COUNT(*) FROM MYTABLE However the SQL statement below that returns just one result count, doesn't have any available Output Variables to me. The Query works great in QA: SELECT COUNT(*) FROM Audittrail a JOIN TransactionType tt ON tt.TransactionType = a.TransactionType JOIN TransactionSession ts ON ts.TransactionSessionID = a.TransactionSessionID AND ts.TransactionTime BETWEEN CONVERT(Char(10), DATEADD(d, - 1, GETDATE()), 101) AND CONVERT(Char(16), DATEADD(d, - 1, GETDATE()), 101) + '23:59:59' LEFT JOIN EventLog e ON a.EventID = e.EventID WHERE tt.JobCode = 'Enforcement' AND a.Status = 'Failed.' |
![]() |
| Thread Tools | |
| Display Modes | |
| |