Claudio Navarro H.
|
| Posted: 06/18/2003, 2:01 PM |
|
Hi!
I'm actually using CC. i generated a page with two forms (a search and a grid), and on the grid i have a custom SQL sentence (a Join for four tables in T-SQL). I'm using aliases for the tables, and have a "where" condition.
In the Search form, i have four filter fields, which change the "where" condition for my custom SQL, but when i apply a filter, CC modify my custom SQL adding the field (and that's right), but not add the alias for my tables, and the field name is repeated between the tables...
How i tell to CC put alias in the fields?
an example of my custom SQL:
SELECT T1.CUSTOMER_ID, T1.NAME, T2.WORK_ID, T2.DESCRIPTION, T2.DATE
FROM TABLE1 T1 LEFT JOIN TABLE2 T2 ON T1.CUSTOMER_ID = T2.CUSTOMER_ID
WHERE T2.ORDER_STATUS = 'CLOSED'
and when the search is executed, CC add this :
SELECT T1.CUSTOMER_ID, T1.NAME, T2.WORK_ID, T2.DESCRIPTION, T2.DATE
FROM TABLE1 T1 LEFT JOIN TABLE2 T2 ON T1.CUSTOMER_ID = T2.CUSTOMER_ID
WHERE T2.ORDER_STATUS = 'CLOSED'
AND CUSTOMER_ID = '12345-6'
~~~~~~~~~~~~
without the alias
any suggestions?
Thanks, and sorry about my bad english...
Claudio.
|
|
|
 |
Claudio Navarro H.
|
| Posted: 06/19/2003, 9:08 AM |
|
related to the last question, how i can modify the query string programatically?
thanks!
Claudio.
|
|
|
 |
|