We help IT Professionals succeed at work.

Problem related to "Unknown token received from SQL Server " ?

BarryTang
BarryTang asked
on
Medium Priority
1,517 Views
Last Modified: 2012-06-22
My platform is SQL server 7.0

I execute a very long SQL statement and receive the
error :

[Microsoft][ODBC SQL Server Driver]
Unknown token received from SQL Server

When I made my SQL staement a little short
( by deleting some subquery from it ) then
it run without error

Is it a resource problem in SQL server
Can I solve this problem ??
Comment
Watch Question

Commented:
Couple of general suggestions --
* Apply SP3 to your SQL7 installation
* Try using "SET ANSI_WARNINGS ON" in your SQL Statement

If you post the query that does not work and the one that does, maybe we can provide some specific suggestions. HTH.
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
i guess that you execute the statement using VB or C++ or whatever platform...
Try to insert some CRLF in your SQL statement, this should solve the problem:

instead of
SELECT <...........> FROM <..............> WHERE <..........>
do this:
SELECT <...........>
FROM <..............>
WHERE <..........>

Cheers
BarryTang,
You have 17 opened questions as of this date.  
I will be posting in each of these questions.  
Please take care of your opened questions older than 30 days by clicking on your logon name link and looking for UnlockedQ or using the links I am providing below.  
Please finalize these within 72 hours or I will ask administration to look into your account at that point.  If you have questions, please ask and I will provide assistance.  

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20187331.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20133725.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20088012.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20083509.html
http://www.experts-exchange.com/Miscellaneous/Games/Q_20382035.html
http://www.experts-exchange.com/Programming/Game_Development/Q_20382294.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20534626.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20521771.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20515842.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20513575.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20493221.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20436510.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20399960.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20395868.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20375410.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20373966.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20372811.html

Thank you.
Administrative Action - PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange