![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is * the only pattern matching character that can be used in the value definition of SSIS variables. Can other pattern matching characters such as (# or [] or [!] or [^], etc.) be used? Where can a list of these chacters and examples of their usage be found? |
#3
| |||
| |||
|
|
Hello Ulysses: Not sure I understand your intent. A variable in SSIS (just like any other programming language) usually contains one and only one value at a time. But that value changes as the program progresses through the logic. So just exactly what type of 'pattern matching' are you trying to accomplish against a variable? Are trying to see if the value at a certain time in your logic contains a certain string of characters? Help me understand. ===== Todd C "Ulysses" wrote: Is * the only pattern matching character that can be used in the value definition of SSIS variables. Can other pattern matching characters such as (# or [] or [!] or [^], etc.) be used? Where can a list of these chacters and examples of their usage be found? |
#4
| |||
| |||
|
|
With the * in the value of the SSIS variable it is used, just like a % in SQL Server. I am looking for files in a folder and the variable called file name is set to find any file that is like abcd*.txt. I simply want to know what other pattern matching characters can be used in addition to the * so I can fine tune the search criteria. "Todd C" wrote: Hello Ulysses: Not sure I understand your intent. A variable in SSIS (just like any other programming language) usually contains one and only one value at a time. But that value changes as the program progresses through the logic. So just exactly what type of 'pattern matching' are you trying to accomplish against a variable? Are trying to see if the value at a certain time in your logic contains a certain string of characters? Help me understand. ===== Todd C "Ulysses" wrote: Is * the only pattern matching character that can be used in the value definition of SSIS variables. Can other pattern matching characters such as (# or [] or [!] or [^], etc.) be used? Where can a list of these chacters and examples of their usage be found? |
#5
| |||
| |||
|
|
So now I have to ask: If you are using SSIS 2005 (or 2008), why not use the For Each loop, and let it to loop over all the files in a folder. You can specify an input mask for the types of file, like *.xls, and wether or not to look in sub folders. Then use the Variable mapping tab to assign the Filename (or name and extension, or full path and filename) to a variable. Armed with the name of a particular file, you can then do stuff with it inside the loop. So what would you be trying to do with all "abcd*.txt" files once you identified them? ===== Todd C "Ulysses" wrote: With the * in the value of the SSIS variable it is used, just like a % in SQL Server. I am looking for files in a folder and the variable called file name is set to find any file that is like abcd*.txt. I simply want to know what other pattern matching characters can be used in addition to the * so I can fine tune the search criteria. "Todd C" wrote: Hello Ulysses: Not sure I understand your intent. A variable in SSIS (just like any other programming language) usually contains one and only one value at a time. But that value changes as the program progresses through the logic. So just exactly what type of 'pattern matching' are you trying to accomplish against a variable? Are trying to see if the value at a certain time in your logic contains a certain string of characters? Help me understand. ===== Todd C "Ulysses" wrote: Is * the only pattern matching character that can be used in the value definition of SSIS variables. Can other pattern matching characters such as (# or [] or [!] or [^], etc.) be used? Where can a list of these chacters and examples of their usage be found? |
#6
| |||
| |||
|
|
I am using the For Each Loop and the process you discuss. Thanks. Now can you answer my direct question with a direct answer. Can other pattern matching characters other than *, such as (# or [] or [!] or [^], etc.) be used when defining the value of a SQL 2005 SSIS variable? |
#7
| |||
| |||
|
|
I have never needed any pattern other than a * , but I suppose it should work. Sorry, wish I had a better answer for you. ===== Todd C "Ulysses" wrote: I am using the For Each Loop and the process you discuss. Thanks. Now can you answer my direct question with a direct answer. Can other pattern matching characters other than *, such as (# or [] or [!] or [^], etc.) be used when defining the value of a SQL 2005 SSIS variable? |
![]() |
| Thread Tools | |
| Display Modes | |
| |