Hi,
we are using dbexpress components (MS SQL server) to get data for Report Workshop, but I'm not able to use table aliases.
not working:
select us1.USER_ID as USER_ID, us1.USER_NAME1 as USER_NAME1 from USERS as us1
working:
select USERS.USER_ID as USER_ID, USERS.USER_NAME1 as USER_NAME1 from USERS as USERS
The problem is we and our customers have hundreds of very complex queries (using a lot of joins) which need the short table aliases syntax because they are created by a special query builder software.
Do you have any ideas why it is not possible to use aliases even if it's an allowed sql syntax? The queries work properly in other program parts where we still use TRichView components.
Report Workshop - table aliases not working
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Report Workshop - table aliases not working
If you see (in RVReportDBXDataProvider.pas) how TRVReportDBXDataProvider is implemented, you will see that it creates TSQLQuery and assigns your data query to its SQL.Text.
So if aliases work in TSQLQuery, they must work in TRVReportDBXDataProvider as well.
So if aliases work in TSQLQuery, they must work in TRVReportDBXDataProvider as well.