I'm storing time series data in a table in SQL server 2000. The table
has columns like: CodeEquity, PriceDate, LastPrice. To extract the
last price for a number of equities on COMMON DATES I have used the
query:
select t.LastPrice,h1. LastPrice,h2.La stPrice,h3.Last Price from
Blg_HistoricDat a t,Blg_HistoricD ata h1,Blg_Historic Data
h2,Blg_Historic Data h3
where t.CodeEquity=11 4151 and h1.CodeEquity=1 12220 and
t.PriceDate=h1. PriceDate and h2.CodeEquity=1 12580 and
t.PriceDate=h2. PriceDate and h3.CodeEquity=1 12228 and
t.PriceDate=h3. PriceDate
this works for about 20 self joined tables and then says syntax error.
I'm wondering what sql limits it hits. Is it possible to do this in
SQL for 300 tables?
Thank you.
has columns like: CodeEquity, PriceDate, LastPrice. To extract the
last price for a number of equities on COMMON DATES I have used the
query:
select t.LastPrice,h1. LastPrice,h2.La stPrice,h3.Last Price from
Blg_HistoricDat a t,Blg_HistoricD ata h1,Blg_Historic Data
h2,Blg_Historic Data h3
where t.CodeEquity=11 4151 and h1.CodeEquity=1 12220 and
t.PriceDate=h1. PriceDate and h2.CodeEquity=1 12580 and
t.PriceDate=h2. PriceDate and h3.CodeEquity=1 12228 and
t.PriceDate=h3. PriceDate
this works for about 20 self joined tables and then says syntax error.
I'm wondering what sql limits it hits. Is it possible to do this in
SQL for 300 tables?
Thank you.
Comment