Subject | Select last - How to select latest data |
---|---|
Author | menjit_singh |
Post date | 2005-12-08T12:50:45Z |
Hello all,
What is the syntax to select the latest 30 days data and sort it from
oldest date to most recent date? (please refer message id 26907,
question about the same, but i need to change it a bit). I have
tried :
'SELECT First 30 CLS, VOL, OPN, HIGH, LOW, DATA,symbol FROM DATA
WHERE STOCK='''+imya+''' order by DATA ACS'
With the statement above i got the first 30 days data sorted from the
oldest date to the most recent date.
'SELECT First 30 CLS, VOL, OPN, HIGH, LOW, DATA,symbol FROM DATA
WHERE STOCK='''+imya+''' order by DATA DESC'
with the statement above i got the last 30 days data BUT sorted from
the latest date to the oldest date.
Now i want the latest 30 days data SORTED from the oldest date to the
most recent date.
PS: i have a table called DATA and a field in that table named DATA
to store date information.'imya' refers to the stock name. 'CLS, VOL,
OPN, HIGH, LOW, DATA,symbol' are the fields in the table.
What is the syntax to select the latest 30 days data and sort it from
oldest date to most recent date? (please refer message id 26907,
question about the same, but i need to change it a bit). I have
tried :
'SELECT First 30 CLS, VOL, OPN, HIGH, LOW, DATA,symbol FROM DATA
WHERE STOCK='''+imya+''' order by DATA ACS'
With the statement above i got the first 30 days data sorted from the
oldest date to the most recent date.
'SELECT First 30 CLS, VOL, OPN, HIGH, LOW, DATA,symbol FROM DATA
WHERE STOCK='''+imya+''' order by DATA DESC'
with the statement above i got the last 30 days data BUT sorted from
the latest date to the oldest date.
Now i want the latest 30 days data SORTED from the oldest date to the
most recent date.
PS: i have a table called DATA and a field in that table named DATA
to store date information.'imya' refers to the stock name. 'CLS, VOL,
OPN, HIGH, LOW, DATA,symbol' are the fields in the table.