Jump to content


anamaricar

Member Since 07 Oct 2003
Offline Last Active Apr 30 2012 05:27 PM
-----

Topics I've Started

SQL Dynamic Query (Multiple tables)

30 January 2007 - 06:18 AM

hi, has anyone tried to join tables in a dynamic query? here's what I wrote which is not working


$TABLES = TABLE1 + ' T1, ' + TABLE2 + ' T2 '
$CONDITION = 'T1.ID = T2.ID'

SQL DYNAMIC
SELECT T1.*
FROM $TABLES
WHERE :$CONDITION
ENDSQL

I may be missing some codes or is this not really allowed? by the way, this is in a default logic of a report, if this info helps :) :-"