Search Postgresql Archives

Extract especific text from a sql statement

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

 



Hi,

I need help to extract fields and tables from a sql statement.

Example:

SELECT pc.cod, pc.val, pi.qtd,
COALESCE(pc.name, 'empty') AS name, lower(coalesce(pc.email, 'empty')) as email,
status
FROM pc
INNER JOIN pi on (pc.cod = pi.cod)
WHERE pc.startdate > CURRENT_DATE
order by 1 desc
;

I need to return that:

pc.cod
pc.val
pi.qtd
pc.name
pc.email
status
pc
pi
pc.startdate



can you help me ?






--
Atenciosamente,

Emanuel Araújo



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux