If I need to insert into a table, the following works well for text fields where single quotes (apostrophes) may be used:
{
Mstm.SelectSql(new MetastormDefault(),@INSERT INTO YOUR_TABLE
(Column1,Column2)
VALUES (@p1, @p2)",
new QueryParameter("@p1",Local.Variable1),
new QueryParameter("@p2",Local.Variable2)
);
}
Is there a corresponding format for UPDATE? I haven't been able to stumble my way thru the correct syntax - I get a "name" variable error when I try to deploy even though the script validates correctly:
{
Mstm.SelectSql(new MetastormDefault(),@Update YOUR_TABLE set
Column1 = @p1,Column2 = @p2 where Column3 = @p3"
new QueryParameter("@p1",Local.Variable1),
new QueryParameter("@p2",Local.Variable2),
new QueryParameter("@p3", Local.Variable3)
);
}
Thanks for any assistance.