dbTalk Databases Forums  

Pattern Matching SSIS Variables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Pattern Matching SSIS Variables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ulysses
 
Posts: n/a

Default Pattern Matching SSIS Variables - 04-09-2009 , 10:27 AM






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?

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-10-2009 , 07:29 AM






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:

Quote:
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?

Reply With Quote
  #3  
Old   
Ulysses
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-10-2009 , 12:14 PM



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:

Quote:
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?

Reply With Quote
  #4  
Old   
Todd C
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-10-2009 , 01:27 PM



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:

Quote:
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?

Reply With Quote
  #5  
Old   
Ulysses
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-10-2009 , 10:54 PM



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?

"Todd C" wrote:

Quote:
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?

Reply With Quote
  #6  
Old   
Todd C
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-13-2009 , 09:04 AM



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:

Quote:
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?


Reply With Quote
  #7  
Old   
Ulysses
 
Posts: n/a

Default RE: Pattern Matching SSIS Variables - 04-13-2009 , 02:53 PM



I have not found any other pattern matching character(s) to work in the value
definition of an SSIS variable other than *. I have tested each of the
characters I have asked about and none of them work. I appreciate your
attempt to help but you are guessing and I wanted a definitive answer to this
question.

"Todd C" wrote:

Quote:
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?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.