Both refer between columns in Model function

Hello,
Here is my SQL to create and insert :
CREATE TABLE "SYSTEM"."PMUOrdinaireTMP111111"
   ( "IDENTIFIANTACTIONNAIRE" NUMBER(23,0),
  "NUMEROECRITURE" NUMBER(8,0),
  "SENSOPERATION" VARCHAR2(20 BYTE),
  "PRIXREVIENT" NUMBER(19,2),
  "NOMBRETITRES" NUMBER(15,0),
  "SOLDE" NUMBER(20,0)
insert into PMUSALARIAUXTMP111111 values (10,1004848,'I',0,1,1);
insert into PMUSALARIAUXTMP111111 values (10,1123692,'I',721,1,2);
insert into PMUSALARIAUXTMP111111 values (10,1150237,'I',0,1,3);
insert into PMUSALARIAUXTMP111111 values (10,1185011,'I',0,1,4);
insert into PMUSALARIAUXTMP111111 values (10,1377533,'I',703,1,5);
insert into PMUSALARIAUXTMP111111 values (10,1426786,'R',0,5,0);
insert into PMUSALARIAUXTMP111111 values (10,1901940,'I',0,1,1);
insert into PMUSALARIAUXTMP111111 values (10,2172420,'R',0,1,0);
insert into PMUSALARIAUXTMP111111 values (10,2953958,'I',0,1,1);
I then apply This SQL to get desired result :
select
  IDENTIFIANTACTIONNAIRE,
  NUMEROECRITURE,
  SENSOPERATION,
  NOMBRETITRES,
  PRIXREVIENT,
  Solde,
  PrixRevDevOrigine,
  PrixRevEuro,
  CumulEuro,
  PMUEuro,
  PMUEuroArrondi,
  flag
  from PMUOrdinaireTMP111111
model partition by (IDENTIFIANTACTIONNAIRE)
       dimension by (row_number() over (partition by IDENTIFIANTACTIONNAIRE order by NUMEROECRITURE) rid)
       measures(NUMEROECRITURE,
                SENSOPERATION,
                PRIXREVIENT,
                NOMBRETITRES,
                Solde,
                0 PrixRevDevOrigine,
                0 PrixRevEuro,
                0 CumulEuro,
                0 PMUEuro,
                0 PMUEuroArrondi,
                nvl(last_value(case when SENSOPERATION = 'R'
                                    then 'R'
                               end ignore nulls
                              ) over (partition by IDENTIFIANTACTIONNAIRE order by NUMEROECRITURE),
                    'I'
                   ) flag
rules sequential order
PrixRevDevOrigine[any] order by NUMEROECRITURE = case when SENSOPERATION[cv()] = 'R'
                                                      THEN 0
                                                      ELSE PRIXREVIENT[cv()] END,
PrixRevEuro[any] order by NUMEROECRITURE = NombreTitres[cv()]*PrixRevDevOrigine[cv()],  
CumulEuro[any] order by NUMEROECRITURE = case WHEN Solde[cv()] = NombreTitres[cv()] and SENSOPERATION[cv()] = 'I'
                                              THEN NombreTitres[cv()]*PrixRevEuro[cv()]
                                              when SENSOPERATION[cv()] = 'I'
                                              THEN CumulEuro[cv()-1]+PrixRevEuro[cv()]
                                              WHEN SENSOPERATION[cv()] = 'R' THEN PMUEuroArrondi[cv()-1] END ,
PMUEuro[any] order by NUMEROECRITURE = case when Solde[cv()] = 0
                                                      THEN 0
                                                      ELSE CumulEuro[cv()]/Solde[cv()] END,
PMUEuroArrondi[any] order by NUMEROECRITURE = trunc(PMUEuro[cv()],2)        
I was hoping to get this result :
IdentifanActionnaire
NumeroEcriture
SensOperation
NOMBRETITRES
PRIXREVIENT
Solde
PrixRevDevOrigine
PrixRevEuro
CumulEuro
PMUEuro
PMUEuroArrondi
flag
10
1004848
I
1
0
1
0
0
0
0
0
I
10
1123692
I
1
721
2
721
721
721
360,5
360,5
I
10
1150237
I
1
0
3
0
0
721
240,333333
240,33
I
10
1185011
I
1
0
4
0
0
721
180,25
180,25
I
10
1377533
I
1
703
5
703
703
1424
284,8
284,8
I
10
1426786
R
5
0
0
0
0
0
284,8
284,8
R
10
1901940
I
1
0
1
0
0
0
0
0
R
10
2172420
R
1
0
0
0
0
0
0
0
R
10
2953958
I
1
0
1
0
0
0
0
0
R
But I get this :
IdentifanActionnaire
NumeroEcriture
SensOperation
NOMBRETITRES
PRIXREVIENT
Solde
PrixRevDevOrigine
PrixRevEuro
CumulEuro
PMUEuro
PMUEuroArrondi
flag
10
1004848
I
1
0
1
0
0
0
0
0
I
10
1123692
I
1
721
2
721
721
721
360,5
360,5
I
10
1150237
I
1
0
3
0
0
721
240,333333
240,33
I
10
1185011
I
1
0
4
0
0
721
180,25
180,25
I
10
1377533
I
1
703
5
703
703
1424
284,8
284,8
I
10
1426786
R
5
0
0
0
0
0
0
0
R
10
1901940
I
1
0
1
0
0
0
0
0
R
10
2172420
R
1
0
0
0
0
0
0
0
R
10
2953958
I
1
0
1
0
0
0
0
0
R
I think the reason is that CumulEuro is calling PMUEuroArrondi and also PMUEuro is calling CumulEuro when the column "SensOperation"  = R. As simple, When "SensOperation"  = R then I only trunc the previous PMUEuroArrondi value.
Regards,
Any Help

Sorry, i probably dont understand your question.
You ask for the value marked in red.
This is the PMUEuro column.
The rule for this column is
PMUEuro[any] order by NUMEROECRITURE = case when Solde[cv()] = 0
                                                      THEN 0
                                                      ELSE CumulEuro[cv()]/Solde[cv()] END,
As Solde in the specific row is 0 you got 0 here according to your rule.

Similar Messages

  • Nonlinear fit model function

    Hi, I'm trying to use a custom fit - fitting modified error function to the provided data. 
    For the nonlinear fit I need a model fitting function VI, which I created from template (attached LM_erf_model.vi). 
    I have a problem connecting the reference for the attached function to f(x,a) input of the Levenberg-Marquardt
    nonlinear fit VI - I can't create the proper reference and end up with
    You have connected a refnum of one type to a refnum of another type and both types are members of some class hierarchy, but there is neither a simple up cast nor type cast between the two classes. 
    What's the proper way of creating the reference for this model function to be used in marquardt test .vi?
    Regards
    Michal 
    Message Edited by mdwuznik on 01-29-2009 01:07 AM
    Solved!
    Go to Solution.
    Attachments:
    LM_erf_model.vi ‏121 KB
    marquardt_test.vi ‏16 KB

    It is typically much easier to place a static VI reference on the diagram, then
    right-click...browse for path...point to the model VI
    right-click the static reference and make it strict (red star)
    hook it up the the nonlinear fitting VI, ignore the coercion dot.
    Your model functions is overly complicated. Index array is resizeable, so get the three parameters before the loop at once. No need to index the same element with every itreation of the loop. I would recommend not to use a formula express VI.
    Do you have some typical data?
    Message Edited by altenbach on 01-28-2009 05:50 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    modelFnc.png ‏4 KB
    modelfnc2.png ‏7 KB

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • Add Column with Varchar2 function

    i created a program unit (function) that returns a varchar2(100). How do i create a link between the function and a new column on the report for each record? I created a query that returns two columns now i want to apply this function to a third column to get some formatted text.

    Make sure the column type property for the formula column is set to CHARACTER, and the width is set to 100 to match up with your function. And the PL/SQL prolog of the formula column should read:
    function CF_<some_name>Formula return Char is
    FYI, in Reports, CHAR and VARCHAR get formatted the same way (e.g., trailing blanks are ignored).

  • How to add some text between columns in dashboard prompt?

    Hi,
    OBIEE version:10.1.3.4.1
    Can we add some words between columns in dashboard prompt?
    like, I want to add OR, make sure user not to select different month, if selected the different months it will make the report no data.
    Month OR Date Range(this is a calendar)
    Does anyone have any idea about this?
    Thanks in advance!
    Regards,
    Anne

    Hi,
    If you are using the prompts with presentation variables or referring only the columns separately then you can create individual prompts and place static text between them.
    But if you need to have both the prompt columns together then create the prompts and use 'space' as the label names for both.(ie prompts would appear but the name wont appear). And create a static text in the page or in a report and place in the page. Which appears as the name of the prompt with 'OR' between the prompt names.
    This should solve your problem.
    Edited by: MuRam on Jan 13, 2012 10:18 AM

  • Howto map to an odata model function import returning an entity, not an entity set?

    Hi,
    how do I map to an odate model function import returning an entity (not an entity set) in a XML view? I tried property mapping {/method/property}, which does not make a network request and sets the value to null and I tried aggregation mapping {/method}, which makes a network request with $skip=0&$top=100&$inlinecount=allpages which is of course rejected by the odata source.
    Thanks,
    Wolfgang

    Hello Dr. Wolfgang,
    you can use
      var oParams = {};
      oParams.Field1 = 'ABC';
      oParams.Field2= 'XYZ';
      oParams.Field3= '123';
      oModel.callFunction('MyFuncImport', 'GET', oParams, null, function(oResponse){
            alert("Call to Func Imp successful");
        },function(){
            alert("Call to Func Imp failed");});
    also refer SAPUI5 SDK - Demo Kit
    Regards,
    Chandra

  • Curve fitting problem: simultaneously fitting two datasets to two different model functions with shared parameters

    Hello! As stated above, I have the following problem: I have 2 sets (different systems) of measurement data (Voltages measured as functions of applied frequency). I would like to make curve fits with Levenber-Marquardt-method to both datasets (the datasets have the same x-values = frequencies), fitting the 2 datasets to their own separate model functions. However, the different model functions should have same values for the shared parameters (this prevents me from doing 2 totally separate curve fittings).
    I have LabVIEW version 7.1, if anybody could help me with the problem, I would appreciate it very much. Thank you!

    Would you like to try this:
    http://forums.ni.com/t5/LabVIEW/levenberg-Marquardt/td-p/668782
    http://zone.ni.com/reference/en-XX/help/371361G-01/gmath/nonlinear_curve_fit/
    http://digital.ni.com/public.nsf/allkb/BACF6FDF1B40993686256CC300657BA4
    With LV 7.1, I don't know if we have a such feature with that version. Please check out for the latest LV versions.
    BR,
    Make Nguyen
    NI Finland Technical Support

  • Event Action Filters (difference between column Active & Enabled?)

    I have a IPS4260, running v6.0(3).
    Under "Configuration" > "Event Action Rules" > "Event Action Filter".
    What is the difference between column "Active" and "Enabled"? This is confusing.

    Event action filters are evaluated in a specified order. Active means that a filter participates in the order. Enabled means that it can perform a filtering action. Use Disable when you want to preserve the order, but not perform the action (e.g. if you want to turn it off for debugging, but want to keep it's place in the list later). Use Inactive when you don't want the filter in the ordering at all (e.g. if you want to keep it as a reminder, but don't plan to use it again). The filter list is displayed by CLI and IDM in logical order - first all of the Active filters in their specified order, and then all of the Inactive filters. I don't think the designers really intended to have 2 similar options; it is more a side effect of the data model used for storing the configuration.

  • Is there any Data Mapping document Between S&OP ( model that uses supply planning operator ) and SAP ECC that I will help the client in Data Mapping activity.

    Hello All,
    Is there any Data Mapping document Between S&OP ( model that uses supply planning operator ) and SAP ECC that I will help in Data Mapping activity.
    Thanks,
    Mownesh

    There are standard templates in HCI data sources.
    e.g. 1) Customer Master data template is SOP_MD_CustomerMaster for extracting master data from SAP ECC and load it to S&OP
    KNVP is the table for customer in ECC from that you can select the fields as required
    KUNNR for customer Number
    ADRNR for Address
    List of a few commonly used table names of ECC:
    Product Related:
    MARA – Material Master (MATNR)
    MARC – Material Master with Plant Data (MATNR, WERKS)
    MARD – Material Master with Storage Location Data (MATNR, LGORT, WERKS)
    MAKT – Material Master Material Descriptions (MATNR, MATKL)
    MBEW – Material Valuation Data (MATNR, BWTAR)
    MVKE – Material Master : Sales related Data
    MDKP, MDTB – MRP related Data( Header, Item)
    MCHA, MCHB – Material Batches (Header, Item) (MATNR, WERKS, LGORT, CHARG)
    Vendor/Supplier related:
    LFA1 – vendor data (LIFNR)
    LFB1 --  Company Code Segment : Vendor Data(LIFNR, BUKRS)
    LFC1 --  FI Related Vendor Data (LIFNR, BELNR)
    LFM1 – Pur. Orgn. Related Vendor Data (LIFNR, EKORG)
    PReq/PO, BOM Related:
    EBAN – Pur. Req. Data( BANFN, BNFPO, BADAT, MATNR)
    EINA – Purchase Info. Record(General Data)(INFNR, MATNR, LIFNR)
    EINE – Purchase Info. Record (pur. Orgn. Data) (INFNR, EKORG)
    ELBK, ELBN, ELBP – Vendor Evaluation Related Data
    EKKO – PO Data (Header) (EBELN, BSTYP, BSART)
    EKPO – PO Data (Item) (EBELN, EBELP, MATNR)
    Pur. Req., RFQ and PO are differentiated by Doc Type (BSTYP) in EKKO table.
    For RFQ it is ‘A’ and for PO it is ‘F’
    MKPF – GRN Data (Header) (EBELN, BLDAT, BUDAT, XBLNR, BKTXT)
    MSEG – GRN Data(Item) MBLNR, BWART, LIFNR, MATNR, EBELN)
    Apart from this there are lot of tables which begin with ‘M’ & ‘E’, but we
    use the following very often.
    EQUK – Quota (Header)(QUNUM, MATNR)
    EQUP – Quota (Item) (QUNUM, QUPOS, LIFNR)
    EKBE – PO History Data (EBELN, EBELP, BELNR, BLDAT, MATNR, VGABE)
    EKBZ – PO History with Delivery Costs(EBELN, BELNR, LIFNR, XBLNR)
    EKET – Schedule lines data of a PO(EBELN, EINDT, SLFDT)
    EKES – Vendor Confirmations Data (EBELN, EBTYP, EINDT, XBLNR)
    T163F – Confirmation Texts (EBTYP, EBTXT)
    T156 – Movement Types (BWARE)
    T024 – Purchasing Groups
    T024E – Purchase Organizations
    T163 – Item Category’s in Purchasing Documents(PSTYP)
    T149D – Valuation Types
    T134 – Material Types
    FVLK – Delivery Types
    STKO, STPO – BOM(Bill Of Material) related Data (Header & Item)
    STPU, STPN, STST, STZU – BOM Related Tables
    RKPF, RBKP, RSEG (Header & Item) – MM – FI Related Data
    KONO, KONH – Pricing data
    T006 – Basic Unit Of Measurements
    Customer/Sales Order Related:
    VBAK : Sales Document(Header Data) (VBELN)
    VBAP : Sales Document(Item Data) (VBELN, POSNR, MATNR, ARKTX, CHARG)
    Enquiry, Quotation, Sales Order are differentiated based on Doc.
    Type(VBTYP Field) in VBAK, VBAP Tables for Enquiry VBTYP = A, for Quotation ‘B’ & for Order it is ‘C’.)
    LIKP : Delivery Table(Header Data) (VBELN, LFART, KUNNR, WADAT, INCOL)
    LIPS : Delivery Table(Item Data)(VBELN, POSNR, WERKS, LGORT, MATNR, VGBEL)
    (LIPS – VBGELN = VBAK- VBELN, LIPS-VGPOS = VBAP-POSNR)
    VTTK : Shipment Table(Header Data) (TKNUM)
    VTTP : Shipment Table (Item Data)(TKNUM, TPNUM, VBELN)
    (VTTP – VBELN = LIKP – VBELN)
    VBRK : Billing Table(Header Data) (VBELN, FKART, BELNF)
    VBRP : Billing Table(Item Data) (VBELN, POSNR, FKIMG, NEWR, VGBEL, VGPOS)
    (VERP – AUBEL = VBAK- VBELN, VBRP – VBEL = LIKP – VBELN)
    Apart from these tables there are lot of other tables which starts with ‘V’, but we use the
    following tables frequently.
    VBUK: All Sales Documents status & Admn. Data(Header) (VBELN, VBTYP)
    VBTYP = ‘C’ (Sales Order) VBTYP = ‘L’(Delivery) VBTYP = ‘M’(Invoice)
    VBUP: Sales Documents status & Admin. Data(Item) (VBELN, POSNR)
    VBEP : Sales Document Schedule Lines Data (VBELN, POSNR, EDATU, WMENG)
    VBKD: To get sales related Business data like Payment terms etc.(VBELN, ZTERM)
    VBFA: Sales Document flow data(VBELV, VBELN, POSNV, VBTYP)
    VBPA: Partner functions Data(VBELN, PARVW, KUNNR, LIFNR)
    TVLKT: Delivery Type: Texts(LFART, VTEXT)
    KNA1, KNB1, KNC1 : Customer Master Data and Other Partner’s Data(KUNNR,
    NAME1,LAND1)
    KNVK: Customer Master Contact Person(PARNR, KUNNR)
    KNVV: Customer Master Sales Data.
    LFA1, LFB1, LFC1: Vendor Master Data(To get Transporter data)(LIFNR, NAME1, ORT01)
    MARA, MARC, MARD : Material Master Data(Basic, Plant, St. Location Views)
    TVKO: Sales Organizations(VKORG)
    TVKOV: Distribution Channels(VTWEG)
    TVTA: Divisions(SPART)
    TVKBZ: Sales Office(VKBUR)
    TVBVK: Sales Group(VKGRP)
    T077D: Customer Account Group(KTOKD)
    T001W: Plants(WERKS)
    T001L: Storage Locations(LGORT)
    TWLAD: To get address of Storage Location and Plant(LGORT, ADRNR)
    TVAU: Sales Document (Order) Types
    KONV: Condition Types (pricing) (KNUMV, KSCHL, KWETR)
    T685T: Condition Types Texts.
    ADRC: To get Addresses of Partners
    VBBE, VBBS: Sales Requirements Data
    VBKA: Sales Activities Data
    VBPV: Sales Document Product Proposal
    Based on the functionality you can search ECC table names and fields
    Hope this information is helpful for you.
    Thanks and Regards,
    Anjali

  • Adobe 3D Reviewer: No "reduce model" function like in 3D Toolkit?

    I'm using Adobe 3D Reviewer to prepare 3D models. I'm trying to reduce the file size of a gigantic 3D model. But it appears that Adobe 3D Reviewer does not have the "reduce model" function that was available in Acrobat 3D Toolkit to reduce mesh size.
    Any thoughts or tips?
    Thanks!
    K

    You are correct, there are no tools in 3D Reviewer to reduce mesh size except for the compression option available for both PRC and U3D when exporting to PDF.
    To export to PDF from 3D Reviewer and use the compression option, please follow these steps:
    1) open your model in 3D Reviewer
    2) go to File>Export
    3) choose PDF for the file type
    4) click on Options (lower left corner)
    5) ckick on Options (again)
    6) select PRC Tessellation for the Format
    7) check the box Compress Tessellation
    8) uncheck the other box
    9) click OK
    10) click OK (again)
    11) click Save
    Hope this helps

  • How to make paragraphs line up between columns?

    I want to make a 2 column chapter, with the text in each column in its own flow. But then I want some of the paragraphs to line up between columns.
    So, like this:
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    yyyyyyyyy
    yyyyyyyyy
    xxxxxxxxxx
    xxxxxxxxxx
    xxxxxxxxxx
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    I'm assuming I can't use side heads to put the first column text in, because the info on the left goes on for multiple paragraphs, and I can't seem to line up a block of paragraphs with the baseline of the appropriate right column text.
    I used to do this in tables, like this:
    xxxxxxxxxx ! yyyyyyyyy
    xxxxxxxxxx ! yyyyyyyyy
    xxxxxxxxxx ! yyyyyyyyy
    ! yyyyyyyyy
    ! yyyyyyyyy
    xxxxxxxxxx !
    xxxxxxxxxx !
    xxxxxxxxxx !
    xxxxxxxxxx ! yyyyyyyyy
    xxxxxxxxxx ! yyyyyyyyy
    ...where the gridlines between rows and columns would be hidden. However, I sometimes need to print just the right column, which meant I had to remove the table. It's a 600-page document, I was looking for a more elegant solution.
    Any suggestions?
    I am using FM8.0(266) on Windows XP.

    If you take the sidehead approach that Niels suggest, you could do
    this, but it would be a bit of maintenance.
    Have your "xxxxx" flow content sit in text frames within anchored
    frames. The anchored frames are then in a special conditionalized
    paragraph ("z") in the *sidehead* before every "yyyy" flow section,
    e.g.
    z
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    yyyyyyyyy
    yyyyyyyyy
    z
    xxxxxxxxxx
    xxxxxxxxxx
    xxxxxxxxxx
    z
    xxxxxxxxxx yyyyyyyyy
    xxxxxxxxxx yyyyyyyyy
    The "z" paragraph is just a container for the anchored frames and
    should contain no text.
    When you hide the "z" tags, all of the "x" flow content will then
    disappear as well. You'll have to manually customize the height of
    each anchored frame/text frame pair though.
    To adjust the spacings between the "y" flow to match at the bottom of
    the anchored frames for the "x" flows, use the sidehead paratag ("Z")
    and create space above overrides in this paragraph only to adjust the
    vertical spacing to keep the x and y sections in sync. This way, you
    have overrides confined to only one paratag.
    To make maintenance easier, it might be worth creating a FrameScript
    that would adjust the height of the anchored/text frame combo based
    upon the amount of content in the instructor flow and then apply the
    space above override to the anchoring paratag (z).

  • How to refer a column name in form report

    Hi,
    How can i refer a column name in the form report. My issue is that " I have a form report in that i have column name when i use to click the column name it should bring me to next page with the corresponding values of the column."
    Here i have achieved that when i click on column name(in Page1) it brings me to next page(Page2). but in the next page(P2) i want to display(only display) the corresponding values of the selected column(Page1) but the values should not be editable and should not be in text field it should be in display only field.
    So how can i write a sql query in display only souce field. Ie, how can i refer the column name in(page1) form report.

    Hi Karthik
    Very good morning.
    I think u have column link in the first page and when u select a data in the first page and when u r moving to the next page the the corresponding data need to there is it correct.
    For example You have table Employee and u have a select list in the first page contains name of the employee when u select one name and corresponding datas of the employee need to be in the second page.
    So Dont clear the cache of the first page.
    I the next page make the page items as display only and give the source of the all items a returning the single sql query.
    If u have four items in the next page namely p2_sal, P2emp_no etc..
    Then use like this
    select sal from emp where emp_name=:P1_EMPNAME
    Hopes this might helps you.
    Thanks & Regards
    Srikkanth.M

  • View with columns based on function - problem with query

    Hi,
    I'm using Oracle 9i;
    I've created a view which has columns based on a table columns (multiple columns from 1 table) and funtion (multiple columns based on 1 function).
    The function takes ID as the first argument and name of the column to determine which value to return as the second one.
    Here is a sample of such function (simplified):
    FUNCTION my_function
    (in_id IN NUMBER, in_col_name IN VARCHAR2)
    RETURN VARCHAR2
    IS
    c_name VARCHAR2(100);
    c_last_name VARCHAR2(100);
    BEGIN
    SELECT T.NAME, T.LAST_NAME
    INTO c_name, c_last_name
    FROM TABLE_1 T, TABLE_2 Z
    WHERE T.PK = Z.FK
    AND Z.ID = in_id;
    IF in_col_name = 'NAME' THEN
    RETURN c_name;
    ELSIF in_col_name = 'LAST_NAME' THEN
    RETURN c_last_name;
    END IF;
    END;
    For simplicty I've restricted the number of columns.
    CREATE OR REPLACE VIEW my_view
    (ID, NAME, LAST_NAME)
    AS
    SELECT
    T.ID ID
    ,CAST(my_function(T.ID,'NAME') AS VARCHAR2(100)) NAME
    ,CAST(my_function(T.ID,'LAST_NAME') AS VARCHAR2(100)) LAST_NAME
    FROM TABLE T;
    There is no problem with query:
    SELECT * FROM my_view;
    The problem arises when I query the view (regardles of '=' or 'LIKE'):
    SELECT * FROM my_view
    WHERE name LIKE '%some_part_of_name%'
    The query returns rows for same names, for same it doesn't. If I put '=' and the whole name the query returns nothing, but when I put 'LIKE' and the first letter it returns rows in some cases.
    I've tried to debug this situation and I've discovered that the function recives ID not in the proper order and not the same amount of times - in explicit:
    for each ID in (1, 2, 3, 4, 5, 6, ... , 100) the function should be called twice for each ID and in the same order, but it does not.
    I get 1, 1, 2, 3, 3, 6, 20, 20 and so on.
    Help needed.
    Greetings.

    The problem is more complicated than the solutions provided here.
    The reason why I'm using the function is this:
    the original view was constructed using multiple union all selects and the speed was terrible. I've created the index on the base table to obtain a proper sort. For retriving all records at once the view works perfectly, but if one wants to query by columns based on function the results are suprisng - sometimes there are, some times there are none, or if you serch with "like" and only a part of string there are results, but with "=" there are no results.
    Here are real DDLs:
    View:
    CREATE OR REPLACE VIEW V_DOK_ARCH
    (ID_ZDAR, TYP, STAN, DATE_CREATED, CREATED_BY,
    DATE_MODIFIED, MODIFIED_BY, SPRA_ID_SPRA, PODM_ID_PODM, PODM_UMOW_ID_UMOW,
    NR_WFS, WFS_NR_INTER, UWAGI_OPER, FUNDUSZ, NUMER,
    DATA_PODPISANIA, RODZAJ, TYP_PRZY, TYP_UBEZ, NAZWISKO,
    IMIE, IMIE_OJCA, NAZWA_FIRMY, NAZWA_FIRMY_SKR, DANE_KLIE)
    AS
    SELECT /*+ INDEX(Z ZDAR_DATE_CREATED_DESC_I) */
    Z.ID_ZDAR ID_ZDAR
    , Z.TYP TYP
    , Z.STAN STAN
    , Z.DATE_CREATED DATE_CREATED
    , Z.CREATED_BY CREATED_BY
    , Z.DATE_MODIFIED DATE_MODIFIED
    , Z.MODIFIED_BY MODIFIED_BY
    , Z.SPRA_ID_SPRA SPRA_ID_SPRA
    , Z.PODM_ID_PODM PODM_ID_PODM
    , Z.PODM_UMOW_ID_UMOW PODM_UMOW_ID_UMOW
    , Z.NR_WFS NR_WFS
    , Z.WFS_NR_INTER WFS_NR_INTER
    , Z.UWAGI_OPER UWAGI_OPER
    , Z.FUNDUSZ FUNDUSZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NUMER') AS VARCHAR2(30)) NUMER
    , F_Rej_Zdar_Date(Z.ID_ZDAR, 'DATA_PODPISANIA') DATA_PODPISANIA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'RODZAJ') AS VARCHAR2(4)) RODZAJ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_PRZY') AS VARCHAR2(4)) TYP_PRZY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_UBEZ') AS VARCHAR2(3)) TYP_UBEZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO') AS VARCHAR2(30)) NAZWISKO
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE') AS VARCHAR2(30)) IMIE
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA') AS VARCHAR2(30)) IMIE_OJCA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY') AS VARCHAR2(300)) NAZWA_FIRMY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR') AS VARCHAR2(100)) NAZWA_FIRMY_SKR
    , CAST(LTRIM(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA')||F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY')||DECODE(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY'),NULL,F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR'),NULL)) AS VARCHAR2(492)) DANE_KLIE
    FROM T_ZDARZENIA Z
    WHERE F_Rej_Zdar_Char(Z.ID_ZDAR, 'JEST') = 'T';
    and functions:
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Char
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN VARCHAR2
    IS
    c_numer           T_PRZYSTAPIENIA.NUMER%TYPE;--VARCHAR2(30);
    c_rodzaj           T_KLIENCI.RODZAJ%TYPE;--VARCHAR2(1);
    c_typ_przy           T_PRZYSTAPIENIA.TYP_PRZY%TYPE;--VARCHAR2(1);
    c_typ_ubez           T_PRZYSTAPIENIA.TYP_UBEZ%TYPE;--VARCHAR2(3);
    c_nazwisko           T_KLIENCI.NAZWISKO%TYPE;--VARCHAR2(30);
    c_imie                T_KLIENCI.IMIE%TYPE;--VARCHAR2(30);
    c_imie_ojca      T_KLIENCI.IMIE_OJCA%TYPE;--VARCHAR2(30);
    c_nazwa_firmy      T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(300);
    c_nazwa_firmy_skr T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(100);
    c_jest                VARCHAR2(1) := 'T';
    c EXCEPTION;
    BEGIN
    --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR);
    BEGIN
    SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
    INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
         INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, I.nazwisko, I.imie, I.imie_ojca, I.NAZWA NAZWA_FIRMY, I.NAZWA_SKR nazwa_firmy_skr
              INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                   INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                        INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                             INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                                  INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.NUMER_UMOWY NUMER, DECODE(k.TYP_PRZYSTAPIENIA,'P','F','P') RODZAJ,k.TYP_PRZYSTAPIENIA TYP_PRZY,'NPO' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, k.nazwa_firmy nazwa_firmy, k.nazwa_firmy_skr nazwa_firmy_skr
                                       INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.NUMER_UMOWY NUMER, 'F' RODZAJ,'-' TYP_PRZY,'OPS' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                            INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, NULL nazwisko, NULL imie_pierwsze, NULL imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                                 INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR||' ostatni wyjatek');
                                                           NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    --raise c;
    IF WE_KOLUMNA = 'NUMER' THEN
    RETURN c_numer;
    ELSIF WE_KOLUMNA = 'RODZAJ' THEN
    RETURN c_rodzaj;
    ELSIF WE_KOLUMNA = 'TYP_PRZY' THEN
    RETURN c_typ_przy;
    ELSIF WE_KOLUMNA = 'TYP_UBEZ' THEN
    RETURN c_typ_ubez;
    ELSIF WE_KOLUMNA = 'NAZWISKO' THEN
    RETURN c_nazwisko;
    ELSIF WE_KOLUMNA = 'IMIE' THEN
    RETURN c_imie;
    ELSIF WE_KOLUMNA = 'IMIE_OJCA' THEN
    RETURN c_imie_ojca;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY' THEN
    RETURN c_nazwa_firmy;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY_SKR' THEN
    RETURN c_nazwa_firmy_skr;
    ELSIF WE_KOLUMNA = 'JEST' THEN
    RETURN c_jest;
    END IF;
    END;
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Date
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN DATE
    IS
    d_data DATE;
    BEGIN
    BEGIN
    SELECT p.DATA_PODPISANIA
    INTO d_data
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.DATA_PODPISANIA
         INTO d_data
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL DATA_PODPISANIA
              INTO d_data
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                   INTO d_data
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                        INTO d_data
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                             INTO d_data
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                                  INTO d_data
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                       INTO d_data
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                            INTO d_data
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL DATA_PODPISANIA
                                                 INTO d_data
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           d_data := NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    IF WE_KOLUMNA = 'DATA_PODPISANIA' THEN
    RETURN d_data;
    END IF;
    END;

  • What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    MD199 is as shown below. The other number is not an Apple model number.
    OVERVIEW
    Introduced     March 2012 (A1427) March 2013 (A1469)
    Discontinued     --
    Model Identifier     AppleTV3,1 (A1427) or AppleTV3,2 (A1469)
    Model Number     A1427 or A1469
    EMC     2528
    Order Number     MD199LL/A

  • Why can't I get Back To My Mac to work in both directions between my 2011 Mac Book Air and my 2012 Mac Mini?

    Why can't I get Back To My Mac to work in both directions between my 2011 Mac Book Air and my 2012 Mac Mini? The network uses a Time Capsule. Everything works when connecting from the Mini to the Air, but the reverse is not the case, none of the Mini's drives are visible, and the screen sharing option is not available. I've tried the measures already suggested in online articles, everything seems to be configured correctly using my iCloud account. I'm at a loss, any suggestions would be appreciated.

    I've now managed to get the service running in both directions, but not in the way I had anticipated. I had to create a second account on the Mac Book Air, this also has administrator privilages, everything works fine when connecting from this acccount. However, this is not the way I would expect to work, none of my documents, applications and settings would be available, unless I laboriously duplicated them to the new account.
    Also, I've yet to get the service running from outside my home network.

Maybe you are looking for

  • Not able to save bindings when calling bindings.getOperationBinding("update") in customized method.

    Hi All, I'm new to ADF and trying to learn it. I'm using JDev version 11.1.1.6.0. My use case is mention below : 1. I've created 2 Bounded task flows and calling one task flow from another task flow using task flow call activity. 2. In child task flo

  • Error when using transaction se80   |"C:\perforce\bas\620_COR\src\fes\few\s

    hi, i have installed the webas ABAP 6.40 system now when i am going for the transaction se80 i am getting the error : "C:\perforce\bas\620_COR\src\fes\few\sapfewin\guifunctionality.xml  contains an invalid path " can you please suggest me how to reso

  • Aix users security problem with remote brtools

    I'm having a separate instance for my database and central instance. Both instances are running on AIX 5.3. From my understanding, the DB13 dbcheck and dbverify are done by executing brtools at database instance form central instance. This is done by

  • Who is going to help me??

    hello Gentlemen. All what i want to do is installing Oracle Database 10g (Enterprise Edtion) on Windows XP (my PC),so i wanna have a user guide or web link for this matter to set up correctly .Kindly, help me if you can please??? Your friend, OracleM

  • IPCCE 7 - Webview - when I getting report an agent appears twice

    Hi All, I was having a problem with an agent's name being in the Cisco database twice. In order to get any data for him I have to select both names. If I select just either one of them then there is no data available. Prevously  I gave to this agent