[Denver-pm] Better way to handle vars?
Robert L. Harris
robert.l.harris at gmail.com
Tue Jul 1 15:22:51 PDT 2014
OK, so I'm parsing a ton of data based on patterns in the lines. Given the
line I pull out 3 things,
Timestamp
Key
Value
Right now for one of my patters I have
$Insert="insert into table ( TIMESTAMP, KEY, VALUE ) values ( $Timestamp,
$Key, $Value )";
( effectively ).
I'm going to have about 20+ of these patterns. The actual insert is about
5x longer. Is there a way to "template" the Insert so I can basically
reference the template in the pattern and re-use the template? That way if
the template has to change down the line ( a new field added ) I update the
template and not 20+ variables?
Robert
--
:wq!
---------------------------------------------------------------------------
Robert L. Harris
DISCLAIMER:
These are MY OPINIONS With Dreams To Be A King,
ALONE. I speak for First One Should Be A Man
no-one else. - Manowar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/denver-pm/attachments/20140701/c6a1f353/attachment.html>
More information about the Denver-pm
mailing list