[Zope] Refer to sequence-index within SQLmethod?

Jerry.Spicklemire@IFLYATA.COM Jerry.Spicklemire@IFLYATA.COM
Fri, 14 Jan 2000 17:18:14 -0500


Hi again,

Perhaps if I get in the habit of adding more detail in the first message, a
higher number of Zenful types will feel they have enough information to
hazard a guess.

Better late than never, so here's a sample of the code in the SQL Query
Template Edit Box :

update user_login_table set unique_row_id = <dtml-sqlvar
"_.string.zfill(_.str(_.int('sequence-index')),9)" type=nb>

and, here are even more ways to try adding a "sequence-item" argument into
the ZSQLmethod Edit Window that don't work :

_.getitem(sequence-index)
,

"_.getitem(sequence-index)"
,

expr=_.getitem(sequence-index)
,

expr="_.getitem(sequence-index)"
,

and,

"expr=_.getitem(sequence-index)

BTW, the question is bound to come up, as in, "Why in the name of Zope do
you need to do this?"

Wouldn't the world would be a lovely place if every table that any Desktop
Database user had ever misconceived included a Record ID? Alas no. The
shameful truth is, all I'm really trying to do is stuff a string that's
predictably exclusive into each row, so that I can comfortably fall back
into my bad old habits from dBase days, and easily retrieve single records
for processing . . .

Thanks for any clues!
Jerry S.