If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Background: This is not a DB2 problem but relates to your shell. Whenever you type '*' or '?', the shell will expand this based on the content of the local directory. So if you have three files 'abc', 'def', and 'xyz' in the current directory, your command will become:

Code:

select abc def xyz from ab

If you look at this statement, you will agree that it is syntactically incorrect and DB2 must complain about it. (This happens way before the DB2 CLP is invoked.)

Putting quotes around it - as Marcus suggested - prevents the globbing of the shell and DB2 will get the "*". Another (but IMHO more cumbersome) alternative is to escape any special characters that the shell interprets (*, ?, $, etc.):