Good day. I have the following query:
COPY (SELECT
"UR_16PIX_Chih"."ID_UR",
"UR_16PIX_Chih"."IDEDOMUN15",
"UR_16PIX_Chih"."PIX1",
"UR_16PIX_Chih"."PIX2",
"UR_16PIX_Chih"."PIX3",
"UR_16PIX_Chih"."PIX4",
"UR_16PIX_Chih"."PIX5",
"UR_16PIX_Chih"."PIX6",
"UR_16PIX_Chih"."PIX7",
"UR_16PIX_Chih"."PIX8",
"UR_16PIX_Chih"."PIX9",
"UR_16PIX_Chih"."PIX10",
"UR_16PIX_Chih"."PIX11",
"UR_16PIX_Chih"."PIX12",
"UR_16PIX_Chih"."PIX13",
"UR_16PIX_Chih"."PIX14",
"UR_16PIX_Chih"."PIX15",
"UR_16PIX_Chih"."PIX16"
FROM
public."UR_16PIX_Chih"
WHERE
"UR_16PIX_Chih"."IDEDOMUN15" = '08061') TO
'/home/manager/data/miconsulta/08061.csv' WITH CSV HEADER;
What I want to know is how I can automatically replace the value '08061' with the value 08062, then with the value 08063, then with the value 08062, and so on. Only in the query, not in the table. So far what I do is edit the query and change the value manually but I need to do it automatically. Thanks in advance for the help.