Hi George, I wasn't able to get it to work quite right, however I was given another solution that worked perfectly:
select year(pricedate)
, month(pricedate)
, pricedate
, price
from daTable as T
where pricedate =
( select max(pricedate)
from daTable...
I have a table where each row contains a single day's pricing information. The table has one row per "price date", going back to May of 2002.
Example:
UNIQUE_ID, TICKER, NAME, PRICE_DATE, PRICE
A1234, TICKER1, Company 1, 5/5/2007, 12.5523423
A1235, TICKER2, Company 2, 5/31/2007, 1423.2342
I...
Thanks for responding to my question. Here are some more details:
-I am using Sybase v.12.5.3
-Fields in table: UNIQUE_ID, TICKER, NAME, PRICE_DATE, PRICE
Should I post this question in the Sybase forum? I thought that the standard ANSI SQL functions may cover this issue, but perhaps not...
I have a table where each row contains a single day's pricing information. The table has one row per "price date", going back to May of 2002.
I am trying to figure a way to select the row of the final "price date" of every month. The problem is that the final price is not always on the last...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.