Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 4th, 2013  |  syntax: None  |  size: 0.63 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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$'
clone this paste RAW Paste Data