Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 25 lines (15 sloc) 0.471 kb
#sh getDataFromTableToCSV.sh cred /media/misperoles/git/tools/converCSVToCreateSQL/salida.out
table=$1
output=$2
if [ "x${1}" = "x" ]; then
echo 'Parametros faltantes, ./getDataFromTableToCSV.sh nameTable fileout.csv'
exit
fi
if [ "x${2}" = "x" ]; then
echo 'Parametros faltantes, ./convert_y_n_to_numeric.sh nameTable fileout.csv'
exit
fi
echo ' COPY '$table" TO '"$output"' WITH CSV HEADER" > sql.tmp
psql -d database -f sql.tmp
rm sql.tmp
echo 'finish!'
Jump to Line
Something went wrong with that request. Please try again.