Solved

DW intircacies between Sybase and Oracle

Posted on 2002-05-14
6
476 Views
Last Modified: 2013-12-26
I have a DW that pulls out some segments of data on the pull.

3 lines cause me an Invalid Datawindow Row/Column error when I run the application.

SELECT <Various Column names>,
     charindex( FAST.account_request.status,"xndaper"),  
     datepart(mm, FAST.account_request.requested_date),  
     datepart(dd, FAST.account_request.requested_date),  
     datepart(yy, FAST.account_request.requested_date)

These lines Oracle doesn't like in the Datawindow.

Any solution please?
0
Comment
Question by:valiant_at_mci
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Bhatti
ID: 7010495
Please check the name of the column. May be false.
And/or also may the row does not exist.


0
 
LVL 2

Expert Comment

by:Caseys95
ID: 7014753
Oracle does not recognize 'Charindex' or 'Datepart'
CharIndex(...) = InStr(...)
DatePart(...)  = To_Number( To_Char( ... ))

AND the parameter lists are different.

For Oracle why don't you try:

Option 1:
SELECT <Various Column names>,
    InStr("xndaper", FAST.account_request.status),  
    To_Number( To_Char(FAST.account_request.requested_date, 'mm') ),  
    To_Number( To_Char(FAST.account_request.requested_date, 'dd') ),  
    To_Number( To_Char(FAST.account_request.requested_date, 'yy') )

Option 2:
You could also create wrapper functions in Oracle to replicate the functions 'CharIndex' and 'DatePart'. This would be the prefered syntax if the datawindow needs to run in both environments.

Option 3:
You might also change the SQLSelect dynamically just before the retrieve.

ls_SQL = dw_1.Object.Datawindow.Table.Select
...
dw_1.Object.Datawindow.Table.Select = ls_SQL

ll_Return = dw1.Retrieve()
0
 

Author Comment

by:valiant_at_mci
ID: 7089189
Could you elaborate more on the use of to_number and Instr?

I inserted the text as it appears above, and of course it didn't take.  

Modifying the SQL on the fly is something that can be done, but won't it error out when it goes to retrieve anyhow?

Thanks much
0
 
LVL 2

Accepted Solution

by:
Caseys95 earned 100 total points
ID: 7097498
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question