![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to import from a dBase table whose name changes every day based on the date. So I add a Dynamic Property Task, select the copy data task in the tree, then select the SourceSQLStatement property. At this point I have a choice of how to set the value -- based on a query, ini file, a constant value, etc. What I am trying to do is concatenate an SQL statement where the table name is the name of the text file without an extension (because that's how dBase works). So I choose 'Query' and enter something like select 'select `field1`, `field2` from `L' + <sql to create name based on date> + '`' When I execute the dynamic task, nothing happens. The SQL for the copy data task does not change. However, when I use the dynamic task to set the SourceSQLStatement property to a CONSTANT (instead of Query) such as "blah blah blah" and execute it, the SQL for the copy data task DOES change. What am I going wrong?? Or is there a better way to accomplish this? Totally new to DTS.... Thanks! |
#3
| |||
| |||
|
|
I'm trying to import from a dBase table whose name changes every day based on the date. So I add a Dynamic Property Task, select the copy data task in the tree, then select the SourceSQLStatement property. At this point I have a choice of how to set the value -- based on a query, ini file, a constant value, etc. What I am trying to do is concatenate an SQL statement where the table name is the name of the text file without an extension (because that's how dBase works). So I choose 'Query' and enter something like select 'select `field1`, `field2` from `L' + <sql to create name based on date> + '`' When I execute the dynamic task, nothing happens. The SQL for the copy data task does not change. However, when I use the dynamic task to set the SourceSQLStatement property to a CONSTANT (instead of Query) such as "blah blah blah" and execute it, the SQL for the copy data task DOES change. What am I going wrong?? Or is there a better way to accomplish this? Totally new to DTS.... Thanks! |
![]() |
| Thread Tools | |
| Display Modes | |
| |