Y
Yannick Turgeon
Hello,
I'm a newbie and I wanted to get a hash with items having multilines string.
Something like this (air coded) :
SQL = {
"Company" => <<-END_SQL
SELECT Name
FROM Company
WHERE Active = 1
END_SQL
,
"Employee" => <<-END_SQL
SELECT Name, Title
FROM Employee
WHERE Active = 1
END_SQL
}
But it doesn't work. I get an error. I suppose I have to use the "\" line
continuation? I prefer this synthaxe though.
Is there a way to use the "labeled" multiline way in a hash? Any other style
suggestion?
Yannick
I'm a newbie and I wanted to get a hash with items having multilines string.
Something like this (air coded) :
SQL = {
"Company" => <<-END_SQL
SELECT Name
FROM Company
WHERE Active = 1
END_SQL
,
"Employee" => <<-END_SQL
SELECT Name, Title
FROM Employee
WHERE Active = 1
END_SQL
}
But it doesn't work. I get an error. I suppose I have to use the "\" line
continuation? I prefer this synthaxe though.
Is there a way to use the "labeled" multiline way in a hash? Any other style
suggestion?
Yannick