Unloading all column table in hana

You can use below procedure for unloading all column tables in Hana.

create procedure unload_all() LANGUAGE SQLSCRIPT AS
CURSOR C_TABLE
FOR SELECT 'UNLOAD “' || TABLE_NAME || '”;' AS SQLTEXT
FROM SYS.TABLES
WHERE SCHEMA_NAME = 'MYSCHEMA' AND TABLE_TYPE = 'COLUMN' and temporary_table_type = 'NONE';
BEGIN
OPEN C_TABLE;
FOR cur_row AS C_TABLE DO
EXEC cur_row.SQLTEXT;
END FOR;
END;

You call this procedure like below:

CALL unload_all;

Bir Cevap Bırakın

XHTML: Şu etiketleri kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>