-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements.  See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership.  The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License.  You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied.  See the License for the
-- specific language governing permissions and limitations
-- under the License.    

SELECT t0.shipAddress, t0.oid FROM TORDERXML t0 ORDER BY t0.oid ASC
SELECT t0.oid, t1.oid FROM TORDERXML t0 CROSS JOIN TORDERXML t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR) = CAST((xpath('/*/City/text()',t1.shipAddress))[1] AS VARCHAR)) ORDER BY t0.oid ASC
SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered, t0.shipAddress FROM TORDERXML t0 CROSS JOIN TCUSTOMER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR) = t1.city)
SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered, t0.shipAddress FROM TORDERXML t0 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR) = ?)
SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered, t0.shipAddress FROM TORDERXML t0 WHERE (? = CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR))
