Toad World® Forums

Error when linking query to import wizard as part of automation script

I created a query that I am trying to link to an import script. When I select open file and link SQL file, I get an error saying “Import wizard only supports single batch, please modify your sql statement and try again”

My query does not have multiple batches, and if I just paste the query into the window, it works fine. However, I noticed that this is only the case when I paste the query without comments (/* */). If I include the comments, then I get the error.

Does anyone know why the comments are causing this error?

After playing around with various placement of my comments, I’ve been able to establish that the import wizard doesn’t like my comments at the top of the sql query.

So this is bad:

/Change Log*********

**

**

**

********************************************************/

Select * from …

But this seems to be ok - i.e. I don’t get the message “Import wizard only supports single batch…”

Select * from…

/Change Log*********

**

**

**

********************************************************/

So if I put my comments at the bottom of my sql script everything works fine. Does anyone know why this might be happening? I’m not familiar with batch processing, but it doesn’t seem like a valid comment tag would prompt a program to think that I was trying to process multiple batches.

This just looks like poor parsing on our side. I entered QAT-1866 to fix. For now you have a work around.

Debbie - I also experience this when trying to use a query for AS400 that declares variables at the beginning of the script. You have to end each statement with a ; for the AS400 when declaring. I’m not sure if it is absolutely necessary to do what I did, but just wanted to let you know that this message is not generated just for comment tags. I am working with Igor Manokhin on my other issue that lead to this discovery.