How to recreate table in Informix 7.3?
Hi,
How to recreate a table in Informix? Before I dropped the table, I have output the dbschema of the table in *.sql file.
The OSS is of not much help. They just cannot give me a direct answer.
I tried to recreate the table in dbacces using:
dbaccess tablename.sql;
But encountered a syntax error.
Anyone know what is the problem?
Thanks
Check out any sql statements regarding create table syntax. Informix is ANSI compliant (like most RDBMS) so any sql statements you find in other DBMS is 80% sure to run on that database.
Regards,
P.S. What the exact error that you encountered? (Would you be able to give the error code?)
Hi,
Managed to recreate the table. But having problem recreating the index. The index affw~0 cannot be created in dbaccess as ~ is recognised as an illegal character.
Anyone knows how to create a index in either dbaccess or sapdba?
Thanks.
Hi,
Below is the statement I used to create the index in dbaccess but encountered an illegal character error.
create unique index "sapr3".affv~0 on "sapr3".affv (mandt,aufpl,
aplzl,aphzl,aftzl,afvzl);
create index "sapr3".affv~a on "sapr3".affv (mandt,atinn);
What is wrong with the above statement?
Thanks.
Hi,
Note that in Informix, you have to specify in the environment variable that you'll be using special characters in your sql statements ... note that your syntax is correct except that you didn't setup the environment variable needed before running dbaccess (sorry mate but I forgot the name of the environment variable ... its on the Informix User Guide Manual ...)
Regards,
Hi bubu,
Thank you for your information. I will try to look for that environment variable.
Regards.