New answers tagged

2

The documentation for nzsql states that to shell-out you just have to use blackslash pling, followed by the command: \! command If you need to know how to test for file size in a shell script, you can use something similar to: if [[ -f $file ]] && [[ -s $file ]]; then echo "File exists and is greater than 0 bytes" ; rm -f $file fi -f ...


0

A simple mistake, I forget to call FoodIngredients_type. Sorry for disturbing all again. insert into Foods values ('F1', 'Food #1', Food_type('FT1', 'Noodle'), FoodIngredients_table(FoodIngredients_type(Ingredients_type('I1','Ingredient #1', 0, 0), 10), FoodIngredients_type(Ingredients_type('I2','Ingredient #2', 0, 0), 20)), ...


0

You can't use utl_file, since it has a maximum line length of 32767. It's possible that sqlplus has a similar limit. If you are tying to move data to a different Oracle database you can use data pump. You can eve use datapump on a materialized view. If you want to migrate to a non Oracle database you can use Perl or heterogeneous services to create a ...


0

Thank you everyone for suggestions in comments. I've found out two solutions. Use SQL stored procedure instead of PL/pgSQL: CREATE OR REPLACE FUNCTION test_create_rule_from_stored_procedure() RETURNS VOID AS $test_create_rule_from_stored_procedure$ CREATE OR REPLACE RULE person_ins AS ON INSERT TO person_x DO INSTEAD INSERT INTO ...



Top 50 recent answers are included