RE: Syntax reference for sql commands in excel 2003 via DTS packages -
08-13-2008
, 02:28 AM
Hi Roger,
I understand that you could not use REPLACE function for your Excel data source in your DTS package.
If I have misunderstood, please let me know.
I have not found any document talking about the official functions for this scenario, but I am trying to internally consult our product team to see whether or not we have such an official
document for supported SQL functions for "Microsoft Excel 97-2003" provider. The process may need more time. I appreciate your patience.
Additionally is it convenient for you to create a linked server for your Excel data source in your SQL Server and then you can directly execute the T-SQL statement to query the records? You
may refer to my following steps:
1. Create a linked server in your SQL Server instance with the following T-SQL statement:
EXEC sp_addlinkedserver 'ExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'C:\Documents and Settings\changliw\My Documents\Book1.xls',
NULL,
'Excel 5.0'
2. Create a DTS package, drag a SQL Server data source, drag a Execute SQL Task and input the following T-SQL statement into the task:
Select REPLACE(NAME1,'.','') from [ExcelSource]...[Sheet1$]
If you have any other questions or concerns, please feel free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...#notifications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ======= |