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...

Tags: Database

Similar Questions

  • Select the problem with expressions

    Hello

    I use Teststand 4.0 and a frustrating problem with the Select Case statements.

    I have attached a sequence that shows the problem.

    A loop from 0 to 10.

    The select case statement should decide which box 3 instructions corresponds to the expression and a message box is displayed.

    However the Basic program reacts as expected.

    First, he made his entry with a value of 0, it goes to the > 7 stated case.

    The second time, he enters the loop with a value of 1, it will correctly to the<3 case="">

    The other values of 2 to 10 enter no case statement.

    Is this a bug in TS 4?, or I do something wrong?

    Thank you

    Mike

    The problem is that you compare the Locals.New_Val of the Locals.New_Val property.< 3". ="" if="" those="" two="" properties="" match,="" then="" it="" will="" execute. ="" if="" you="" wanted="" that="" particular="" case="" to="" execute="" when="" locals.new_val="" is="" 0,="" you="" would="" just="" type="">

    Unfortunately there is no way to have multiple cases of a single block of code.

    In C, you could do it like this:

    Switch (newVal)

    {

    case 0:

    case 1:

    case 2:

    do something

    break;

    case 3:

    case 4:

    case 5:

    case 6:

    case 7:

    do something else

    break;

    etc...

    }

    Even in C, it's awkward, and you would probably do the following instead:

    If (newval<>

    do something

    Else if (newval<>

    do something else

    on the other

    do something else

    The reason why it works in TestStand, is that expressions will try to automatically convert types if she can do it.  false is logically equivalent to 0 and true, it is logically equivalent to 1, so what you are really comparing to in your case statement is your property (Locals.New_Val) to a Boolean expression that evaluates to 0 or 1.  It is certainly not obvious when we look at, but at least, this explains why it happens.  Another way, you could do this is to change "Point to compare" step of the 'True' selection, which will each case in order to compare the expression of the value 'true '.  I still recommend a structure if/else if/else for this kind of problem because it's easier to read, but it is possible to do what you want in this case with a select / box.

    P. Allen

    NEITHER

  • Problem with create table as select (DEC)

    Hello

    We try to data cleaning of huge tables. And a customer of guise is reanme main table to the backup table. Then create a master table in select * backup table with some test.

    Now the problem with create table select, is that it creates the table without indexes and constraints. Is it possible to use the ETG (create the select table) with the same structure that he was the (all index, constriaints).

    Or any other solution to solve this problem?

    Thanks in advance

    Sweety wrote:
    Hello

    We try to data cleaning of huge tables. And a customer of guise is reanme main table to the backup table. Then create a master table in select * backup table with some test.

    Now the problem with create table select, is that it creates the table without indexes and constraints. Is it possible to use the ETG (create the select table) with the same structure that he was the (all index, constriaints).

    Or any other solution to solve this problem?

    Thanks in advance

    No, this is not possible. You need to get the manuscript of dependent object and create it manually.

  • I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I have sandisk cruzer blade USB key

    Hi Rohit,

    Thanks for posting your query in Microsoft Community Forum. I understand that your USB drive is having problems of compatibility with your computer, but I would like to learn more about the issue in order to provide you with better assistance.

    1. You did it any significant hardware or change software on the computer before this problem?
    2. When do you get exactly the error message?
    3. Have you tried to connect to any other computer on this flash drives?
    4. Your USB key works on other computers or have you tried to connect to different USB ports on this computer?
    5. Is the pen drive getting detected in the case or you are able to access the drive folder in the window of the computer ?

    The question may arise if the currently loaded USB driver has become unstable or damaged, or if your PC requires an update for problems that could conflict with a device USB and Windows. This can also occur if your USB controllers may have become unstable or corrupt. So, I would suggest trying the following steps and check if the problem persists.

    Method 1:

    Please try the fixit (s) provided below which will help you solve common problems associated with devices and USB ports.

    If method 1 does not work, try Method 2.

    Method 2:

    Remove and reinstall all USB controllers.

    1. Open Manager devices by clicking the Start button, click Control Panel, click system and security, and then, under System, clicking Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    2. In the list of the categories of equipment, locate and expand Bus USB controllers.
    3. Right-click every device under the Bus USB controllers node and then click Uninstall to remove them one at a time.
    4. Restart the computer and let the USB controllers get reinstalled.

    Plug in the removable USB device and test to make sure that the problem is solved.

    If the problem persists, go to method 3.

    Method 3:

    This method will install the latest drivers from device to your USB device.

    1. Click the Start button, type Windows Update in the search box, and then click Windows Update in the results pane.
    2. Click find updates. When the scan finished, click optional review updates.
    3. Click the check box next to the update, and then click install updates.
    4. If you are prompted, read the license agreement, then click I agree.
    5. Follow the instructions on the screen to download and install updates.
    6. If you are prompted, restart your computer.

    More information: Update a hardware driver that is not working properly

    Hope this information is useful. If the problem still persists, please post back for further assistance, we will be happy to help you.

  • 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

  • Select the line with the smallest Beach

    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    Any help will be appreciated!

    Thank you
    fcbman

    Hello

    fcbman1899 wrote:
    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    Whenever you have a problem, please post CREATE TABLE and INSERT statements for your sample data, in order to let the people who want to help you re-Ridge the problem and test their ideas.
    See the FAQ forum {message identifier: = 9360002}

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    To find all the rows that are within the range of at least one other line with another location:

    SELECT     *
    FROM     table_x  m
    WHERE     EXISTS (
                 SELECT  1
                 FROM        table_x
                 WHERE   location          != m.location
                 AND        value          <= m.value
                 AND        value + poolsize     >= m.value + m.poolsize
                )
    ;
    

    When you talk of the "" * most * inner range ", do you mean that you might have another line, such as"

    INSERT INTO table_x (id, vlue, poolsize, location) VALUES (5, 37, 1, 'C');
    

    which is inside the range of id - 4, and that's why you wouldn't have id = 4? If so, include examples in the results and data sample yout. You can do this with a query CONNECT BY, or, depending on your version of Oracle, a WITH recursive clause.

  • What is the problem with this pl/sql code?

    What is the problem with this statement of the cursor? I am getting PLS-00341 error for her:
    CURSOR cur_rsource(p_sql_stmt IN VARCHAR2) IS
            SELECT plan_table_output FROM v$sql s, table(dbms_xplan.display_CURSOR(s.sql_id, s.child_number)) t WHERE sql_text LIKE '''%'||p_sql_stmt||'%''';
    How to solve this problem?

    Thank you

    Published by: PhoenixBai on December 14, 2009 14:05

    I don't have time right now to study exhaustively, but for me his vomit ORA-00942 table or view does not exist on this line:

        SELECT sql_id, child_number into tmp_sql_id, tmp_child_number
             from v$sql where sql_text like sql_statement||'%' and sql_text not like '%v$sql%';
    

    I am able to select from v$ sql in normal SQL as user I am compiling as, so don't know why it's complaing.

    Anyone know if there are certain restrictions on access to the views v$ through PL/SQL?

    EDIT: http://www.dbasupport.com/forums/showthread.php?t=22299

    Access to the views of $ v seems to be through a role - try giving explicit access to it.

    As SYS, you must grant select permissions on V_$ SQL (V$ SQL is synonymous with V_$ SQL) to your owner of the procedure. Just tested on my system and it allows him to compile.

    Published by: Cyn on December 14, 2009 10:30

  • What is the problem with my trigger :(

    Hi friends

    What is the problem with this trigger please
    SQL> select object_type from user_objects where object_name='CE_STMT_INT_TMP';
    
    OBJECT_TYPE
    -------------------
    TABLE
    
    SQL> create or replace trigger ce_stmt_int_tmp_trg1
      2  after insert on ce_stmt_int_tmp
      3  for each row
      4  begin
      5      :new.column7 := 'checkno_test';
      6  end;
      7  /
    create or replace trigger ce_stmt_int_tmp_trg1
                              *
    ERROR at line 1:
    ORA-04084: cannot change NEW values for this trigger type
    Thank you very much

    I guess you mean that SQL * Loader is insertion of the value of the column, not not to date. You can override the value SQL * Loader is the insertion in a level line BEFORE INSERT trigger.

    Justin

  • The problem with recording

    Well, just at the moment where someone starts calling and he wants to take he writes "the problem with the recording" he calls here Echo and all the time the same... They advised you'd like?

    In Skype, open Tools-> Options-> Audio settings. Which device is selected as the Microphone. You have several options available in the select box?

  • What is the problem with Safari?

    Since the last update of El Capitan, Safari has become almost worthless.  I can't use it. It will give me the beach whirling death ball. I can not click through links. the full page is not displayed.

    What the * is the problem with that?  It's the kind of shit that I would wait in a Microsoft product. I had started using Chrome.

    What the * wrong with Safari and when you're going to fix?

    Try to reset the settings of Safari:

    1. open Safari

    2. click on the Safari menu at the top (to the right of the Apple logo)

    3. Select the Preferences/Privacy tab

    4. click on remove all data from the Web site

    5. close Safari.

    Remove cache Safari files:

    1. click on finder

    2. look for the menu GO to top

    3. click on GO and hold down the option key. This will show a user library folder.

    4. click library and find the Caches folder

    5. in the folder caches com.apple.Safari Ouvrezledossier

    6. move the Cache.db file Trash.

    This should solve the problem. If it does not help, try to disable the Safari extensions

    1. open Safari

    2. click on the Safari menu at the top (to the right of the Apple logo)

    3. Select Preferences

    4. find the Extensions tab

    5 disable all extensions of

    6. relaunch Safari

  • Always the problem with e-mail after trying to repair it with uninstall

    When I try to delete e-mails, it is said: msg store was damaged by an external application to windows mail. Windows mail at recovered. error 0 x 0000000.

    I delete the emails and they do not appear in my file delete so I can remove them permanently. When I opened my email each day the same messages deleted come thru with exactly the same day as before and as a new email. I have the border in Arizona as my provider. I followed the instructions of a similar problem, I was alerted by going to programs, uninstall, repair, but no luck, same thing back on email. I get emails with the date of the day on them, so I'm able to send and receive. Exactly what remove file showing nothing as deleted, and when I click on an e-mail I deleted it says that it does not. I use the computer for email and internet, that's all. My computer is a windows vista Basic. Thanks for any further help.

    Hello

    You use Norton or McAfee av?  I suggest to uninstall these and select free software such as Microsoft Security Essentials, Avast or AVG.  These work properly with Windows Mail.

    How to fix most of the problems with Windows Mail

    http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.html

    Alternatively, you can consider the use of the Windows Live Essentials Mail instead of Windows Mail application.

  • The OID of the Migration of OUD, hitting the problem with the attribute pwdhistory OUD

    The OID of the Migration of OUD, hitting the problem with the attribute pwdhistory OUD

    I use sync DIP at the end of migration of data from OID for target OUD. Everything seems great so far, I have found that pwdhistory being migrated is not being validated by OUD password policy

    I do import ldif for OUD and find this pwdhistory field is populated with the same OID value. When I reset password in OUD-DOHAD with the word in the history of password,.

    Expected Behavior: Error Message from the OUD "" LDAP: error code 20 - already the value of specified password exists in the user input " "

    Course Behavior: OUD is what allows to reset the password in the password history

    Also found that when I try again with the same password, then it throws the error 20 code. OUD replaces the old values in pwdhistory after the password resets and written new values with stamp of password.

    It is a Blocker for us for migration in the history of password, I would like to join the forum and check if someone had the same problem and how they managed it?

    Thank you

    Satya

    Support of Oracle confirmed that DIO history for the OUD password migration is not supported. The OID and OUD records and validates the pwdhistory differently

  • Select the data in a table and update in another table

    Dear experts,

    create the table TB_ENCRYPT

    (

    Identification number,

    Varchar2 (200) KEY

    );

    INSERT INTO TB_ENCRYPT VALUES(1,'HJUVHDUIFBSDGVU');

    SELECT * FROM TB_ENCRYPT;

    1 HJUVHDUIFBSDGVU

    create TABLE users)

    username, NUMBER of

    password VARCHAR2 (200)

    );

    Insert users

    values (1, 123 # "")

    Insert users

    values (2, 456 #')

    Select * from users;

    1 123 #.

    # 2 456

    I want to select the data KEY for table TB_ENCRYPT column and update in the column of tables for the respective key user password

    TB_ENCRYPT table contains only a single key value. Comparing this key, I want to update the old value of the key to the new value.

    For encryption and decryption I followed the java class method.no is worried about that.

    create or replace

    PACKAGE PCK_ENC AUTHID CURRENT_USER AS

    FUNCTION DECRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.decrypt (java.lang.String, java.lang.String) return java.lang.String ';

    FUNCTION ENCRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.encrypt (java.lang.String, java.lang.String) return java.lang.String ';

    END;

    SELECT PCK_ENC. ENCRYPT('1234','HJUVHDUIFBSDGVU') FROM DUAL;

    HERE,

    1234 - is the password of the users table column data

    HJUVHDUIFBSDGVU - represents the key of table TB_ENCRYPT column data.

    Comparing this key, I want to update the old value of the key to the new value.

    I tried with this method

    declare

    cursor c1 is

    Select the key

    of TB_ENCRYPT

    where id = 1

    update the id;

    Start

    for c1_rec looping c1

    update users

    password is PCK_ENC. Encrypt (Password, Key)

    the location being c1;

    commit;

    end loop;

    end;

    /

    Help, please

    You can use the MERGE statement.

    merge into users
    using tb_encrypt
       on (id = userid)
      when matched then
          update set password = PCK_ENC.ENCRYPT(password,key);
    

    And why you encrypt your password. This isn't a good idea. Just password hash.

  • What is the problem with my Oracle reports parameter?

    Hello

    We use a PL SQL package that allows the user to select the report you want Oracle and associated parameters.   While the control is passed to Oracle 11 g reports.

    The requirement of one of the reports is to enable more detailed codes be selected by the user and then shown.  The detailed code is an alphanumeric field that can hold between 4 and 6 characters.

    If my data model looks like this

    SELECT student_id

        FROM my_view

       WHERE detail_code IN :p_detail_code;

    and the parameter that I'm passing to Oracle reports looks like this (when I view the source HTML code)

    & p_detail_code =('1001','1002')

    so no record is selected.

    However, if my data model looks like this, I get the records you want:

    SELECT student_id

      FROM my_view

    WHERE detail_code IN ('1001', '1002');

    We have Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production.

    Please tell me what is the problem with my setting.  Thanks a lot for your help.

    This isn't how you can use in. See this example on how to solve it with the digital settings. If your setting is a character, you need to change this.

    In fact, when you simply enter 1,2,3 as an input parameter, you actually create this query:

    Select *.

    from my_table

    where num_column in ("1,2,3")

    Use rather a lexical parameter:

    Select *.

    from my_table

    & p_where

    In the parameter after relaxation shape, build the lexical like this:

    :p_where := 'where num_column in ('||:p_param||')';
    
  • I agree with the CC. But I also have APS CS6. I get the message that the updates are available. But whenever I try to 'install', I get the message that it failed and the error code is U44M1P7. What is the problem with obtaining this update?

    Whenever I try to install I get message that he had failed. The error code is U44M1P7. What is the problem with this update?

    U44... Update error http://forums.adobe.com/thread/1289956 can help

    At some point in the past (I don't know the exact date) Adobe "merged" the original update manager in cloud Update Manager, which means that you no longer use your original update manager

    I read a lot of posts that the updater latetest (cloud) sometimes does not work with old programs... Try to install your updates manually

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

Maybe you are looking for