Using string replace fonction whith special char - VisualCron - Forum

Community forum

sdsip
  •  sdsip
  • No customer Topic Starter
2010-03-29T15:20:13Z
Hello.

I would like to use the REPLACE fonction to change CrLf (new line) by semicolon in a string but I dont know how to use special carater CrLf:
{STRING(Replace,{TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut)},CrLf,;)}

TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut) is the result of a SQL query like : Select id from myTable

Thank's.
sdisp.

Support
2010-03-29T15:21:36Z
Try changing the parameter delimiters to a pipe | instead.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
sdsip
  •  sdsip
  • No customer Topic Starter
2010-03-29T15:51:22Z
Henrik, I don't know if I've understand what you want.

I try that:
- i try to put the pipe in the replace string: {STRING(Replace,{TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut)},|,;)} and i have : "Error in argument"

- i try to modify the output of my SQLTasq but for "line break" I only have 3 choice : Cr, Lf and CrLf


Any idee?

Support
2010-03-29T17:06:42Z
I am not sure what you want to do. Do you want semicolon for "line break"?

Cr is the same as \r and Lf is the same as \n - so you could probably use Cr and then replace with \r
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
sdsip
  •  sdsip
  • No customer Topic Starter
2010-03-30T08:28:07Z
Hi.

In fact, the result of my SQL query gives:

1
21
22
23
24
29
30
31
32
33
34
35
36

And I need to have :
1,21,22,23,24,29,30,31,32,33,34,35,36 (I make a mistake I need comma and not semicolon)

So I try:
{STRING(Replace,{TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut)},CrLf,,)}
{STRING(Replace,{TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut)},\n,,)}
{STRING(Replace,{TASK(042a22e7-7380-42ac-9b2a-bae3b65efdb0,StdOut)},\n\r,,)}

So now I have 2 problems!
- I don't know how to define line break in the query
- And the last comma in the query make "Error in argument"

I need that because I want to make an SQL Query like that:
Update table myTable set myFild = xxxx where id IN (1,21,22,23,24,29,30,31,32,33,34,35,36)

Any idee?
Thk.
Support
2010-03-30T11:03:53Z
Maybe that won't work. What we will do for next version is to add comma as alternative in Line break of output of the SQL Task. This version will probably be released later this week.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
sdsip
  •  sdsip
  • No customer Topic Starter
2010-03-30T13:51:53Z
sdsip
  •  sdsip
  • No customer Topic Starter
2010-05-25T16:12:45Z
Hello.

I have just go back on this project, so I updated the server to version 5.6.0
But the use of the comma as a line break in SQL task isn't working

Can you look at the problem.

Thank you
Support
2010-05-25T16:15:50Z
Could you inform us what kind of database provider and type you are using when connecting?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top