Esql/C Dynamic Index
Posted in 1997
"PRAVEEN MOHANAN" — — source: Informix-list mailing list archive (1991-1998)
Hi folks, Finally i could manage to create indexes dynamically!!!!! The solution is : char stmt[50]; /* HOST VARIABLE */ strcpy(stmt, "CREATE INDEX "); strcat(stmt, index_name); /* index name is dost variable with data retrieved from table*/ strcat(stmt," ON table(column_name)"); /* Remember the space between the statement & codes */ EXEC SQL PREPARE abc FROM :stmt; EXEC SQL EXECUTE abc; AND lo!!! IT WORKS!! Regards, Praveen Sunnyvale , CA e-mail : praveen_mohanan@hotmail.com Tel :650.594.9899 x 217 ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com