I have a datawindow, that's pulling some data from a sql server database.
But... on the exported file, one of the columns needs to be a counter of the row.
It's harder to produce a row # in sqlserver... And... doing a saveas only
saves the data that was produced from the Query, and not the computed fields in the datawindow
Does anyone have any ideas?
What makes this worse, is I have to do a Union of 2 queries.
Select *
from XXXX
where audit = 'F300000'
Union
Select *
from YYYY
where audit = 'F300000'
I think I need to do something like this
Select row_number() over (), *
(select *
from XXXX
union
Select *
from YYYY) test
where test.audit = 'F30000'
Is there any easier way to do this? can computed fields be saved to the excel file?