Re: SQL load in ESQL/C ?
Posted in 1994
} } LOAD is not a statement in ESQL/C; you can't do it. } } Even if it was a statement, you would not be able to use a variable for the } table name; you can't supply the table name with a variable anywhere in } ESQL/C. You can't use SELECT * FROM $tabname; You can't do GRANT SELECT ON } $tabname; etc. } } PS: You can sort of achieve the tablename-as-variable effect using } statements PREPAREd from strings, but that doesn't count for the purposes } described above. } } }I want to execute the load command from esql. The reason why I } }need to execute the load statement in esql is that I need to } }pass value into the statement. } } } }eg. } } load from $filename insert into $tab_nm ( $col ); } } } } Could anybody help me on this matter? } You could execute a system call that runs an sql script, like: (void)system("isql dbname script.sql"); or use isqlperl. -- Naomi Walker (aka N7FSA) | naomi@anasazi.com | Phoenix, Arizona Everything should be made as simple | as possible, but not simpler --Einstein | Visualize Whirled Peas