Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 03-16-2005, 04:55 PM Help with SELECT
Junior Talker

Posts: 2
Trades: 0
we have Oracle where we are trying to get some data and we used following SELECT statement to get that data.

SELECT Case when AR.RA_CUSTOMERS.creation_date not between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') or AR.RA_CUSTOMERS.last_update_date not between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') then '' else Case when AR.RA_CUSTOMERS.creation_date = AR.RA_CUSTOMERS.last_update_date then 'Cust Add' else 'Cust Chg' End end as "CustChg", Case when RA_ADDRESSES_ALL.CREATION_DATE between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') or RA_ADDRESSES_ALL.LAST_UPDATE_DATE between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') and RA_ADDRESSES_ALL.CREATION_DATE = RA_ADDRESSES_ALL.LAST_UPDATE_DATE then 'Addr Add' else 'Addr Chg' End as "AddrChg", RA_CUSTOMERS.CREATION_DATE CUSCD,RA_CUSTOMERS.LAST_UPDATE_DATE CUSLU,RA_ADDRESSES_ALL.CREATION_DATE addrcd,RA_ADDRESSES_ALL.LAST_UPDATE_DATE addrlu, to_char(RA_CUSTOMERS.CUSTOMER_ID) CUSTID, RA_CUSTOMERS.CUSTOMER_NAME, RA_CUSTOMERS.CUSTOMER_NUMBER, to_char(RA_ADDRESSES_ALL.ADDRESS_ID), RA_ADDRESSES_ALL.CREATED_BY, RA_ADDRESSES_ALL.ADDRESS1, RA_ADDRESSES_ALL.ADDRESS2, RA_ADDRESSES_ALL.ADDRESS3, RA_ADDRESSES_ALL.ADDRESS4, RA_ADDRESSES_ALL.COUNTRY, to_char(RA_SITE_USES_ALL.SITE_USE_CODE), RA_SITE_USES_ALL.SITE_USE_ID, RA_CUSTOMERS.CUSTOMER_PROSPECT_CODE, RA_ADDRESSES_ALL.CITY, RA_ADDRESSES_ALL.POSTAL_CODE, RA_ADDRESSES_ALL.STATE, RA_ADDRESSES_ALL.PROVINCE, RA_ADDRESSES_ALL.COUNTY, RA_CUSTOMERS.STATUS CUST_STATUS, RA_ADDRESSES_ALL.STATUS ADDR_STATUS, RA_SITE_USES_ALL.STATUS SITE_STATUS, RA_SITE_USES_ALL.LOCATION, RA_CUSTOMERS.SALES_CHANNEL_CODE, RA_SITE_USES_ALL.DEMAND_CLASS_CODE FROM AR.RA_ADDRESSES_ALL, AR.RA_CUSTOMERS, AR.RA_SITE_USES_ALL WHERE RA_CUSTOMERS.CUSTOMER_ID = RA_ADDRESSES_ALL.CUSTOMER_ID AND RA_ADDRESSES_ALL.ADDRESS_ID = RA_SITE_USES_ALL.ADDRESS_ID and (AR.RA_CUSTOMERS.creation_date between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') or AR.RA_CUSTOMERS.last_update_date between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') or RA_ADDRESSES_ALL.CREATION_DATE between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy') or RA_ADDRESSES_ALL.LAST_UPDATE_DATE between to_date('03/01/2004','mm/dd/yyyy') and to_date('04/01/2004','mm/dd/yyyy'))


But when I am trying to put it in ASP its not working and giving errors like: Missing right parenthesis" or "Invalid relational object" is there any way that we can pull all data and apply the same CASE logic (as in the SELECT statement) throught ASP?
Sure would appreciate your help. THanks...
robrob is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Help with SELECT
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09313 seconds with 12 queries