troubleshooting Question

TSQL Data Comparision

Avatar of gvamsimba
gvamsimbaFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL Server 2005Microsoft SQL Server 2008
9 Comments1 Solution232 ViewsLast Modified:
HI, I have two columns A, B and C for which the sample
data is below.

Basically I need to get only those columns in a single
output table in my stored proc where the value in columns
A and B for currentperiod has doubled since previousperiod.

So in this case, I will need a output with only
Column A since the figures have doubled in current period
as compared to previous period.

Can any one please give me that TSQL ?

Many Thanks

A        B            C
200      400         Currentperiod
100      300         Previousperiod
ASKER CERTIFIED SOLUTION
TSQLGuy30

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros