I execute some SQL select commands that outputs a single value. It is just a word with some spaces. I use a Replace filter to trim the trailing spaces.
I need to declare that value (or word) as a Global Variable.
I see there is the Capture to Variable filter. But do not know a way to set it as just the resulting text at that step within the filter.
Thank you
Current Text to Global Variable ?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Ok, I made it!
Instead of using the Capture Text filter aproach, I used a Perl Pattern Replace filter to find the first line of the current input text and asigned it to a Named Variable. I replaced it with nothing. Then I added an Add Header filter as a subfilter with the SQL Select statement with references to the @named_variable.
Then the SQL Connection was next at the end to execute it.
It took me a while, but it is working.
Thank you.
Instead of using the Capture Text filter aproach, I used a Perl Pattern Replace filter to find the first line of the current input text and asigned it to a Named Variable. I replaced it with nothing. Then I added an Add Header filter as a subfilter with the SQL Select statement with references to the @named_variable.
Then the SQL Connection was next at the end to execute it.
It took me a while, but it is working.
Thank you.