## SQLWays - Command Prompt Tips

- SQLWays Return Codes
- Using OS Special Characters

### SQLWays Return Codes

If the exporting was successful, the SQLWays return code is 0. Otherwise, the return code is -1. You can use this feature in batch files.

For example:

       @echo off
       cls
       SQLWays /d=datasource /u=user /p=pwd /t=table
       if errorlevel 0 goto ok
       echo.
       echo Converting error
       goto ex
       :ok
       echo.
       echo No errors
       :ex

SQLWays can also return 1. This is possible when the option /NSTOP is used, and it means that the last operation was successful but there has been an intermediate error (for example, processing of one of the previous tables failed).

### Using OS Special Characters

- Microsoft Windows interprets such characters as %,| as the OS special characters. Thus, if you want to use them in the command prompt or batch files, you have to duplicate them.

  Use:

       SQLWays /d=dsn /s=select * from t1 where field1 like '%%123%%'

  instead of

       SQLWays /d=dsn /s=select * from t1 where field1 like '%123%'

  Note: You don't need to duplicate these characters in the file specified by the /OPT option.

- Windows treats the character > as a redirection character. If you want to use this character in the SELECT statements, you have to enclose the statement in double quotes:

       SQLWays /d=dsn /s="select * from t1 where field2 > 123"

[Main] [Table of Contents]
Copyright © 1999-2003 Ispirer Systems. All Rights Reserved.
SQLWays™ www.ispirer.com.