The following should be sufficient, you do not need the join:
Code:
select table1.stk_no
, table1.stk_date
, table1.stk_qty
from table1
where table1.stk_date between '20081101'
and '20081130'
select table1.stk_no
, table1.stk_date
, table1.stk_qty
from table1
where table1.stk_date between '20081101'
and '20081130'
SELECT 'BILLING' as "Repository"
, o.ORDER_ID as "Order ID"
, O.ORDER_DATE as "Date Ordered"
, s.SHIP_DATE as "Date Shipped"
, (s.SHIP_DATE-O.ORDER_DATE) as "Lag Time"
FROM
SELECT 'BILLING' as "Repository"
, o.ORDER_ID as "Order ID"
, O.ORDER_DATE as "Date Ordered"
, s.SHIP_DATE as "Date Shipped"
, (s.SHIP_DATE-O.ORDER_DATE) as "Lag Time"
FROM BILLING_DB.ORDERS o
, BILLING_DB.SHIPPING s
WHERE o.ORDER_ID = s.SHIP_ORDER_ID
select * from myTable where name like '&p%
Leave a comment: