sample_docs tables  Publishers table representation

Appendix A: The sample_docs Example Table

Table script (for publishers table)

These two insert statements add a row for the publishers table and a row for the authors table to the the sample_docs table. Each row contains a column that identifies the row (‘publishers’, ‘authors’), and a text_doc column

that provides an XML representation of the corresponding pubs2 table. You can generate the XML document by calling the Java forxmlj function.

insert into sample_docs (name_doc, text_doc)
    values ('publishers',
    forxmlj('select * from pubs2..publishers',
            'tablename=publishers'))

insert into sample_docs (name_doc, text_doc)
    values ('authors', 
    forxmlj('select title_id, title
             type, pub_id, price,
             advance, total_sales
             from pubs2..authors',
            'tablename=authors')

NoteThis script uses the forxmlj function, which is a Java-based function that you must install before you can use. See Appendix B, “Setting up XML Services,” for instructions on installing this function.





Copyright © 2005. Sybase Inc. All rights reserved. Publishers table representation

View this book as PDF