SQL Assistant problem

Tools

SQL Assistant problem

I'm trying to import a CSV file with 4 values/row into a 4 column table - should be pretty easy, but I'm getting the following error:

"The positional assignment list has too few values"

with this insert statemnent:

insert into tableName values (?, ?, ?, ?)

I can't seem to find that error message anywhere to diagnose...
4 REPLIES
Enthusiast

Re: SQL Assistant problem

Have you changed the default delimiter to a comma? If not, go into "Tools"/"Options"/"Export/Import" and change the delimiter to a comma. The default delimiter is a tab character.

Re: SQL Assistant problem

Thanks for the reply - I had the correct delimeter, but it turns out that when you're in Import mode, the SQL Assistant disregards "Submit only the selected query text, when highlighted" on the Query tab under "Options". That could just be on my system though - our DBA can't get that option to work at all.

Re: SQL Assistant problem

The solution is to delete all code above and delete all code below the "insert into" statement, and then run the SQL code for the insert into.  This must be a bug.  I had a prior version of SQL Assistant on Windows XP, and it worked fine.  Not since my upgrade to enterprise windows 7.  

I had set the Tools, Options, Query checkbox for "Submit only the selected query text, when highlighted".

But when I use "Import Data", that hightlighted selection fuction is ignored, so all insert attempts fail if there is other code above or below.

Teradata Employee

Re: SQL Assistant problem

Starting with SQL Assistant 15.0 the option "Submit only the selected query text, when highlighted" now applies to Import also.