473,383 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

sql server limit

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.LastPrice,h3.LastPrice from
Blg_HistoricData t,Blg_HistoricData h1,Blg_HistoricData
h2,Blg_HistoricData h3
where t.CodeEquity=114151 and h1.CodeEquity=112220 and
t.PriceDate=h1.PriceDate and h2.CodeEquity=112580 and
t.PriceDate=h2.PriceDate and h3.CodeEquity=112228 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.
Jul 20 '05 #1
1 4819
No, this is not possible for 300 tables, because the maximum number of
tables in one SELECT statement is 255 (may be one more or less).

With 20 tables, this should still work. You could try adding OPTION
(ROBUST PLAN).

Hope this helps,
Gert-Jan

bing wrote:

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.LastPrice,h3.LastPrice from
Blg_HistoricData t,Blg_HistoricData h1,Blg_HistoricData
h2,Blg_HistoricData h3
where t.CodeEquity=114151 and h1.CodeEquity=112220 and
t.PriceDate=h1.PriceDate and h2.CodeEquity=112580 and
t.PriceDate=h2.PriceDate and h3.CodeEquity=112228 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.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: zeedan | last post by:
Hi, I appologise if I'm not posting this to the correct group, but I'm having problems starting MySQL server. I need it in order to post a websurvey for a research project I'm doing for a college...
5
by: Paul J. Landry | last post by:
HI Guys. I hope you can help me out! I'm writting a small app for my Intranet that allows me to see basic information aount user accounts. Included in that information is disk quota data...
5
by: Robin Tucker | last post by:
I'm looking for a simple way of telling (inside a stored procedure) if I'm currently using MSDE or a full SQL server. Ideally, there is some pre-defined environment variable that won't cause me...
2
by: Brian | last post by:
SQL Server 2000 SP3 on a Dell dual 2.4GHz Xeon box 3GB RAM Windows 2K SP4. Two aplication dbs, each less than 2GB in size. Had a problem where we would run Solomon queries and what not against...
8
by: Fred | last post by:
Hello, Our website is currently developed in ASP/Mysql 4. The dedicated servers on which it is currently hosted arrive at saturation. Here is their configuration: - 1 server PIV 2,8Ghz 1GB...
8
by: James | last post by:
Can someone explain the fundamental difference between creating a "multi user" version of an Access DB and creating a client-server Access DB? ie why can't all the users on my network just click...
6
by: GD | last post by:
Hi All, I've got MySQL 5.0.21 running on Windows Server 2003, and php running on Apache on a Linux box (Fedora Core 4). Previously when the pages were running on an IIS server the connection...
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
18
by: maxhugen | last post by:
I have an Access app (split into FE and BE) running for some years, that is now also being used in a second office, connected by a WAN. This office has network problems, as it's over-utilized (97%...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.