SHARE
TWEET

Untitled

a guest Jan 4th, 2013 21 Never
  1. psql -v dateav="2012-01-28" mcdb -p 5555 -U admin -q -t -A -c 'select count (client_name) from v_activities where scheduled_start_date like :'dateav';'
  2.  
  3. ERROR:  syntax error at or near ":"
  4. LINE 1: ...) from v_activities where scheduled_start_date like :dateav;
  5.        
  6. echo "select count (client_name) from v_activities
  7. where scheduled_start_date like :'dateav'" |
  8. psql -v dateav="2012-01-28" mcdb -p 5555 -U admin -q -t -A
  9.        
  10. echo 'command' | psql
  11.        
  12. psql mcdb -p 5555 -U admin -q -t -A
  13.      -c "select count (client_name) from v_activities
  14.          where scheduled_start_date like '2012-01-28'"
  15.        
  16. -c 'select ... like $x$2012-01-28$x$'
RAW Paste Data
Top