i am trying to use the create alias on the as400 - to read multi-member files. the command i must use is "create or replace alias"
If I enter this command
Create or replace alias qtemp.gripf80100 for pt4dtalib2.gripf80100(loose_084)
select count(*) pkgcount from qtemp.gripf80100
I get back this error
Failed to retrieve data from the database
Details: SQL Exception:[ SQL State:] 42601 [Error Message:] [SQL0199]Keyword SELECT not expected. Valid tokens: <END-OF-STATEMENT>.
[Database Vendor Code: -199]
When I remove the Select statement and just use the Alias command – I get this Error
Failed to retrieve data from the database
Details: SQL Exception:[ SQL State:] 24000 [Error Message:] Cursor state not valid. [Database Vendor Code: -99999]
But if after I say ok and then get rid of the alias command and put back in just the select statement – it works plus it returns the correct number of records.
any ideas or working examples would help thank you