yingchai (9/22/2012)
Hi SQL Gurus,I have a below table with column names ACCOUNT, QTR1, QTR2, QTR3, QTR4
ACCOUNT QTR1 QTR2 QTR3 QTR4
-------------------------------
Opex 20 0 0 0
Sales 30 0 0 0
Costs 55 0 0 0
As you can see from the table above, the table only contains data for quarter 1. How can I perform the sql query where it allows me to filter by quarter?
Example; If I do a filter by quarter 1, the output will appear as per below:
ACCOUNT QTR1
---------------
Opex 20
Sales 30
Costs 55
Thanks in advance!
edit : can you please clarify what you are expecting?
given what you have told us so far.....to "filter by quarter" would only mean selecting the relevant column in a "SELECT QTR1 FROM..." statement
...but i am sure you already know this
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day