Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Transport error

Author  Topic 

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-09-17 : 15:58:45
I am running the following query

select a.PaymentReceivedID,b.PaymentReceivedID,c.PaymentReceivedID
from Tcr_PaymentReceived a
cross join
Tcr_PaymentReceived b
cross join
Tcr_PaymentReceived c
where a.amount + b.Amount + c.amount = 3542.25


basically I am looking to find if any 3 amounts can = 3542.25

there are only 4500 rows in the table

The sql server is a Quad processor Pentium III 800 Xeon, why would this query cause this? Any sugestions on work around?


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-17 : 15:59:44
The error means that you got disconnected from the database server, simply reconnect.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-09-17 : 16:46:48
The problem is it's everytime I run that specific query it disconnects (Even after I reconnect). Any Idea what can cause this? All other queries run fine (even far larger ones)


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-17 : 16:55:34
What build number are you running, the latest is 3282? Does Event Viewer or the SQL Server Error log shed light on it at all? What does SQL Profiler show?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-09-17 : 23:06:56
quote:
Originally posted by Vinnie881

I am running the following query

select a.PaymentReceivedID,b.PaymentReceivedID,c.PaymentReceivedID
from Tcr_PaymentReceived a
cross join
Tcr_PaymentReceived b
cross join
Tcr_PaymentReceived c
where a.amount + b.Amount + c.amount = 3542.25


basically I am looking to find if any 3 amounts can = 3542.25

there are only 4500 rows in the table

The sql server is a Quad processor Pentium III 800 Xeon, why would this query cause this? Any sugestions on work around?


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881



Even you have only 4500 rows in the table, you are cross join it 3 times. Do you know how many rows that is 4500 x 4500 x 4500 and it overflow on my calculator



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -