How pull Master Data in installments (Customer and Supplier)

The RM00101(Customer) table as well PM00200 (Vendor) has large volume of data how to query like first 1000 records and next 1000 records so on so that the query will executed in time and the same can pulled in excel sheet.

At present the remote server where the tables are there it does not have excel so at present I saving in "Result to File" and saving into .sql and then opening in excel and while opening excel further data conversion is required. Is there another way? 

Guidance would be appreciated.

Thanks,

Chemp

Parents
No Data
Reply
  • Hi Chemp,

    Thanks for the additional inquiry here.

    In re: to executing the query per batch, you could try using a where clause on the DEX_ROW_ID column.  This column is autoincremented each time a new record is created and could be used to isolate batches of data returned. (e.g. 10000 - 10500, 10501 - 20000, etc.)

    As for extracting to Excel, I've often used the copy / paste feature from standard query analyzer grid results in SSMS.  You can select whether or not you'd like to copy the column header data as well as the content data.  This is definitely more of an ad-hoc method.  If a more long term solution was required, I would look into using the SSIS service via SSDT.

    Thanks again

Children
Related
Recommended