Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Saving Sql Server data saved in a datawindow

$
0
0

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?


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>