Viewing 4 posts - 1 through 5 (of 5 total)
my mistake,
you are right!
I forgot to add where clause in the main query. This fix would serve the purpose.
Thanks!
July 3, 2009 at 6:43 am
Hope this query may help you
DELETE TOP (SELECT COUNT(*)-1 FROM temp WHERE path='C:\my\' ) FROM temp
July 3, 2009 at 5:11 am
My query is: -
select * from [dbo].[Main Table]a
where [drug name]='typeA' and not exists
(select * from [dbo].[Main Table]b
where a.[calendar year]=b.[calendar year] and
a.[Patient ID]=b.[Patient ID] and
b.[drug name]='typeB'
--b.[drug name]'typeA'
)
---added .[Patient ID]...
July 2, 2009 at 12:28 am
Hope this query may help you:-)
select * from [dbo].[Main Table]a
where [drug name]='typeA' and not exists(select * from [dbo].[Main Table]b where a.[calendar year]=b.[calendar year] and b.[drug name]='typeB')
July 1, 2009 at 6:27 am
Viewing 4 posts - 1 through 5 (of 5 total)