Hello experts,
I need to export the data from sql server,
earlier i used Database->Tasks-Export Data...
and select the source and destination, it's working fine.
Now my requirement is, i don't want to copy all data from table, I need only filtered data,
say for example, from table "Sales Shipment Header" i need only where "posted date" > '2016-01-01'
Note: why i used export data wizard, because i need to mapping the fields.
how could i achieve these requirement?
Thanks & Best Regards
Binesh Singh Rajput
(MCTS, MS, MCP)
thank you for your response,
but my requirement is not saving the data to any other format.
i have to mapping fields,
Suppose
in T1 (F1,F2,F3,F4,F5) is fields where as in T2 (F1,F3,F4,F5) field is available.
so i have to map and then copy to other DB Table
I am not sure if I understand exactly what you mean but what I gather is you need to filter from two different tables and then combine the data in to one and then export.
So why don't you do union on two tables and then put it into a new table and then export?
like So:-
with cte as (
Select
[F1],
[F2],
[F3],
[F4],
[F5]
from T1
Union all
Select
[F1],
[F2]= Null,
[F3],
[F4],
[F5]
from T2
No,
See my query its working, but i need using wizard.
INSERT INTO [server2].[database2].[dbo].[Sales Cr_Memo Line]
([Document No_]
,[Line No_]
,[Sell-to Customer No_]
,[Type]
,[No_]
,[Location Code]
,[Posting Date]
,[Shipment Date])
In this wizard i am unable to filter data like [Posting Date] > '2015-01-01'
here if in other server Tables exists then you can't EDIT SQL.
I need here is any way to filter the data.
In the wizard, in the step that follows the selection of the source and destination databases, it gives you a choice of copying data from a set of tables/views, or using a query to select the data. You can write a query to select the data including the where clauses you would like to add if you choose that option.