[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

Exporting with mssql dts to mysql with date parameters

Experts,
I have a scheduled DTS Package that will run every night.
It will export a table from mssql and convert specified columns for my sql.
My dilemma is that the table is 700mb.

There is a column within the table that holds a invoice_date. Is there any way to specify in the dts export to export rows after a certain date?
or
What would be a better solution?
Thanks.
0
krv123
Asked:
krv123
2 Solutions
 
Brendt HessSenior DBACommented:
Use a SQL Statement to generate your output, instead of a simple "Copy Table" process.  Your data source would be an SQL query with the appropriate WHERE clause, e.g.

SELECT
    Field1,
    Field2,
    .....
    FieldN
FROM MyTable mt
WHERE mt.FieldWithDate >= Cast(Convert(varchar(10), GetDate(), 101) as Datetime)  -- your date cutoff values here
0
 
Chris LuttrellSenior Database ArchitectCommented:
can you not add to the where clause to the sql in the DTS package to limit the resultset?  Maybe
Where/And ivoice_date > getdate()-7 -- last 7 days
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now