Home : Products : Hach WIMS : Hach WIMS Client : Documentation : How-To Articles : Use Long SQL Statements in SQLFIRST
Q10577 - HOWTO: Use Long SQL Statements in SQLFIRST

WIMS has a limit of 1023 characters for a Spread Formula.  This is the same limitation that exists in Excel.  This typically is not an issue unless you are using the SQLFIRST statement with a very long SQL query.  

In order to work around this problem:

1. In spread design, click on a cell in a blank row (it will later be hidden).  Lets say B4

2. Go to format cell, and set the lenght to enough characters to fit your sql statement (Note: prior to 6.9.0, OPS only supported cell lengths to 1500). 

3. Type in your SQL Statement in B4.

4. In cell B6, enter your SQLFIRST formula: =SQLFIRST(1,1,"",B4,7,1000,C1,E1) where it refers to B4 for the SQL Query parameter.   

That's it.  This way your SQL Query can be up to 3000 characters. 

 

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
using the CONCAT function the query can be a lot longer than 3000 chars. say B1 has a 2800 char statement, and B2 has a 2900 char statement, B3 = SQLFIRST (0,0,"", CONCAT(B1,B2), ... , B3 can execute a query 5700 chars long. Is there a limit on the query size on the ADO / OLEDB driver technology ? Approved: 10/30/2007 2:39 PM
Created on 10/30/2007 2:26 PM.
Last Modified on 1/4/2013 8:29 AM.
Last Modified by Scott Dorner.
Article has been viewed 5144 times.
Rated 5 out of 10 based on 3 votes.
Print Article
Email Article