Modified fieldnames in query result

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

Modified fieldnames in query result

Post by Choppers »

I'm running a SELECT query, over several tables. Each table has a field called 'last_updated'. When i browse the results of the query, the field have been renamed :

last_updated_1
last_updated_2
last_updated_3

Can anyone suggest an easy way to tell which field is from which table ?
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

select
table_1.last_updated as last_updated_tbl1
table_2.last_updated as last_updated_tbl2
table_3.last_updated as last_updated_tbl3
from table_1, table_2, table_3


The "AS" directive change the name of field in resultset.
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

Post by Choppers »

Thanks gto, that'll do nicely.

I was hoping the tzquery component might hold the info somewhere, but i guess i'm probably just being lazy.

Thanks.
Post Reply