我有一张下表
CREATE TABLE usr_addr_part_15
(
company character varying(70),
add1 character varying(50),
add2 character varying(50),
add3 character varying(50),
phoneoff character varying(30)
)
样本数据如下
INSERT INTO usr_addr_part_15
VALUES (
'A Compnay'
,'35/908A4, KINGS ARCADE, NORTH ATLANTA ROAD'
,'FL'
,'WS-600 025'
,'011-200455/255477'
)
,(
'B Company'
,'35/465R, QUEENS ARCADE, WEST ATLANTA ROAD'
,'FL'
,'WT-601 085'
,'0225-2455215/21470277'
)
所以我需要COPY
将内容放入如下给定格式usr_addr_part_15
的文本文件中:
COMPANY : A Compnay
ADD1 : 35/908A4,KINGS ARCADE,NORTH ATLANTA ROAD
ADD2 : FL
ADD3 : WS-600 025
PHONE(Off.) : 011-200455/255477
--- End Of Company 1 ---
COMPANY : B Company
ADD1 : 35/465R,QUEENS ARCADE,WEST ATLANTA ROAD
ADD2 : FL
ADD3 : WT-601 085
PHONE(Off.) : 0225-2455215/21470277
--- End Of Company 2 ---
在 Windows XP 上,pgAdmin III。