problem with join

Hello Experts,

I'm having a little problem with joining me. its not taking the values that should be
declare
l_start_file_name varchar2(50) := 'liab_report_summary_p008_c';
l_end_file_name varchar2(50)   := '_english.rep';
l_file_name varchar2(100);
l_sql varchar(32767);
refresh_cdc varchar2(10) := '00540';

Begin

l_file_name := l_start_file_name||REFRESH_CDC||l_end_file_name;

 l_sql := 'create or replace directory GTECHFILES as ''/ftpfiles/gtechfiles/acct_'||REFRESH_CDC||'''';
  execute immediate l_sql;


l_sql :=  ' CREATE TABLE LOTO_LIABILITY_REPORT_temp             '||
          ' (                                                   '||
          '  draw_number       varchar2(50),                    '||
          '  total_winners_amt number,                          '||
          '  paid_today_amt    number,                          '||
          '  total_paid_amt    number,                          '||
          '  expired_today_amt number,                          '||
          '  total_expired_amt number,                          '||
          '  frac_round_amt    number,                          '||
          '  outstanding_amt   number                           '||
          ' )                                                   '||
          ' ORGANIZATION EXTERNAL                               '||
          '   (  TYPE ORACLE_LOADER                             '||
          '     DEFAULT DIRECTORY GTECHFILES                    '||
          '     ACCESS PARAMETERS                               '||
          '       (                                             '||
          '      RECORDS DELIMITED BY NEWLINE                   '||
          '    BADFILE TEMPDIR:''loto_liability_report.bad''    '||
          '    DISCARDFILE TEMPDIR:''loto_liability_report.dis'''||
          '    LOGFILE TEMPDIR:''loto_liability_report.log''    '||
          '      SKIP 8                                         '||    
          '      FIELDS LDRTRIM                                 '||
          '      MISSING FIELD VALUES ARE NULL                  '||
          '       (                                             '||
          '  draw_number       (1:11)  char(11),                '||
          '  total_winners_amt (14:24) char(11),                '||
          '  paid_today_amt    (26:36) char(11),                '||
          '  total_paid_amt    (38:48) char(11),                '||
          '  expired_today_amt (50:60) char(11),                '||
          '  total_expired_amt (62:72) char(11),                '||
          '  frac_round_amt    (74:80) char(7),                 '||
          '  outstanding_amt   (82:92) char(11)                 '||
          '       )                                             '||
          '   )                                                 '||
          '     LOCATION ('''||l_file_name||''')                '||
          ' )                                                   '||
          ' REJECT LIMIT UNLIMITED                              '||
          ' NOPARALLEL                                          '||
          ' NOMONITORING                                        ';

         execute immediate l_sql; 


 l_sql := ' insert into LOTO_LIABILITY_REPORT '||
 ' ( draw_number             , '||
 '   total_winners_amt       , '||
 '   paid_today_amt          , '||
 '   total_paid_amt          , '||
 '   expired_today_amt       , '||
 '   total_expired_amt       , '||
 '   frac_round_amt          , '||
 '   outstanding_amt         , '||
 '   source                  , '||
 '   inserted_DATE           , '||
 '   CDC                     , '||
 '   draw_start_date         , '||
 '   draw_end_date             '||
 ' )                           '||
 '   SELECT                    '||
 '       a.to_number(substr(draw_number,1,instr(draw_number,''/'',1)-1)) , '||
 '       a.total_winners_amt                                             , '||
 '       a.paid_today_amt                                                , '||
 '       a.total_paid_amt                                                , '||
 '       a.expired_today_amt                                             , '||
 '       a.total_expired_amt                                             , '||
 '       a.frac_round_amt                                                , '|| 
 '       a.outstanding_amt                                               , '||  
 '       '''||l_file_name                                           ||''', '||
 '       sysdate                                                         , '||
 '       '''||refresh_cdc                                           ||''', '|| 
 '       b.start_date                                                    , '|| 
 '       b.end_date                                                        '|| 
 '    FROM                                                                 '||
 '       a.LOTO_LIABILITY_REPORT_temp                                     ,'||
 '       b.draws                                                           '||
 '    where                                                                '||
 '       a.draw_number is not null                                         '||
 '    and                                                                  '||
 '       a.total_winners_amt is not null                                   '||
 '    and                                                                  '|| 
 '       a.to_number(substr(draw_number,1,instr(draw_number,''/'',1)-1))= b.num ';

 
    dbms_output.put_line(l_sql);
         execute immediate l_sql;           
         
l_sql :='drop table LOTO_LIABILITY_REPORT_temp';
 
        execute immediate l_sql;
        
exception
when others then
rollback;
l_sql :='drop table LOTO_LIABILITY_REPORT_temp';
execute immediate l_sql;
debug_message('LOTO_LIABILITY_REPORT_temp_UPLOAD/'||REFRESH_CDC,'Unexpected Error '||sqlerrm);
END LOTO_LIABILITY_REPORT;

at least

 '    FROM                                                                 '||
 '       LOTO_LIABILITY_REPORT_temp a                                     ,'||
 '       draws b                                                           '||
 '    where                                                                '||

Concerning

Etbin

Tags: Database

Similar Questions

  • Problem with joining photos for the Windows 8 library mail program and error message 'create an association in the default program control panel '.

    Original title: E-mail question

    I want to send pictures of the library in Windows 8. Cannot do. He told me to create an association in the default program control panel. Been there, no help.

    Hello Jeff,.

    Please keep us updated on the status of the issue.

    I will certainly help you in the right direction to solve the problem. However, I would be grateful if you could let us know that you have set the email client that you use as default to the Control Panel program to send and receive electronic messages from the computer.

    Please respond with the requested information, in order to help you solve the problem.

    Thank you

  • Problem with join request and left sub ORA-01799

    Hi all

    I am currently working on the following query and I get an error when you use a left join (mandatiry in my case), in good and due place of a join.

    Error message describes the case, but I need to make it work.

    No idea how I can make this one for a left join job?

    Select a.dco, a.agsa, a.agem, a.agde, a.ope, a.eve, a.tpr, a.nat,

    a.Age, a.dev, a.ncp, a.suf, a.sen, a.dva, a.mon, a.lib, c.cli, e.age as kage,

    e.OPE as kope, e.eve as kévé, e.dev as kdev, e.dech, e.ndos, e.tcai3, e.nump, e.natp, e.lib1,

    e.nom2, e.dev2, e.ncp2, e.age1, e.ncp1, e.dev1, e.nom1, e.nomb, e.etab, e.comb,

    e.AGE2, e.nomp, e.lib2, e.lib3, e.lib4, e.lib5, e.lib6, e.lib7, e.lib8, e.lib9, e.dva2,

    e.mht as e.agsa as kagsa, e.mcai3, e.tcai2, e.refdos, e.mnat, d.cur_char, kmht

    of bkmvtg_mi one

    Join bkcom c on a.age = c.age and a.dev = c.dev and a.ncp = c.ncp and a.suf = c.suf

    e left join on (e.age = bkeve_mi

    CASES (select nvl (trim (zon1), 'age') in the cpjoilib where nomtab = 'bkeve' and nat = a.nat and zon2 = 'age')

    WHEN "age" THEN a.age

    WHEN "real" THEN a.agem

    WHEN 'agsa' THEN a.agsa

    WHEN 'agde' THEN a.agde

    Of OTHER a.age

    END

    and a.ope = e.ope and a.eve = e.eve)

    e.CSP4 left join sgsbwb_currency d = d.cur_num

    where exists (select * from sc sgsbwb_client where c.cli = sc.customer_number and ready = 1).

    and exists (select * from sgsbwb_pdt sp where c.cpro = sp.c_pro);

    ORA-01799:

    01799 00000 - "a column cannot be reached outside to a subquery.

    * Cause: < expression > (+) < relop > (< subquery >) is not allowed.

    * Action: Either delete the or make a view of the subquery.

    In V6 and with of the was simply ignored in this case.

    Thanks for your help and valuable advice

    Best regards

    Jérôme

    You must activate the application in that case there in a join.  I used an outer join below because that mimics the effect of your expression, but if you know that there is always a game between bkmvtg_mi and cpjoilib, then it could be a standard join.

    Select a.dco, a.agsa, a.agem, a.agde, a.ope, a.eve, a.tpr, a.nat,

    a.Age, a.dev, a.ncp, a.suf, a.sen, a.dva, a.mon, a.lib, c.cli, e.age as kage,

    e.OPE as kope, e.eve as kévé, e.dev as kdev, e.dech, e.ndos, e.tcai3, e.nump, e.natp, e.lib1,

    e.nom2, e.dev2, e.ncp2, e.age1, e.ncp1, e.dev1, e.nom1, e.nomb, e.etab, e.comb,

    e.AGE2, e.nomp, e.lib2, e.lib3, e.lib4, e.lib5, e.lib6, e.lib7, e.lib8, e.lib9, e.dva2,

    e.mht as e.agsa as kagsa, e.mcai3, e.tcai2, e.refdos, e.mnat, d.cur_char, kmht

    of bkmvtg_mi one

    Join the bkcom c

    On a.age = c.age and

    a.dev = c.dev and

    a.NCP = c.ncp and

    a.SUF = c.suf

    Join cpjoilib l left

    On a.nat = l.nat and

    l.nomtab = "bkeve" and

    l.zon2 = 'age '.

    Join e bkeve_mi left

    on (e.age = nvl (trim (l.zon1), 'age') CASE

    WHEN "age" THEN a.age

    WHEN "real" THEN a.agem

    WHEN 'agsa' THEN a.agsa

    WHEN 'agde' THEN a.agde

    ELSE a.age END and

    a.OPE = e.ope and

    a.Eve = e.eve)

    left join sgsbwb_currency d

    on e.csp4 = d.cur_num

    where exists (select * from sgsbwb_client sc)

    where c.cli = sc.customer_number and

    ready = 1) and

    There are (select * from sgsbwb_pdt sp)

    where c.cpro = sp.c_pro);

    John

  • problem with join of two tables

    Hi, consider the following data
    WITH data AS
    (
      SELECT 123 cid, 'aaa' isi, 'kkk' sud, 'ttt' ri FROM dual UNION ALL 
      SELECT 222 cid, 'bbb' isi, 'gggg' sud, 'hhh' ri FROM dual
    
    ) ,
    data2 AS 
    (
      SELECT 'aaa' isi, 'yyy' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'qqq' isi, 'ggg' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'uuu' isi, 'ppp' sud, 'ttt' ri FROM dual UNION ALL
       SELECT 'ppp' isi, 'mmm' sud, 'nnn' ri FROM dual 
    
    
    )
    what I want to do, is to join data2 with data by isi, ri or southern id table and produce this output.
     cid  txt
     ===  ====
     123  aaa
     222  ggg
     123  ttt
    It's how I got the above output:
    first try to join isi in database2 with isi in "features" and discover if line matches. If this is the case, display the cid of the data table and the use of the value to match.
    e.g. in the first line of table data2, we can see that isi = aaa matches line an isi data table. If the output displays 123 and value aaa.

    If the rank table two of the Data2 isi = qqq. When join them with the data table, we find not all isi with qqq. in this case, it must join with column of South. We can see that South = ggg data2 games
    the second line in the table of output so will bee 222 and value ggg.

    now, take a look at the third row in Database2. ISI = uuu is not found in the data table when join them. then try to join to the South. South = ttt is also not found in any row of the data table. so join with ri. We
    can see that ri = ttt data2 matches with ri = ttt in the table of data online 1. Therefore, we display the value.

    can someone help me write a sql query that joins these two tables by isi. If no line found then join South, if no found rows then join in ri? Thank you

    Hello

    elmasduro wrote:
    Hi Frank, data2.sud = 'Gay' (4 characters) assume to be South = "ggg". by mistake, I type extra g.

    I have another question about the request. What happens if I want to bring rows of data.2 even if they do not exist in the data table for the entire column was join?
    for example, I want to show this:

    cid  txt
    ===  ====
    123  aaa
    222  ggg
    123  ttt
    ppp  --row from data2
    

    the columns of the last row of data.2 does not match any column in the data table. in this case, I want to make but cid will be null. I tried outer join on your request, but it looks like I can not clause or with outer join

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
                                            ELSE  d2.ri
         END     AS txt
    FROM data     d1
    JOIN     data2     d2  ON     d1.is(+)i     = d2.isi
                  OR     d1.sud(+)     = d2.sud
                  OR     d1.ri(+)     = d2.ri
    ;
    

    How can I re - write the query for this case? Thanks again for your help

    Here is the outer join syntax:

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
              WHEN  d1.ri  = d2.ri   THEN  d2.ri
                                            ELSE  d2.isi
         END     AS txt
    FROM          data2     d2
    LEFT OUTER JOIN     data     d1  ON     d1.isi     = d2.isi
                           OR     d1.sud     = d2.sud
                           OR     d1.ri     = d2.ri
    ;
    

    The + sign for outer joins only works with the old join syntax, non-ANSI. Do not try to mix the two different ways to do joins.

    Not to mention that the outer join, don't forget to change the CASE expression, to include the new possibility of any columns 3 join matching.

  • Select the problem with joined tables

    Hello everyone I have the following query
    SELECT 
        OBJEKTI.OBJEKAT_ID OBJEKAT_ID, 
        OBJEKTI.ADRESA ADRESA, 
        OBJEKTI.POVRSINA POVRSINA, 
        OBJEKTI.BROJ_IZVRSILACA BROJ_IZVRSILACA, 
        OPREMLJENOSTI.OPREMLJENOST_ID OPREMLJENOST_ID, 
        OPREMLJENOSTI.PULT PULT, 
        OPREMLJENOSTI.REKLAMA REKLAMA, 
        OPREMLJENOSTI.MOKRI_CVOR MOKRI_CVOR, 
        OPREMLJENOSTI.WC_ZA_IGRACE WC_ZA_IGRACE, 
        OPREMLJENOSTI.WC_ZA_OSOBLJE WC_ZA_OSOBLJE, 
        OPREMLJENOSTI.VENTILATOR VENTILATOR, 
        OPREMLJENOSTI.OSVJETLJENJE OSVJETLJENJE, 
        OPREMLJENOSTI.VRSTA_BROJILA VRSTA_BROJILA, 
        OPREMLJENOSTI.ELEKTRO_INSTALACIJE ELEKTRO_INSTALACIJE, 
        OPREMLJENOSTI.VODO_INSTALACIJE VODO_INSTALACIJE, 
        OPREMLJENOSTI.TELEFONSKE_INSTALACIJE TELEFONSKE_INSTALACIJE, 
        OPREMLJENOSTI.GRIJANJE_ID GRIJANJE_ID, 
        OPREMLJENOSTI.POD_ID POD_ID, 
        OPREMLJENOSTI.PROZORI_VRATA_ID PROZORI_VRATA_ID, 
        OPREMLJENOSTI.OBJEKAT_ID OBJEKAT_ID1, 
        TEHNICKE_OPREMLJENOSTI.TEH_OPR_ID TEH_OPR_ID, 
        TEHNICKE_OPREMLJENOSTI.ONLINE_KLADIONICA ONLINE_KLADIONICA, 
        TEHNICKE_OPREMLJENOSTI.PANO PANO, 
        TEHNICKE_OPREMLJENOSTI.NOSACI NOSACI, 
        TEHNICKE_OPREMLJENOSTI.TV_LCD TV_LCD, 
        TEHNICKE_OPREMLJENOSTI.TV_TELETEXT TV_TELETEXT, 
        TEHNICKE_OPREMLJENOSTI.APARATI_IGRE APARATI_IGRE, 
        TEHNICKE_OPREMLJENOSTI.EVONA EVONA, 
        TEHNICKE_OPREMLJENOSTI.NOVOMATIC NOVOMATIC, 
        TEHNICKE_OPREMLJENOSTI.RULET RULET, 
        TEHNICKE_OPREMLJENOSTI.BILIJAR BILIJAR, 
        TEHNICKE_OPREMLJENOSTI.KLIMA KLIMA, 
        TEHNICKE_OPREMLJENOSTI.OBJEKAT_ID OBJEKAT_ID2, 
        PONUDE.PONUDA_ID PONUDA_ID, 
        PONUDE.ONLINE_TERMINAL ONLINE_TERMINAL, 
        PONUDE.SRECKE SRECKE, 
        PONUDE.ONLINE_KLADIONICA ONLINE_KLADIONICA1, 
        PONUDE.APARATI_IGRE APARATI_IGRE1, 
        PONUDE.RULET RULET1, 
        PONUDE.BILIJAR BILIJAR1, 
        PONUDE.OBJEKAT_ID OBJEKAT_ID3 
    FROM 
        OBJEKTI, 
        OPREMLJENOSTI, 
        TEHNICKE_OPREMLJENOSTI, 
        PONUDE 
    WHERE 
    (PONUDE.OBJEKAT_ID=OBJEKTI.OBJEKAT_ID AND TEHNICKE_OPREMLJENOSTI.OBJEKAT_ID=OPREMLJENOSTI.OBJEKAT_ID) OR (OPREMLJENOSTI.OBJEKAT_ID=OBJEKTI.OBJEKAT_ID AND TEHNICKE_OPREMLJENOSTI.OBJEKAT_ID=OPREMLJENOSTI.OBJEKAT_ID)
     ORDER BY OBJEKTI.OBJEKAT_ID
    The problem I have is any WHERE clause I use I have double values that makes no sense. I checked in the tables and I not all double values. Each Opremljenost has 1 objekat (there are 2 rows of each with its own Objekat) and this applies to 2 other tables (PONUDE and TEHNICKE OPREMLJENOSTI), but for some reason any that they double values. If I run it without a where clause at all clause, I get a repetition of values itself up to 4 times. Does anyone have an idea what's wrong with my request?

    Well, if all relationships are to 1-1 (1-0), then try this (the names of table/column, but you get what I mean bad):

    select OBJ.*, OPR.*, TEH.*, PON.* -- I know you can't do this, but you get what I mean.
    from OBJ,OPR,TEH,PON
    where OBJ.object = OPR.object (+)
      and OBJ.object = TEH.object (+)
      and OBJ.object = PON.object (+)
    /
    

    its supposed to be a 1 to 1 relationship, but it is not.

    In this case the remedy is very simple: create a UNIQUE constraint on the column of the OBJECT in OPR, TEH and PON...

  • Problems with joins

    I have 2 tables of those with employees and the other with the departments. I need to use a join to display the employe_id and employee_name, and the name of the employee for all employees in the production department. Here my syntax. I don't know how to finish or if it is still correct.


    SQL > SELECT employe_id, EMPLOYEE_NAME, DEPARTMENT_NAME
    2 EMPLOYEES, DEPARTMENTS
    3 WHERE EMPLOYED. EMPLOYEE_ID = EMPLOYEES. EMPLOYEE_NAME
    4 AND DEPARTMENT_NAME = 'PRODUCTION '.

    WHERE EMPLOYED. EMPLOYEE_ID = EMPLOYEES. EMPLOYEE_NAME
    *
    ERROR at line 3:
    ORA-01722: invalid number

    Thank you

    SELECT EMPLOYEE_NAME, EMPLOYE_ID
    EMPLOYEES
    WHERE department_id in (SELECT department_id
    MINISTRIES
    WHERE DEPARTMENT_NAME = 'PRODUCTION');

    1 EMPLOYEE_NAME is generally different from that DEPARTMENT_NAME
    2. because your subquery returns more than 1 row, you must use IN-place =.
    3. do you offended or disappointed, but please read some SQL books before you post here! You will not learn SQL from a forum.

    Published by: Auntie on October 1st, 2009 21:13

  • Problems with joins in the repository

    Hello

    I have a requirement to display a report which shows that the activity of the employee account within a specified date range.

    My tables is:

    Emp_Dim (emp_key, emp_name, etc.)
    Date_Dim (date_key, date_value, etc.)
    Fact_Activities (emp_key, date_key, County of activity)

    The part that gives me, is that the customer wants to see all employees without worrying if they have an entry in the fact_activities table. I tried messing around with outer joins business layer between these tables, but I can't seem to get the results the customer wants.

    When a user enters a date range in a command prompt, the report should show all employees in the organization. The counties of activity should reflect the date range. So if the employee had a count of 5 between April 6 and April 12, but a number 0 between April 13 and April 15, this should be reflected when the user changes the date range in the report.

    Currently, if an employee count 0 activity for a certain date range, they are not just displayed in the report for this range.

    Any ideas?

    Thank you

    I'm glad that solve you it but I am very surprised because I well I posted the filing solution that is a better solution.

    Check here:
    http://gerardnico.com/wiki/dat/OBIEE/bi_server/design/obiee_densification_design_preservation_dimension

    You must use a small obiee logic sql in the filter to say that only users who have an activity for the desired period.

  • Problems with joining paths

    Could someone please explain why I often get an error message when I try to join two lines? I can't reproduce the error now, but I found the message more to stackexchange:

    "To register, you must select two open end points. If they are not on the same path, they can be on any text within graphics paths, and if two of them are grouped together, they must be in the same group. »

    Or maybe someone could translate the message in English?

    Thank you for your reply Jacob, but I always if sure I select only two anchor points.

    And I got a different error message earlier, saying that the selected objects cannot be joined because they are invalid objects (transparent traces, text, graphic objects, live paint group). So, there seems to be many cases where the function works everything simply.

    EDIT: I've found a workaround: when the paths cannot be joined because they have a live paint group, this group can be expanded. This closes the gaps that cannot otherwise be closed.

  • Problem with joining several tables

    Hello PL/SQL gurus and experts.

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version
    I followed two tables

    Student-
    drop table TT3;
    create table TT3(FeesCntlr,CommCntlr,LatePayCntlr,Name,Age) as select
    1,11,21,'Mike',25 from dual union all select
    2,12,22,'Clark',26 from dual union all select
    1,11,21,'Mike',27 from dual union all select
    4,17,27,'Ussan',28 from dual union all select
    5,13,21,'Linda',29 from dual union all select
    6,14,24,'Obrek',35 from dual union all select
    7,15,25,'Batty',45 from dual union all select
    8,16,26,'Nicky',38 from dual union all select
    1,11,21,'Mike',25 from dual union all select
    2,12,22,'Clark',26 from dual union all select
    1,11,21,'Mike',27 from dual union all select
    4,17,27,'Ussan',28 from dual union all select
    5,13,21,'Linda',29 from dual union all select
    6,14,24,'Obrek',35 from dual union all select
    7,15,25,'Batty',45 from dual union all select
    8,16,26,'Nicky',38 from dual ;
    Fees-
    drop table TT4;
    create table TT4(FeesCntlr,CommCntlr,LatePayCntlr,Fees,Commission,Latepayment) as select
    1,11,21,25000,4456,223 from dual union all select
    2,12,22,356000,3321,0 from dual union all select
    1,11,21,456000,223,33 from dual union all select
    4,17,27,32890,0,0 from dual union all select
    5,13,21,0,778,223 from dual union all select
    6,14,24,332567,222,0 from dual union all select
    7,15,25,228990,22,0 from dual union all select
    8,16,26,0,0,2234 from dual union all select
    1,11,21,22345,0,0 from dual union all select
    2,12,22,2222789,2,33 from dual union all select
    1,11,21,334567,0,0 from dual union all select
    4,17,27,9987250,2,33 from dual union all select
    5,13,21,2227890,0,0 from dual union all select
    6,14,24,2278231,0,3345 from dual union all select
    7,15,25,223456,2,0 from dual union all select
    8,16,26,223890,0,0 from dual ;
    I am looking forward to the fees, commissions and surcharges output for each student and by using the following SQL code.
    select t3.Name,t3.age,t4.Fees
    from tt3 t3, tt4 t4
    where t3.FeesCntlr=t4.FeesCntlr
    union
    select t3.Name,t3.age,t4.Commission
    from tt3 t3, tt4 t4
    where t3.CommCntlr=t4.CommCntlr
    union
    select t3.Name,t3.age,t4.Latepayment
    from tt3 t3, tt4 t4
    where t3.LatePayCntlr=t4.LatePayCntlr
    but it gives me not the correct result and showing a lot of entries and display only the "Expenses" column then only I'm looking for the output to be -
    Name     Age     Fees          Commission     Laypayment
    Mike     25     837912          4679          256
    Clark     26     2578789          3323          33
    Ussan     36     10020140     2          33
    Linda     38     2227890          778          223
    Obrek     38     2610798          222          3345
    Batty     32     452446          24          0
    Nicky     23     223890          0          2234
    Kindly help me with this. Thank you in advance for your time and effort.

    Hello

    I see your table TT3 has duplicated lines. A reason for this?

    Rather than run a separate, I created it without duplicated lines:

    create table TT3(FeesCntlr,CommCntlr,LatePayCntlr,Name,Age) as select
    1,11,21,'Mike',25 from dual union all select
    2,12,22,'Clark',26 from dual union all select
    4,17,27,'Ussan',28 from dual union all select
    5,13,21,'Linda',29 from dual union all select
    6,14,24,'Obrek',35 from dual union all select
    7,15,25,'Batty',45 from dual union all select
    8,16,26,'Nicky',38 from dual;
    
    create table TT4(FeesCntlr,CommCntlr,LatePayCntlr,Fees,Commission,Latepayment) as select
    1,11,21,25000,4456,223 from dual union all select
    2,12,22,356000,3321,0 from dual union all select
    1,11,21,456000,223,33 from dual union all select
    4,17,27,32890,0,0 from dual union all select
    5,13,21,0,778,223 from dual union all select
    6,14,24,332567,222,0 from dual union all select
    7,15,25,228990,22,0 from dual union all select
    8,16,26,0,0,2234 from dual union all select
    1,11,21,22345,0,0 from dual union all select
    2,12,22,2222789,2,33 from dual union all select
    1,11,21,334567,0,0 from dual union all select
    4,17,27,9987250,2,33 from dual union all select
    5,13,21,2227890,0,0 from dual union all select
    6,14,24,2278231,0,3345 from dual union all select
    7,15,25,223456,2,0 from dual union all select
    8,16,26,223890,0,0 from dual ;
    
      SELECT t3.name, t3.age, SUM (t4.fees) fees, SUM (t4.commission) commission
           , SUM (t4.latepayment) latepayment
        FROM tt3 t3, tt4 t4
       WHERE     t3.feescntlr = t4.feescntlr
             AND t3.commcntlr = t4.commcntlr
             AND t3.latepaycntlr = t4.latepaycntlr
    GROUP BY t3.name, t3.age;
    
    Output:
    NAME         AGE       FEES COMMISSION LATEPAYMENT
    ----- ---------- ---------- ---------- -----------
    Mike          25     837912       4679         256
    Ussan         28   10020140          2          33
    Linda         29    2227890        778         223
    Clark         26    2578789       3323          33
    Obrek         35    2610798        222        3345
    Nicky         38     223890          0        2234
    Batty         45     452446         24           0
    

    Kind regards.
    Al

    Published by: Alberto Faenza on November 6, 2012 12:40

  • Problems with Server 2008 R2 Kerberos with Mac and CentOS machines? Need to re - join domain

    We are having a problem with our Mac and Linux / CentOS machines constantly having to be re-attached to our AD domain.
    We are able to join machines to the domain successfully, but after a few weeks or if authentication is broken and we again join them to the domain.
    I see Security event logs on our domain controller when kerberos authentication fails.
    On the linux server - I see this message in the logs
    -binding failed: server not found in the kerberos database.

    I'm guessing this has to do with Server 2008 R2 and incompatible mac / linux versions.

    Any ideas?

    Hello

    I suggest you try to post the question in the forums and check them off below if it helps:

    http://social.technet.Microsoft.com/forums/en-us/windowsserver2008r2general/threads

    It will be useful.

  • Problem to join a domain with Windows Vista Bussiness

    I have my domian with Windows Server 2008 standard, on my network, I have Windows XP, 2000, Win7 and Vista computers and laptops.

    I have no problem to join all computers, but when I try to join a computer or laptop with Vista it keeps giving me this error:

    "An attempt to resolve the DNS of a domain controller in the domain being joined has failed. Please check that this client is set to reach a DNS server that can resolve DNS names in the target area.

    I already do a little research on the web and try disabling IPv6, I also create the computer in the ad before attempting to join the domain, so far without success.

    Thanks in advance for your answers!

    Hi Arturo,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question in the following forum.

    Windows Server - general forum

  • Problem with a Cartesian join

    Hello

    I'm on Oracle 10.2.0.4.

    I have a problem with a simple Cartesian join. Is it possible to have a Cartesian join? whether a table has data and another table has no data, I take a Cartesian join (no join condition), I want to see all records from a table and values NULL for columns from the other table.

    For example

    SQL > create table T1 (id number, emp_name varchar2 (30));

    Table created.

    SQL > create table T2 (sp_name varchar2 (10), sp_desc varchar2 (10));

    Table created.

    SQL > insert into T1 values (101, 'AAAAA');

    1 line of creation.

    SQL > insert into T1 values (102, 'BBBB');

    1 line of creation.

    SQL > insert into values of T2 ('TBT', 'Important');

    1 line of creation.

    SQL > insert into values of T2 ("XYZ", "Not good");

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > select t1.id, t1.emp_name, t2.sp_desc

    2 from t1, (select sp_name, sp_desc from t2 where sp_name = "OTC") t2;

    ID EMP_NAME SP_DESC

    ---------- ------------------------------ ----------

    AAAAA 101 Important

    Important 102 BENAMER

    SQL > select t1.id, t1.emp_name, t2.sp_desc

    2 from t1, (select sp_name, sp_desc from t2 where sp_name = "ZZZ") t2;

    no selected line

    SQL >

    In the second query (where no line is selected), I want to see all the records in the table T1 and NULL values in columns from the alias of table T2.

    How can I do?

    Thanks in advance

    The ANSI syntax can help here.

    Select t1.id, t1.emp_name, t2.sp_desc

    from t1

    outer join t2 left t2.sp_name = "OTC";

    ID EMP_NAME SP_DESC

    ---------- ------------------------------ ----------

    AAAAA 101 Important

    Important 102 BENAMER

    Select t1.id, t1.emp_name, t2.sp_desc

    from t1

    outer join t2 left t2.sp_name = "ZZZ";

    ID EMP_NAME SP_DESC

    ---------- ------------------------------ ----------

    AAAAA 101

    BENAMER 102

    Post edited by: Brian Bontrager
    removed the unnecessary condition

  • Problem with XMLTABLE and LEFT OUTER JOIN

    Hi all.

    I have a problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns the correct result, but in 10g it doesn't, it is illustrated as a INNER JOIN.
    SELECT * FROM v$version;
    
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    --test for 11g
    
    CREATE TABLE XML_TEST(
         ID NUMBER(2,0),
         XML XMLTYPE
    );
    
    INSERT INTO XML_TEST
    VALUES
    (
         1,
         XMLTYPE
         ('
              <msg>
                   <data>
                        <fields>
                             <id>g1</id>
                             <dat>data1</dat>
                        </fields>
                   </data>
              </msg>
         ')
    );
    
    INSERT INTO XML_TEST
    VALUES
    (
         2,
         XMLTYPE
         ('
              <msg>
                   <data>
                        <fields>
                             <id>g2</id>
                             <dat>data2</dat>
                        </fields>
                   </data>
              </msg>
         ')
    );
    
    INSERT INTO XML_TEST
    VALUES
    (
         3,
         XMLTYPE
         ('
              <msg>
                   <data>
                        <fields>
                             <id>g3</id>
                             <dat>data3</dat>
                        </fields>
                        <fields>
                             <id>g4</id>
                             <dat>data4</dat>
                        </fields>
                        <fields>
                             <dat>data5</dat>
                        </fields>
                   </data>
              </msg>
         ')
    );
    
    SELECT
         t.id,
         x.dat,
         y.seqno,
         y.id_real
    FROM
         xml_test t,
         XMLTABLE
         (
              '/msg/data/fields'
              passing t.xml
              columns
                   dat VARCHAR2(10) path 'dat',
                   id XMLTYPE path 'id'
         )x LEFT OUTER JOIN
         XMLTABLE
         (
              'id'
              passing x.id
              columns
                   seqno FOR ORDINALITY,
                   id_real VARCHAR2(30) PATH '.'
         )y ON 1=1
    ;
    
    ID     DAT     SEQNO     ID_REAL
    --     -----     -----     -------
    1     data1     1     g1
    2     data2     1     g2
    3     data3     1     g3
    3     data4     1     g4
    3     data5          
    This is all nice, now the problem:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for HPUX: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    --exactly the same environment as 11g (tables and rows)
    SELECT
         t.id,
         x.dat,
         y.seqno,
         y.id_real
    FROM
         xml_test t,
         XMLTABLE
         (
              '/msg/data/fields'
              passing t.xml
              columns
                   dat VARCHAR2(10) path 'dat',
                   id XMLTYPE path 'id'
         )x LEFT OUTER JOIN
         XMLTABLE
         (
              'id'
              passing x.id
              columns
                   seqno FOR ORDINALITY,
                   id_real VARCHAR2(30) PATH '.'
         )y ON 1=1
    ;
    
    ID     DAT     SEQNO     ID_REAL
    --     -----     -----     -------
    1     data1     1     g1
    2     data2     1     g2
    3     data3     1     g3
    3     data4     1     g4
    As you can see in 10g that I don't have the last row, it seems that Oracle 10 g does not recognize the LEFT OUTER JOIN.

    Is this a bug?, Metalink says that sometimes we can have an ORA-0600, but in this case there is no error results returned, just incorrect.

    Help, please.

    Kind regards.

    What about try the original Oracle method for outer joins? Using (+) without the extra space

    XMLTABLE(...COLUMNS ... id XMLTYPE PATH ... ) x,
    XMLTABLE(... PASSING x.id ...) (+) y
    
  • problems with, phone, 6, Bluetooth kit, Nissan, after update, for, Rios, 1.0.2

    After the update to ios 10.0.2 - trying to use bluetooth to call my vehicle, it says: "this article is not in your phone book." How can I solve this problem?

    Greetings, joybelino1!

    Thank you for joining the communities Support from Apple! I can't wait to see that you are having problems with your Bluetooth in your car! The good news is that Apple has a great article that will help you with measures to try to resolve the problem. Read this article to gethelp to connect your iPhone, iPad, or iPod touch with your car radio. Even though he talks about problems with the connection, it also has the steps for other questions you may have once connected.

    If you use Bluetooth

    1. Consult the user manual of your car stereo to get the procedure to a Bluetooth device.
    2. On your iOS device, drag up to open Control Center, then press ontwice to turn on Bluetooth and turn it back on.
    3. Restart your iOS device.
    4. On your iOS device, Cancel the twinning of your car radio. On the screen of your car désapparier your iOS device and any other device. Restart your car and your iOS device, then pair and connect again.
    5. Update your iOS device.
    6. Install the updates to the firmware of your car radio.
    7. If you still not connect, contact Apple technical support.

    Have a great day!

  • Problems with counter on 9411

    I am a new user of Labview, so it's a little intimidating. I am using a cDAQ-9188 with several modules but I have problems with one is the 9411 is used to measure the speed off the coast of a torque meter.

    I joined the program I put in place. What I want to do is to measure the number of edges on a 3 second interval so that I can divide by the number of pulses/turn * 60 * 1/3 to receive the RPM. However, the number of edges behave linearly as I expected. I measured the speed of the shaft with a light strobe and represented graphically it vs the number of edges. The results are attached to the excel file.

    What Miss me? The number of edges should not increase as speed up the tree, or I'm going about this all wrong and is not what I think I am?

    Thanks in advance.

    Ahh ok, that make more sense - it seemed like a strange to report a couple measured, way but now I understand that your torque sensor also rpm through this collection of speed option and that's what you ask the subject (I can't see not how pulses/turn the sensor is on the site Web of Honeywell however, do you know offhand?).

    The software timing 3 seconds will implement much of the variability in your measure but would not explain the strong negative correlation between the RPM and the speed sensor (we're talking several ms of non-determinisme for a second window 3) output frequency.  Finally, you'll want to solve this problem as well, but it is not your problem right now (as an aside - it would be actually more accurate to measure the frequency of the signal encoder using the 80 MHz as a reference time base and average the result on a second window 3, the general idea is sort explained in manual of 9188 here but I digress).

    I think it is more likely that the signal from the speed sensor is a bit noisy (pretty typical of optical encoders) and then transitions the 9411 is picking up multiple edges.  A slower RPM equals longer transitions and therefore more false edges.  It is just a hunch, but that's what I can think of on the top of my head that could be causing what you see (if read number of pulses is higher than what you expect, given the pulses/turn of the sensor through all ranges of RPM that it would support my theory).  If you want to ignore the method of measurement for a second and try to solve the problem of noise (assuming there is one), you can add the following property node to your existing code before you begin the task:

    You can start by setting MinPulseWidth to 6.4us (which is one of the built-in clock dividers available for PFI filters on the 9188).  You want the MinPulseWidth be short enough to ensure detection of a legitimate impulse, but long enough to block all wrong edges that occur during transitions.

    Best regards

Maybe you are looking for