fgiannacchi
17th February 2023, 11:46
Hi,
I'm trying to do a query in EasySQL and I need to associate an alias to tables and columns.
I know that in SQL I can use the "AS" keyword, but it seems that it doesn't recognize the keyword and expects other keywords, such as "SET" and "WITH".
Any idea?
Thanks :)

mark_h
27th February 2023, 14:57
Hmmmm - I am not sure easy sql works with an alias. I will look around a bit more see if I can find something on it.

OmeLuuk
27th February 2023, 15:46
You would need your alias in order to read item data from your sub-items as well I suppose?
My suggestion would be: add a report script and introduce the extra read fields as input variables also (with alias name) and in the report script add the query on the BOM and sub items (as alias name) in the after.receive.data: section in the report. By adding the used names as input vars, they will be filled for each record read as if fed by the query processor itself.

mark_h
27th February 2023, 21:25
Good suggestion. I could not find anything we did like that in sql queries or on the board, but I do know we used report scripts to do a lot of other stuff with easysql.