Error while Importing data from flat file to table thru sql assistant

Database

Error while Importing data from flat file to table thru sql assistant

When i load data from file to table thru sql assistant its throwing error like "Query contains 2 parameters but import file contains 1 data values"...i checked the values in file as wel as column in table both are matching exactly...Any body could help me?
6 REPLIES

Re: Error while Importing data from flat file to table thru sql assistant

It is generally one of two things, either the table you've created does not match the insert into table (?,?,?); statement or the insert into statement does not have the same number of variables (question marks) as the text file has partitions - or you've got a delimiter problem. Finally my problem became new line/carriage returns. I'm thinking the better way is if it's trapped within a access DB table, then the delimiters are handled safer (I assume).

Re: Error while Importing data from flat file to table thru sql assistant

Set delimiter as ',' in ( tools-> options->import/export)

default delimiter is tab.

N/A

Re: Error while Importing data from flat file to table thru sql assistant

im getting the message in my sql insert query contains 4 parameters but import values is 1. I have tried changing the delimiter but I still get the same error message.

Re: Error while Importing data from flat file to table thru sql assistant

Hi washdd,

This error often appears due to invalid delimiter. You can anlyze the data, and check for if there is a header in the file? Or data enclosed in qoutes? Or the delimiter is appearing in the data value? Similarly there might be Carriage return in the data value prohibiting the parameter binding.

Khurram
N/A

Re: Error while Importing data from flat file to table thru sql assistant

Hello Khurram,

Thanks for responding to me. I don't have any commas in my import data. When I select the delimiter "Tab" is checking on space between each field value in my import table?

N/A

Re: Error while Importing data from flat file to table thru sql assistant

Khurram,

how can I recognize carriage returns in my import file?