Solved

DW intircacies between Sybase and Oracle

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Safearray problem c++ 4 80
Display current date,month,and year to JTextField 3 47
netbeans not showing web project 3 80
missing "main" in Java on Eclipse 4 65
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…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

914 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

18 Experts available now in Live!

Get 1:1 Help Now