General information
Category:
Coding, syntax & commands
Title:
SQL Newbie Question
I need to create a query that will provide 12 months of data that can be dropped into a spreadsheet via _vfp.dataclip(,,3) function. The results should look something like:
JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
ITEM1 12 13 9 12 6 21 13 15 12 16 9 12
ITEM2 9 10 10 14 10 17 15 16 17 17 12 18
ITEM3 11 17 16 16 16 23 12 14 16 18 20 17
ETC ..
The only way I know to acquire this data is to run a SQL query with a monthly date range 12 times. I know there must be a way to write a single SQL statement that would pull all of this data at once but I'm not sure how to construct it.
Anyone available to give me an example of how to do this?
Thanks,
Robert Wright
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only