How to access the database and quries through the procedures
Posted: Wed Jun 26, 2013 7:56 am
HI all,
How to access the database and quries through the procedures.
The following one i tried to access , but I couldnt get the exact out put.
ShellScript:
#!/bin/bash
vsql -c "select MFR_PART_KEY from vmro.DIM_ATA limit 10;"
exit 0
Creating procedure:
dbadmin=> create procedure query(arg1 varchar) AS 'query1.sh' LANGUAGE 'external' USER 'dbadmin';
CREATE PROCEDURE
Executing procedure:
dbadmin=> select query('vmro.dimata');
query
-------
0
(1 row)
Please correct me where i went wrong .
Thanks,
Malar
How to access the database and quries through the procedures.
The following one i tried to access , but I couldnt get the exact out put.
ShellScript:
#!/bin/bash
vsql -c "select MFR_PART_KEY from vmro.DIM_ATA limit 10;"
exit 0
Creating procedure:
dbadmin=> create procedure query(arg1 varchar) AS 'query1.sh' LANGUAGE 'external' USER 'dbadmin';
CREATE PROCEDURE
Executing procedure:
dbadmin=> select query('vmro.dimata');
query
-------
0
(1 row)
Please correct me where i went wrong .
Thanks,
Malar