Solved

DW intircacies between Sybase and Oracle

Posted on 2002-05-14
6
464 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
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

777 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