I have a query that starts with a distinct call but I need to pull a text field into the results. However I get an error indicating that I can't use a 'blob' statement with distinct.
Here's the primary code:
select distinct
order_shipments.order_id,
order_shipments.shipment_id,
customer_contacts.customer_id,
trim(trailing from order_shipments.first_name) || ' ' || trim(trailing from orde
r_shipments.last_name),
order_shipments.ship_address_1,
order_shipments.ship_address_2,
order_shipments.ship_address_3,
order_shipments.ship_country,
order_shipments.ship_postal_code,
order_shipments.ship_city,
order_shipments.ship_state,
customer_contacts.day_phone,
upsnoteview.email,
upsnoteview.notification_yes,
upsnoteview.note_type,
'Your order has been shipped. Thanks for your business
. Shipment # ' || order_shipments.shipment_id || ' Order # '|| order_shipments
.order_id || ' Cust # ' || customer_contacts.customer_id,
upsmap.upsid,
carrier_ship_types.saturday_delivery,
upsvaluemap.mappedresult,
upsvalueview.shipment_total,
'Y',
upscodview.cod_flag,
upscodview.cod_total
etc -
Is there anyway to include a TEXT field in this sql statement as that I can pull some other order comments into my shipping interface?
Thanks in advance.
-gina
Here's the primary code:
select distinct
order_shipments.order_id,
order_shipments.shipment_id,
customer_contacts.customer_id,
trim(trailing from order_shipments.first_name) || ' ' || trim(trailing from orde
r_shipments.last_name),
order_shipments.ship_address_1,
order_shipments.ship_address_2,
order_shipments.ship_address_3,
order_shipments.ship_country,
order_shipments.ship_postal_code,
order_shipments.ship_city,
order_shipments.ship_state,
customer_contacts.day_phone,
upsnoteview.email,
upsnoteview.notification_yes,
upsnoteview.note_type,
'Your order has been shipped. Thanks for your business
. Shipment # ' || order_shipments.shipment_id || ' Order # '|| order_shipments
.order_id || ' Cust # ' || customer_contacts.customer_id,
upsmap.upsid,
carrier_ship_types.saturday_delivery,
upsvaluemap.mappedresult,
upsvalueview.shipment_total,
'Y',
upscodview.cod_flag,
upscodview.cod_total
etc -
Is there anyway to include a TEXT field in this sql statement as that I can pull some other order comments into my shipping interface?
Thanks in advance.
-gina