-- queries against the xmlinvoice table

use xmldb
go

select id, invoice::value('
    (: XQuery program :)
  ',
  -- SQL data type
  'int') as invoiceid
 from xmlinvoice
go

select id, invoice::value('
    (: XQuery program :)
 ',
  -- SQL data type

 from xmlinvoice
go

select id, invoice::value('
    (: XQuery program :)

  ',
  -- SQL data type

  invoice::value('
    (: XQuery program :)

  ',
  -- SQL data type
 from xmlinvoice
go