David,
I am afraid Derby doesn't implement variables - I had been looking for this
myself also some time back when writing Derby scripts for test data
creation/manipulation. I finally ended up writing small Java programs where
needed instead of or on top of just scripts. Since a couple of days I am using
Squirel as front-end rather than ij and this tool has a script plug-in which
sounds interesting, but I have not really looked into this plug-in yet whether
it would provide any help when it comes to variables. When I asked basically the
same question you just did to the derby community there was a mention that it
should not be too hard to enhance ij to offer this support - however I have not
raised a feature request and to the best of my knowledge this didn't go any
further than the communication on the user mailing list itself. I would be
willing to help document/test such feature, but can't program myself as I am not
a programmer.