I asked this question long time ago but cannot find it again...
having a long sql command that i want to write in multiple lines
like:
msg.topic = "SELECT id, firstname, lastname FROM MyGuests"
as:
msg.topic="
SELECT id, firstname, lastname
FROM
MyGuests"
just to make it more readable
Is that possible and if so, how???
There are a few different ways of doing it.
msg.topic = String.raw`
SELECT id, firstname, lastname
FROM
MyGuests
`;
return msg;
or
msg.topic = "SELECT id, firstname, lastname "+
"FROM "+
"MyGuests";
return msg;
A different option entirely would be to use the Template node where you can enter as many lines as you want.
system
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.