ON 20050602@11:45:01 AM at page: http://www.sxlist.com/scenix/lib/math/div/16by8lz.htm#38505.4775 James Newton[JMN-EFP-786] removed post 38505.4775 |Delete 'vimlesh_78@yahoo.com asks:
Run time Error : 3706 syntax error How can I solved it ? also syntax for create temp table.
-----------------------------------------
CREATE GLOBAL TEMPORARY TABLE VIMLESH AS
(
SELECT
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.NPA ||
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.NXX ||
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.LINE ||
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.CUSTCODE "BTN",
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.BILLNAME "CUSTOMER NAME",
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.EFFBILL_DATE "BILL DATE",
ACCESS_VIEWS.VPTC001_CUSTOMER_BR.CTF_APLY_IND "ELIGIBLE",
ACCESS_VIEWS.V85520_CRIS_SALES_WEST.USOC "USOC",
sum(ACCESS_VIEWS.V85520_CRIS_SALES_WEST.QTY) "QUANTITY OF USOC"
FROM
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST,
ACCESS_VIEWS.VPTC001_CUSTOMER_BR,
ACCESS_VIEWS.V82A09_BILL_NM_ADDR_EOM_CURR,
ACCESS_VIEWS.V85520_CRIS_SALES_WEST
WHERE
( ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.NPA = ACCESS_VIEWS.VPTC001_CUSTOMER_BR.NPA
And
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.NXX = ACCESS_VIEWS.VPTC001_CUSTOMER_BR.NXX
And
ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.LINE = ACCESS_VIEWS.VPTC001_CUSTOMER_BR.LINE)
AND ( ACCESS_VIEWS.V85520_CRIS_SALES_WEST.DIVCODE=ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.DIVCODE)
AND ( ACCESS_VIEWS.V85520_CRIS_SALES_WEST.SONBR=ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.SONBR )
AND ( ACCESS_VIEWS.V85520_CRIS_SALES_WEST.POSTDATE=ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.POSTDATE )

AND ( ACCESS_VIEWS.V85510_CRIS_SO_NUMBER_WEST.CUSTYPE1 IN ('2','9') )
AND ( ACCESS_VIEWS.V82A09_BILL_NM_ADDR_EOM_CURR.BILLED_STATE = 'CA'
AND ACCESS_VIEWS.V85520_CRIS_SALES_WEST.USOC IN ('JUL', 'CLT', 'NPU') )
AND ACCESS_VIEWS.VPTC001_CUSTOMER_BR.CTF_APLY_IND= 'Y'
GROUP BY 1, 2, 3, 4, 5
)
'