SQL Export to Excel file column?

10 pts.
Tags:
Microsoft Excel
SQL Export to Excel
SSIS
SSIS Package 2005
I need to create a SSIS Package in which the data is export to Excel file the problem is the date and time column in sql there is one column and i need to separate it into two column can any body help e i thid? thank in advance

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can use the DATEPART to get just given parts of the DT filed.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • clark445kent
    Hi,
    Only workarounds I know of...

    • Query the data dictionary and produce a csv field list, then concatenate the header.csv with the data.csv. This would be querying the columns table, but you would need to take care to generate the SQL to match since you want to remove any and all chances that the column list doesn't match the data.

    • Create a view with the first row having all field names union all with a select on the data.

    Something like:

    SELECT 'a', 'b', 'c' UNION ALL SELECT a, b, c FROM table
    This may require type conversions for dates, though.
    1,945 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following