including variables in COPY command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ALL,

I am trying to use Copy command to copy data from table to a flat file. Here is an example:

copy ( select * from employee where hire_date between begin_date and end_date) to '/var/data/text.txt' delimiter ';';

But my problem is the query is not able to read variable begin_date and end_date. It works fine when I passed the real value. Has anyone used variable within a copy ? Please let me know.

Thanks,

Dinesh



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux