How to pipe multiline string to isql?
Submitted by: AdministratorUsing Bash shell you may use the following construct:
{
echo "DROP VIEW v1;"
echo "CREATE VIEW..."
} | isql -user SYSDBA -pass masterkey srv:db
each echo statement outputs newline at the end.
Because that's a lot of writing, use the so called 'document here' feature of the shell:
cat <<- _END_ | isql user SYSDBA -pass masterkey srv:db
DROP VIEW v1;
CREATE VIEW ...
...
_END_
Submitted by: Administrator
{
echo "DROP VIEW v1;"
echo "CREATE VIEW..."
} | isql -user SYSDBA -pass masterkey srv:db
each echo statement outputs newline at the end.
Because that's a lot of writing, use the so called 'document here' feature of the shell:
cat <<- _END_ | isql user SYSDBA -pass masterkey srv:db
DROP VIEW v1;
CREATE VIEW ...
...
_END_
Submitted by: Administrator
Read Online Firebird Job Interview Questions And Answers
Top Firebird Questions
☺ | How to detect the server version? |
☺ | How to write UDF s in Delphi? |
☺ | How do convert or display the date or time as string? |
☺ | How to drop all foreign keys in database? |
☺ | Is there some bulk load or other way to import a lot of data fast? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |