Initializing when Oracle record does not exist

DAN H LAMBSHEAD danhl at rogers.com
Tue Apr 20 09:38:10 CDT 2010


Hi Peter,

  Yes, item b is the link item. Interesting solution. I am not familiar with this concept of a non Oracle file being declared as an external table in Oracle. Will have to try it sometime. In this case I will just make the simple change in the QTP to check if the record does not exist (instead of checking for the link-to item being null).

Thanks

Dan



________________________________
From: Peter Bateman <peterbateman808 at hotmail.com>
To: danhl at rogers.com; PowerHouse List <powerh-l at lists.sowder.com>
Sent: Mon, April 19, 2010 7:26:55 PM
Subject: RE: Initializing when Oracle record does not exist

Hi All:

   Is item b the link item ? 

   I believe QTP is working as described in the manuals. 

   Some of the later versions of Oracle allow for external tables. 
   If you have declare file_a to be an external table in Qracle then you can
   join file_a to Oracle_file_b.

   If you did the the optional join in a cursor and NULLS are allowed in the dictionary 
   definition then QTP and Quiz should work similarly.

   i.e.

   Declare XYZ cursor &
             for select .... from file_a A left join Oracle_file_b B &
                                on A.link_item = B.link_item 

  Access XYZ

________________________________
Date: Mon, 19 Apr 2010 13:12:31 -0700
From: danhl at rogers.com
Subject: Initializing when Oracle record does not exist
To: powerh-l at lists.sowder.com


Hello,

  When linking to an Oracle table where the record does not exist, Quiz and QTP seem to handle it differently. Quiz regards the items in the missing record to be null while QTP initializes them to  " " or 0 (for char or num type) - ie. the old, familiar, non relational db case.

eg. 

Access file_a link to Oracle_file_b optional

define d_b char*5 = "Null" if b of Oracle_file_b is null
                       else    b of Oracle_file_b         

 (I want d_b to be null if b is null, or if the record does not esist)

In Quiz if the record Oracle_file_b does not exist, d_b  will be "Null" 

In QTP it will be " "

Does anyone know why ? I would prefer both Quiz and QTP to act the same way and for Oracle files not existing, initialize to null.

Because of this, I must add a separate condition in QTP either:

  ... or record Oracle_file_b does not exist ...         or
  ... or b of Oracle_file_b = " "

Thanks

Dan


________________________________
Live connected. Get Hotmail & Messenger for mobile. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20100420/78bad6ba/attachment-0001.htm 


More information about the powerh-l mailing list