|
Amigos, bom
dia!
Estou com um problema na
funcao abaixo, pois sempre que executo recebo o seguinte
erro:
ERROR: syntax error at or near "S" at
character 288
Sei que o erro refere-se ao
apostrofo no titulo da coluna (TEU'S), mas nao sei como fazer para
resolver.
Alguem pode me
ajudar?
Sds
Paulo
SELECT *
FROM crosstab (
'select year, fk_carrier, fk_direction, volume, sum(quantity) from tbl_sindapar where year = '' 2005 '' and fk_direction = '' Export '' group by year, fk_carrier, fk_direction, volume order by 1', 'select distinct volume from
tbl_sindapar
where volume = "TEU'S" or volume= "FEU'S" order by 1') AS ("year" int4, carrier
text, sentido text, "TEU'S" int4, "FEU'S" int4);
|
_______________________________________________ Grupo de Usuários do PostgreSQL no Brasil http://www.postgresql.org.br
