Please give more information:
Which error do you have "when running the query"?
Is it a short dump?
What does it say?
If it's a short dump, it says that you have to search for given terms. Use them to search for SCN first!
Let me guess: I would say it's a "type mismatch" because of XNAME Because you typed it "like textname" while READ_TEXT expects parameter NAME being of type THEAD-TDNAME.