error too many sql variables

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

error too many sql variables

Post by AriSilva »

I´m getting this kind of error and I do not figure it out.
The output file xx.csdb could not be opened: too many SQL variables
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: error too many sql variables

Post by josh »

Do you have 999 or more variables in one of your records? That error is probably coming from SQLite which has a limit of 999 variables in a single statement. In CSPro 7.5 we are upgrading to a newer version of SQLite that increases this limit to 32766 but with CSPro 7.4 you will get this error for records with that many variables. If you break up your record up and put some variables on another record you should not get this error.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: error too many sql variables

Post by AriSilva »

It was working fine with 7.3.
And I think that it is a little more complicated than the number of variables, because I have a version of the faulty file with less records and it seems to work.
Besides, I do not remember exactly, but it executed once when executing directly from the batch editor.
Splitting the variables into separate records will be a problem because at the end I´ll have to export the variables to a stata file, and the user wants everything in a single file, with a single record type.
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: error too many sql variables

Post by AriSilva »

I´ve reinstalled 7.3 and it is working fine so far.
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: error too many sql variables

Post by josh »

The 999 limit would only happen in 7.4. In CSPro 7.3 and below the case is stored in a single column in the database. If you create the file in 7.3 and use it in 7.4 the files stays in the 7.3 format. If you create a new file with the same dictionary in 7.4 then it will use one column per variable and you would hit that error if you have a record with 999 variables or more.
Post Reply