Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Window SQL Code Error

Status
Not open for further replies.

bigpapi

Programmer
Aug 1, 2006
16
CA
I have the following data window with SQL code that is giving me some wierd errors.

Here are the errors:
ORA-00936: missing expression
ORA-00904: "ISNULL": invalid identifier


and here is the code:


SELECT customer.customer_search,
account_customer.account_number,
Substring( customer_alias.cust_alias_last_name + ',', Sign( Charindex( ',', customer_alias.cust_alias_last_name + ',' ) -1), Charindex( ',', customer_alias.cust_alias_last_name + ',' ) ) + IsNUll(Customer_alias.cust_alias_first_name, '') + IsNull(customer_alias.cust_alias_middle_name, '') 'Mail Name',
account_customer.customer_number,
customer_mailing_address.non_address_information,
acct_customer_mail_instr.account_customer_id,
Convert(varchar(20), account_customer.customer_number) + space(20) + Convert(varchar(20), acct_customer_mail_instr.account_customer_id) 'account_customer_computed',
acct_customer_mail_instr.customer_alias_id,
acct_customer_mail_instr.effective_date,
acct_customer_mail_instr.end_date,
acct_customer_mail_instr.account_bill_copy,
acct_customer_mail_instr.billing_method_type,
acct_customer_mail_instr.mailing_addr_id,
acct_customer_mail_instr.acct_cust_mail_instr_id,
customer_mailing_address.mailing_addr_online_addr 'Alternate Mailing Address'
FROM account_customer,
acct_customer_mail_instr,
customer,
customer_alias,
customer_mailing_address

WHERE (account_customer.account_number = :anv_acct_no) and
(account_customer.customer_number = customer.customer_number) and
(account_customer.customer_assoc_type = 'MAIL') and
(account_customer.account_customer_id = acct_customer_mail_instr.account_customer_id) and
(customer_alias.customer_alias_id =* acct_customer_mail_instr.customer_alias_id) and
(acct_customer_mail_instr.mailing_addr_id = customer_mailing_address.mailing_addr_id)



Hopefully someone can help
thanks
 
My guess is how you are constructing your 'Mail Name' field. Can you run the query in an ISQL (or similar) session?

Matt

"Nature forges everything on the anvil of time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top