So to at least break the silence, I was asked today if I could insert xml via sql given a properly designed table, such as this in RPG:
insert into test.table (XMLVAL)
...and I said 'sure' - because I always do the dumbest thing possible. And I did it in an interactive session, no problem.
I've read a bit about this, but never done it, so I was not surprised when I did a SELECT * on the table, I got:
...and I'm fine with that, but the question is how do I extract the values? According to what I've read, the type of SELECT I'm accustomed to should work, so I'm expecting, if I do:
SELECT V1 FROM TEST.TABLE
that I would get 123456789.
but I get an error 'Column or Global Variable V1 not found'. In fact, I can't get any statement to work, other than SELECT *, which gives me the results above. How do I format a statement to retrieve the values - or the entire xml, if that's what I have to do - that I just inserted?