Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Can I stump the forum?  unhandled error w/SQL (Read 3295 times)
jdove78
YaBB Newbies
*


I Love SQL*XL

Posts: 4
Can I stump the forum?  unhandled error w/SQL
16.05.08 at 19:36:48
 
If anyone can figure out why the query below yields the following error message than, you are a better person than I.  Error: L*XL Universal error: unhandled error (please report)
 
=SQLQueryValue(CONCATENATE("SELECT MY_TABLE.AOP_HEADCOUNT FROM MY_TABLE LEFT OUTER JOIN SITE ON MY_TABLE.SITE_ID=SITE.SITE_ID WHERE SITE.SITE_NAME='",$B42,"' AND MY_TABLE.MONTH_NUM =",E$14," AND MY_TABLE.YEAR=",E$2," AND MY_TABLE.AOP_ID=(SELECT MAX (MY_TABLE.AOP_ID) AS AOP_ID FROM MY_TABLE WHERE MY_TABLE.MONTH_NUM=",E$14," AND MY_TABLE.YEAR=",E$2,") "))
 
The structure of the db requires the SQL to be written in this way however, it should work.
 
-Jdove
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Can I stump the forum?  unhandled error w/SQL
Reply #1 - 17.05.08 at 08:46:53
 
I think the problem is that the SQL is too long. The variable in which I receive the Query text parameter contains an error when I try your formula. It catches the results from the concatenate function you use.  
 
I have programmed an error message for this to be more helpful.  
 
The SQL statement you use is too large. It canned exceed 255 characters if you pass it directly like this. If you use longer SQL statements, build the SQL up in another cell. Then use the cell reference to pass the value. I used in your example =SQLQueryValue(A1) and that worked fine. In A1 I put your concatenate statement.
Back to top
 
« Last Edit: 17.05.08 at 09:39:30 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
jdove78
YaBB Newbies
*


I Love SQL*XL

Posts: 4
Re: Can I stump the forum?  unhandled error w
Reply #2 - 22.05.08 at 22:38:40
 
Thanks for your response.
Back to top
 
 
  IP Logged
Pages: 1