Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2009-07-16 : 09:55:16
|
Hi,I want to pull date for application which were used prior week and current weekcreate table #temp1(name varchar(100),countprior int,countcurrent int)insert into #temp1 values('abc',12,50)insert into #temp1 values('abc',18,21)insert into #temp1 values('abc',19,78)insert into #temp1 values('abc',22,7)insert into #temp1 values('abc',10,12)insert into #temp1 values('abc',11,6)my output should beabc 12 50abc 18 21abc 19 78abc 10 12to look for increased figuress in current weekthis query doesn't workselect * from #temp1where countprior < countcurrentRegards,Sachin |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-07-16 : 10:01:41
|
Your query gives exact your wanted output! No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-07-16 : 10:03:29
|
Why doesn't that query work? It works fine and gives exactly what you are after in your output?!? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-07-16 : 10:18:23
|
slow but sure Edit: SCNR No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2009-07-16 : 11:10:48
|
thanks had nulls in my orginal table |
|
|
|
|
|
|
|