SQL query - add table name before column name

edited 6:06PM in FastReport .NET
When we add a ODBC data connection and choose for "Add SQL query" and enter a query with multiple tables the result is a list of columns of all these tables. But without the name of the table it is very hard to see easily what column you need. I know we could alias all the columns but when you have to aliasses dozens of columns per report it is a LOT of work.

Please, please, please, could you modify this. It will help is very very much.

I will explain it by a small example (simplified):

query:
SELECT * FROM orders INNER JOIN orderlines INNER JOIN articles;

That query results in a list of columns, for example:
number
date
customer
.
.
number1
articleno
quantity
price
.
.
number2
description


What we need is that the query returns the table name before the column name delimited by a underscore, for example:
orders_number
orders_date
orders_customer
.
.
orderlines_number
orderines_articleno
orderlines_quantity
orderlines_price
.
.
article_number
article_description

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.