Link to home
Start Free TrialLog in
Avatar of Gordon Hughes
Gordon HughesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Sever Query

I have two columns DATEUNIT and NUMOFDATE

The data shown in these columns varies, example
DATEUNIT         NUMOFDATE
W                        4
M                        3
Y                          1

W = Weekly
M = Monthly
Y = Yearly

I would like to have all the data shown in Weeks
I am looking for a query that I can run in the SQL Sever that will change the NUMOFDATE values to weeks dependant upon the current DATEUNIT
ie where is shows 1 year to 52 week, 2 years to 104 weeks

So the example above would show
DATEUNIT         NUMOFDATE
W                        4
W                        13
W                        52

Gordon
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gordon Hughes

ASKER

Good quick response