Solved

DW intircacies between Sybase and Oracle

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DirectXFramework 5 102
edit html 3 122
Remove unused usings from code in MonoDevelop 8 409
Visual Studio 2013 5 68
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now