Correlation query does not work

create the table cust_age_sal (cust_id integer, integer whole age of sal);

create the table new_cust_age_sal (cust_id integer, integer whole age of sal);

insert into cust_age_sal values (1,10,100);

insert into cust_age_sal values (2,20,200);

insert into cust_age_sal values (3,30,300);

insert into cust_age_sal values (4,40,400);

commit;

insert into new_cust_age_sal values (2,21,201);

insert into new_cust_age_sal values (3,31,301);

commit;


Question

I want to update cust_age_sal using the customer_id which are present in the new_cust_age_sal;

I use queries, query1 and query2. Query1 is working and I get results and I want to know what is the problem with query2 and why it does not work

Query1:

UPDATE cust_age_sal u

SET (age, sal) =

(

SELECT age, sal

OF new_cust_age_sal

WHERE cust_id = u.cust_id

)

where u.cust_id in (select cust_id from new_cust_age_sal)

---

query2:

UPDATE cust_age_sal

SET (age, sal) =

(

SELECT age, sal

OF new_cust_age_sal

WHERE cust_id = u.cust_id

)

Hello

2742751 wrote:

It is except o/p I'm looking

O/p: except

I think you want to say "whereas", not "excluded".

CUST_ID AGE SAL

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

1                      10                     100

2                      21                     201

3                      31                     301

4                      40                     400

But when I run under query that is show below output even if I use the join on the target table condition. Why is it show empty for CUST_ID = 1 and 4

UPDATE cust_age_sal u

SET (age, sal) =

(

SELECT age, sal

OF new_cust_age_sal

WHERE cust_id = u.cust_id

)

CUST_ID AGE SAL

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

1

2                      21                     201

3                      31                     301

4

A UPDATE instructions without WHERE clause will update with each row in the table.

In the case of cust_id = 1, what will that do?  Well, what makes the following query?

SELECT age, sal

OF new_cust_age_sal

WHERE cust_id = 1;

?  It produces no line.  When you use a subquery in a SET of an UPDATE statement clause (as you do) and the subquery returns no rows, then updated the columns with a NULL value.

If you don't want to update all rows, but want lines updates which fulfil certain conditions (for example, have a corresponding row in new_cust_age_sal), and then use a WHERE clause in the UPDATE statement, as you did in your first UPDATE statement.

Instead of an UPDATE statement, you can also use a MERGE statement, like this:

MERGE INTO dst cust_age_sal

With the HELP of new_cust_age_sal CBC

WE (dst.cust_id = src.cust_id)

WHEN MATCHED THEN UPDATE

SET dst.age = src.age

dst.sal = src.sal,

;

In this way, you don't need to repeat what is essentially the same subquery in the GAME and WHERE clauses.

Tags: Database

Similar Questions

  • Query does not work on my iPad (was: media query question)

    I am a site for mobile/tablet/Office of coding and while my office and the iphone respond to the CSS, my ipad does not work. The changes that I do take the tablet in dreamweaver, but when they go live the ipad does not. Of course, my media query must be incorrect, but I can't understand the question. Any help is very appreciated.

    http://gbetza.mydomain.com/WebService2/test/KathrynFee/2014/profile.html

    Thank you.

    Yes.  It is inevitable because smart phones are getting bigger while tablets are smaller & more.  He's always going to be some crossover.   Think of it this way, when a Tablet is behaving as a mobile device, he takes over the mobile network.  When the shelf behaves more like a desktop computer, you need the layout of office.

    Similarly, a great smartphone in landscape mode is likely to resemble the layout of your tablet.

    See the FluidGrid example below:

    http://ALT-Web.com/FluidGrid/Fluid2.html

    Office = 4-col layout

    Tablet = 2-col layout

    Mobile = 1-col layout

    For purposes of illustration, I added a thick border of gold at the disposal of the Tablet only.

    / * Tablet Layout: 481px to 768px. Inherits the styles of: Mobile layout. */

    @media only screen and (min-width: 481px) and (max-width: 768px) {}

    .gridContainer {width: 92%; border: 16px solid gold}

    }

    Nancy O.

  • WS 2.0 query does not work

    Hi all

    I have a small problem...

    I'm trying to create a query with ws 2.0 but I Don t get a response but the 400 error message.
    The connection works very well and I also get my session ID, but when I try to do a query it always comes with the
    Server returned HTTP response code: 400 for URL: https://secure-ausomxgva.crmondemand.com/Services/Integration/CustomObject5;jsessionid=4e06330622aaf934c2068a7b02766c1c0a5eda9a04782b201b63fba91893bb80.e3iRbxiPbxj0bNaKaxaSa3n0;

    I Don t know why it does not work... my SOAP Message I send to the system looks like this:

    <? XML version = "1.0" encoding = "utf-8"? >
    < xmlns:soap: envelope soap = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xmlns:WSSE = "http://schemas.xmlsoap.org/ws/2002/xx/secext" container = "http://www.w3.org/2001/XMLSchema".
    SOAP: encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/" >
    < soap: Body >

    < CustomObject5QueryPage_Input xmlns = "urn: crmondemand/ws/ECB/customobject5/10/2004" >
    < ListOfCustomObject5 xmlns = "" urn: / crmondemand/CustomObject5/query/xml "pagesize ="100"recordcountneeded ="true"startrownum ="0">"
    < CustomObject5 searchspec = "[CustomObject5Id] AS ' *'" >
    < CustomObject5Id / >
    < / CustomObject5 >
    < / ListOfCustomObject5 >
    < / CustomObject5QueryPage_Input >

    < / soap: Body >
    < / envelope soap: >

    I programmed in Java. The Soap Action is "document / urn: crmondemand/ws/customobject5/10 / 2004:CustomObject5QueryPage.
    I hope someone can help me or identifies an error...

    If you want more information, just ask. I'm looking for this error several hours now without success...

    Thank you very much in advance!

    You could try changing your SOAPAction header to
    "document / urn: crmondemand/ws/ECB/customobject5/10 / 2004:CustomObject5QueryPage.

    Also, you should be able to recover the additional error information in your application. When I tried a request with the HTTP SOAPAction header that you use, I got the following error message:

    The remote server returned an error: bad request (400).

    The HTTP request did not contain a valid SOAP action header. The value of the header has been "document / urn: crmondemand/ws/customobject5/10 / 2004:CustomObject5QueryPage.

  • Query does not work in: interactive report _ APEX

    Hello

    I have two table QB_COLLEGE_DETAILS and QB_STUDENT_DETAILS, in the college details are stored in the QB_COLLEGE_DETAILS table and by studying the details are stored in the QB_STUDENT_DETAILS table. In the primary key table and foreign key in the COLLEGECODE.  Now, I created the interactive report using code below, but does not receive the correct value in the number of student column (see image below).

    SELECT COLLEGENAME, COLLEGECODE, COORDNAME, COORDEMAIL,

    (SELECT count (s.STUDENT_REGISTER_NUMBER) AS STUD_COUNT of QB_COLLEGE_DETAILS c, s QB_STUDENT_DETAILS

    where c.COLLEGECODE = s.COLLEGECODE) "STUDENT_COUNT".

    of QB_COLLEGE_DETAILS;

    Report.JPG

    My requirement is necessary find the number of students at the corresponding College. When I used above mentioned request that total student number appear in all lines.

    could you add your suggestion, I have to do?

    Thank you

    Issac

    ISSAC-Oracle wrote:

    I have two table QB_COLLEGE_DETAILS and QB_STUDENT_DETAILS, in the college details are stored in the QB_COLLEGE_DETAILS table and by studying the details are stored in the QB_STUDENT_DETAILS table. In the primary key table and foreign key in the COLLEGECODE.  Now, I created the interactive report using code below, but does not receive the correct value in the number of student column (see image below).

    SELECT COLLEGENAME, COLLEGECODE, COORDNAME, COORDEMAIL,

    (SELECT count (s.STUDENT_REGISTER_NUMBER) AS STUD_COUNT of QB_COLLEGE_DETAILS c, s QB_STUDENT_DETAILS

    where c.COLLEGECODE = s.COLLEGECODE) "STUDENT_COUNT".

    of QB_COLLEGE_DETAILS;

    My requirement is necessary find the number of students at the corresponding College. When I used above mentioned request that total student number appear in all lines.

    could you add your suggestion, I have to do?

    What you need to do is ask questions properly, providing useful information that allowing the problem can be reproduced, rather than unnecessary screenshots.

    This is the base of SQL. Oracle run internal SQL training courses?

    There is no correlation in your "virtual column" subquery to restrict the number of students for each college. The request must be:

    select
        c.collegename
      , c.collegecode
      , c.coordname
      , c.coordemail
      , (select count(s.student_register_number) as stud_count from qb_student_details s where c.collegecode = s.collegecode) "STUDENT_COUNT"
    from
        qb_college_details c
    

    However, unless there are a large number of colleges to which no students registered, it is likely that it will be more efficient to use an outer join:

    select
        c.collegename
      , c.collegecode
      , c.coordname
      , c.coordemail
      , count(s.student_register_number) student_count
    from
        qb_college_details c
          left outer join qb_student_details s
            on c.collegecode = s.collegecode
    group by
        c.collegename
      , c.collegecode
      , c.coordname
      , c.coordemail
    
  • Classic report, query does not work

    Hello

    I have a query that allows to choose from a table manufacturing exists in the other. It works in another query editor. But not in the Apex or in classic report page.

    SELECT q.user_name, COUNT (*) say
    OF kom_qabz.kom_qabz q
    WHERE q.amount IS NOT NULL
    AND THERE ARE
    (SELECT 1
    FROM: kom_qabz.kom_qabz_history
    WHERE h.copy_time > = TO_DATE ('20120803', 'YYYYMMDD') - 1
    AND h.copy_time < TO_DATE ('20120803', 'YYYYMMDD')
    AND h.qabz_number = q.qabz_number
    AND h.seriya_id = q.seriya_id)
    GROUP BY q.user_name

    Is there any problem?

    Hello

    Has received the kom_qabz schema for the workspace of the application when you generate the report?

    See you soon,.

  • Query does not work in MySql

    I have a script of calendar that I use to get the numbers in the table and showing them in a calendar. The query works in Access, but not in MySql. What is the problem with the syntax?

    Error: [MySQL] [ODBC 3.51 Driver] [mysqld - 4.0.26 - standard], you have an error in your SQL syntax. Consult the manual for your version of the MySQL server for the right syntax to use near ' (date_added) LIKE dd FROM estar_pledge WHERE date_a

    I'm really confused, if any help on that would be great, thanks.

    Chris

    Mysql documentation:
    Day (date)

    Day() is synonym for DAYOFMONTH(). It is available from MySQL 4.1.1.
    HTH
    --
    Tim Carley
    www.recfusion.com
    [email protected]

  • Update query does not work (ora-01427)

    RDBMS 10 g 2

    Long story short, I created a column in a table in another table, that it has been moved is not really necessary that all other information is stored in other tables. With the original column has values that need to be copied to the new column before the old table is deleted.

    I use this update query:
    update bi_req bir
       set bir.job_name =
            (select distinct bij.job_name
               from bi_jobs bij,
                    bi_freq bif,
                    bi_apps bia,
                    bi_req  bir
              where bij.fk_bi_req_id = bir.pk_bi_req_id
                and bia.pk_bi_apps_id = bij.fk_bi_apps_id
                and bif.pk_bi_freq_id = bij.fk_bi_freq_id)
     where bir.job_name is null;
    If I run the select statement separately, I get the exact results that I need however, every time I run the whole statement, I get:
    Error: ORA-01427: single-row subquery returns more than one row

    The problem is that your subquery returns two or more names different jobs for a line of update.

    Which of these task names are you using? If it is not serious, then you can go with a like this aggregate query

    update bi_req bir
       set bir.job_name =
            (select max(bij.job_name) /* use just one job name */
               from bi_jobs bij,
                    bi_freq bif,
                    bi_apps bia
            where bij.fk_bi_req_id = bir.pk_bi_req_id
                and bia.pk_bi_apps_id = bij.fk_bi_apps_id
                and bif.pk_bi_freq_id = bij.fk_bi_freq_id)
     where bir.job_name is null;
    

    What I don't understand is why you need the bi_freq and bi_apps in the subquery. A simple query as follows: should not be enough?

    update bi_req bir
       set bir.job_name =
            (select max(bij.job_name) /* use just one job name */
               from bi_jobs bij
            where bij.fk_bi_req_id = bir.pk_bi_req_id)
     where bir.job_name is null;
    

    Published by: W. Sven on September 4, 2009 14:06

  • SQL query does not work coccrectly

    The table contains the list of months and years.
    When I write
    SOME MONTHS, YEAR FROM MONTH_DETAILS ORDER BY DESC, YEAR DESC;
    It works correctly and returns
    MONTH YEAR
    7 2009
    6 2009
    5 2009
    4 2009
    3 2009
    2 2009
    1 2009
    12 2008
    11 2008
    But when I want to get only the first (month = 7 and year = 2009) and change the query like this
    SOME MONTHS, the YEAR OF MONTH_DETAILS WHERE ROWNUM = 1 ORDER BY YEAR DESC, DESC;
    It returns
    MONTH YEAR
    2 2009
    .
    What is the problem?
    The year and month fields are defined as numbers.
    SELECT MONTH,YEAR FROM (select * from MONTH_DETAILS ORDER BY YEAR DESC,MONTH DESC) WHERE ROWNUM=1 
    

    first make order and apply the rownum on him...

    Ravi Kumar

  • That means 1e9 and why this query does not work?

    What does 1e9? Someone has links to documentation on this oracle? And why I get this error?
    SQL> select segment_name,(bytes/1e9) AS size from dba_segments where segment_name='MSG_MASTER';
    select segment_name,(bytes/1e9) AS size from dba_segments where segment_name='MSG_MASTER'
                                       *
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected

    SIZE is a keyword - so if you want the name of the column size then use 'SIZE' else give it a different name

    Try dividing by other exponentials, then you'll see how: 1e0 1e1 (div 1), (div by 10), 1e2 :-) etc

    Mette

    Published by: mettemusens on 2009-05-12 16:02

  • Why this query does not work on the CF when it works fine on MYSQL?

    Subject says it all. I can run it through console mysql and get the result that I need, but when I place it inside a cfquery that he will not treat.

    SET @saldo = 20000;
    SELECT
    IF (Co.transtipo=0,@saldo:[email protected],@saldo:=@saldo+t.transmonto),
    @saldo: = @saldo - t.transmonto.
    t.TransID,
    t.cuentaid,
    t.operacionid,
    t.fechatrans,
    t.voucher,
    t.cheque,
    t.transtitular,
    t.transmonto,
    t.transdetalle,
    t.modificado,
    Co.transtipo,
    Co.Operacion
    OF cuentastrans t
    LEFT JOIN cuentasoperacion co ON t.operacionid = co.operacionid
    WHERE the t.cuentaid = 7
    ORDER BY t.fechatrans ASC

    Fixed, coldfusion must be labeled with 'AS' of the expressions in the opposite case he used to index the column.

  • SQL query does not work well

    Hello
    I did a small table with 5 rows and want to make a consult sql using rownum

    so I'm running
    select * from mytable where rownum = 1;
    and it gives me the first line but if I change the 1 to a 2 or 3 or 4 or 5, it is said that there's nothing: S

    why?????????????????????

    But if I change to between 1 and 5, he gave me 4 rows: S: S

    why???????????????????

    Try this:

    SELECT *
    FROM (
       SELECT bne.*, rownum myrow
       FROM BAN_EVENTOS_CONFIRMACION bne WHERE ROWNUM <=5)
    WHERE myrow = 2;
    
  • Jdev - query Tester does not work

    Jdev Version: 11.1.1.7.1

    The query VO on my Jdev Tester does not work. More importantly on my your Expert mode, when I add a new column to SQL, the attributes do not automatically get added to the VO. Only clue I have is the bottom of the stack trace that is thrown when I click on "Query Builder" (other buttons as Test donot throw any error and no success message):

    java.lang.NullPointerException

    at oracle.javatools.db.jdbc.JdbcDDLDatabase.registerBuilders(JdbcDDLDatabase.java:453)

    to oracle.javatools.db.AbstractDatabase. < init > (AbstractDatabase.java:85)

    to oracle.javatools.db.ddl.DDLDatabase. < init > (DDLDatabase.java:50)

    to oracle.javatools.db.jdbc.JdbcDDLDatabase. < init > (JdbcDDLDatabase.java:74)

    at oracle.javatools.db.jdbc.JdbcDatabaseFactory.createDatabaseImpl(JdbcDatabaseFactory.java:35)

    at oracle.javatools.db.DatabaseFactory.createDatabaseImpl(DatabaseFactory.java:241)

    at oracle.javatools.db.DatabaseFactory.createStandaloneDatabase(DatabaseFactory.java:344)

    at oracle.javatools.db.DatabaseFactory.findOrCreateDatabase(DatabaseFactory.java:326)

    at oracle.jbo.dt.jdevx.ui.view.XVOQueryBuilder.createDatabase(XVOQueryBuilder.java:273)

    at oracle.jbo.dt.jdevx.ui.view.XVOQueryBuilder.invokeQueryBuilder(XVOQueryBuilder.java:56)

    at oracle.jbo.dt.jdevx.ui.JdxMenuManager.invokeQueryBuilder(JdxMenuManager.java:1615)

    at oracle.jbo.dt.ui.view.VOClausePanel.queryBuilderAction(VOClausePanel.java:2440)

    at oracle.jbo.dt.ui.view.VOClausePanel.actionPerformed(VOClausePanel.java:1390)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)

    in java.awt.Dialog$ 1.run(Dialog.java:1046)

    in java.awt.Dialog$ 3.run(Dialog.java:1098)

    at java.security.AccessController.doPrivileged (Native Method)

    at java.awt.Dialog.show(Dialog.java:1096)

    at java.awt.Component.show(Component.java:1585)

    at java.awt.Component.setVisible(Component.java:1537)

    at java.awt.Window.setVisible(Window.java:842)

    at java.awt.Dialog.setVisible(Dialog.java:986)

    at oracle.jbo.ui.main.JboDialog.setVisible(JboDialog.java:130)

    to oracle.jbo.ui.wizard.JboWizard$ MddWizardDialog.setVisible (JboWizard.java:2558)

    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)

    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)

    at oracle.jbo.ui.main.JboDialog.showDialog(JboDialog.java:108)

    to oracle.jbo.ui.wizard.JboWizard$ MddWizardDialog.showDialog (JboWizard.java:2494)

    at oracle.jbo.ui.wizard.JboWizard.createMddWizard(JboWizard.java:550)

    at oracle.jbo.ui.wizard.JboWizard.setVisible(JboWizard.java:353)

    at oracle.jbo.ui.wizard.JboWizard.showDialog(JboWizard.java:331)

    at oracle.jbo.dt.jdevx.ui.editors.view.VoeSqlPage.showEditSqlDialog(VoeSqlPage.java:625)

    at oracle.jbo.dt.jdevx.ui.editors.view.VoeSqlPage.invokeEditSqlDialog(VoeSqlPage.java:592)

    at oracle.jbo.dt.jdevx.ui.editors.view.VoeSqlPage.performAction(VoeSqlPage.java:935)

    at oracle.jbo.dt.ui.main.controls.DtcAction.actionPerformed(DtcAction.java:47)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Any idea on what could be the problem?

    The question seems to be to the JDBC data source that we define in the configuration Module of the Application screen. We have a JNDI to data source, and somehow at design time, the your do not work with it. Currently, I change that to a local data source, the tester of VO, requeteur all work fine.

  • INsert Into does not work in the query

    I wrote this part of my web site that allows you to insert records in the DB. Right now it does not work properly. I get no error, but I do not also get a new record. Can you see why this is happening? I write two pages of code, the edit page and the action page. I can't understand what Miss me.

    Change page:

    < name = "cfparam url.id' type = 'integer' default = '0' >"
    < name cfparam = "variables. ProjectID' type = "integer" default = "#url.id #" >
    < name = "cfparam variables.proj_name" default = "" > "
    < name cfparam = "variables. Default Description"=" ">
    < name cfparam = "variables. Default CategoryID"=" ">
    < name = "cfparam variables.cat_name" default = "" > "
    < cfif url.id GT 0 >
    "< name cfquery ="projMan"datasource =" "#sitedatasource #" username = "#siteUserID #" password = "#sitePassword #" >
    SELECT c.CategoryID,
    c.Name AS cat_name,
    p.ProjectID,
    p.Name AS proj_name,
    p.Description
    CATEGORIES AS c
    INNER JOIN project GOT p ON c.CategoryID = p.CategoryID
    WHERE p.ProjectID = < cfqueryparam value = "" #URL.ID # "cfsqltype ="cf_sql_integer">"
    AND c.CategoryID = p.CategoryID
    < / cfquery >
    < cfif projMan.RecordCount EQ 1 >
    < cfset variables. ProjectID = projMan.ProjectID >
    < cfset variables.proj_name = projMan.proj_name >
    < cfset variables. Description = projMan.Description >
    < cfset variables.cat_name = projMan.cat_name >
    < cfset variables. CategoryID = projMan.CategoryID >
    < / cfif >
    < / cfif >
    < name cfquery = 'catList' datasource = "" #sitedatasource # ""
    username = "" #siteUserID # "password =" #sitePassword #">"
    SELECT DISTINCT categories. CategoryID, Categories.Name AS cat_name
    Categories
    ORDER BY name
    < / cfquery >
    < head >
    < / head >
    < body >
    < cfoutput >
    < form action = method of "project - Action.cfm" = "post" name = 'projects' id = 'projects '.
    enctype = "multipart/form-data" onsubmit = "saveIt ()" >
    < input type = "hidden" name = 'ID' value = '#variables. ProjectID #">"

    < input type = "text" name = 'proj_name' class = 'textInputs"value =" ' #variables.proj_name # ' maxLength '510' = > "

    "< textarea cols =" "lines =" "name ="PDSeditor"style =" display: none "> #variables. Description # < / textarea >

    < select name = "CategoryID" size = "1" class = 'everyday' >
    < IsDefined ("projMan.CategoryID") cfif >
    < option value = "#projMan.CategoryID #" > #projMan.cat_name # < / option >
    < cfelse >
    < option value = "" >--select a category--< / option >
    < / cfif >
    < cfloop query = 'catList' >
    < option value = "#CategoryID #" > #cat_name # < / option >
    < / cfloop >
    < / select > < / cfoutput >
    < / body >


    «"" "Action page:»»"»

    "< cfquery datasource =" "#sitedatasource #" username = "#siteUserID #
    password = "#sitePassword #" >
    Projects UPDATE
    SET
    Projects.Name = < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.proj_name #" >.
    Projects.CategoryID = < cfqueryparam value = '#form. "CategoryID #" cfsqlType = "CF_SQL_INTEGER" >.
    Projects.Description = < cfqueryparam cfsqltype = "cf_sql_longvarchar."
    value = '#form. PDSeditor #">"
    WHERE ProjectID = < cfqueryparam value = "" #form.ID # "cfsqlType ="CF_SQL_INTEGER">"
    < / cfquery >
    < cflocation url = 'project - manager .cfm' >
    < cfelse >
    "< cfquery datasource =" "#sitedatasource #" username = "#siteUserID #
    password = "#sitePassword #" >
    INSERT INTO projects
    (Name, Description, CategoryID)
    VALUES
    (< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.proj_name #" >,)
    < cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form. PDSeditor #">,"
    < cfqueryparam value = '#form. ("CategoryID #" cfsqlType = "CF_SQL_INTEGER" >)
    < / cfquery >
    < cflocation url = 'project - manager .cfm' >


    I don't see why there is no records are transferred to the DB. Can someone help me?

    Thank you.

    Phoenix

    the order of the values that you insert is different from the order of the array
    fields, that they are inserted in your INSERT query:

    INSERT INTO projects
    (Name, body, MYFile, CategoryID)
    VALUES
    (,
    ,
    ,

    NULL = "#NOT fileuploaded # ' >)

    in the part of the INSERTION, the order of the fields is NAME, BODY, MYFILE CATEGORYID
    in the part of VALUES, the order of the values is NAME, BODY, CATEGORYID, MYFILE

    HTH

    ---
    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com

  • Query with a subquery should return a value but does not work

    When I run this SQL, it does not return value:

    SELECT vfn.cat
    OF vfn, valid_fishery vf vps_fishery_ner
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery 't ='
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL '.
    AND vfn.date_issued = (SELECT MAX (date_issued)
    OF vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010);

    To test, I remove the subquery and run it separately:
    SELECT MAX (date_issued)
    OF vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010;

    Returns 2 April 10

    Then I paste the date into the original query (using her TRUNCATES the function, of course, since I'm only part DDMMYY hardcode the date):

    SELECT vfn.cat
    OF vfn, valid_fishery vf vps_fishery_ner
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery 't ='
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL '.
    AND TRUNC (date_issued) = TO_DATE('02-APR-10');

    And returns the required value, "A".

    So why the complete query with a subquery does not work, if the value returned by the subquery is valid and works when you just pasted in there?
    Thank you.

    Hello

    Maybe you should include this in the subquery as well?

    AND vfn.plan = 'MUL'
    
  • SQL query simple SQL Developer takes, the wizzard of XE does not work

    Hello everyone

    I wrote this simple query that developer SQL works well, but when I try to run a report based on this sql query, it tells me invalid sql statement. It's true, maybe it's not valid because this IF clause in there... but Developer SQL seems to be very tolerant or includes more...

    I wrote this is because obviously if there is no Boss, ie = 0 then I would get an error when it division by 0, so I put that 0 just for selecting the right


    If count (bosses) > 0
    Select company, zip code.
    sum (Boss/staff)
    assessment
    Group of company, zip code

    Thank you very much

    Alvaro

    Ok. This should work:

    Select company, zip code.
    -case when count (staff)! = 0 here end sum (Boss/staff)
    assessment
    Group of company, zip code

    If this does not work, could you please explain, how your table looks like?

Maybe you are looking for

  • Portable Satellite 1800-750 cannot read DVDs that require files avi (codec)

    my laptop satellite S1800-750 cannot read DVDs that require avi (codec) files. l have updated dvd drivers and upgrades of my multimedia player of series 10, but nothing helped. I need emergency aid.

  • Re: After installing Bitdefender cannot access F8 at startup to recover the system.

    Bidefender installed on a Satellite L755 out-of-the box. When the Starter have 2 options:Recovery of BitDefender or Windows 7. Any option is selected, the laptop stuck. Wanted to use F8 to access recovery and reset the machine to factory default. Hit

  • Synchronize the video and data - Version tiara?

    What version of DIAdem is required to synchronize playback video and data?  Can I synchronize two videos at the same time with a data source, or does have a video with a data source?

  • Overclocking Aspire E15?

    Just bought an Aspire E15 ES1-512-the P9GT Its got 4 GB of RAM and an Intel Pentium Quad Core N3540. His pace to 2.16 GHz out of the box, but it can be "Turbo Boost" to 2.66 GHz. I already checked the BIOS settings, can't seem to be able to find a wa

  • HP Pavilion g4 laptop keyboard does not

    I have a laptop HP Pavilion 1015dx g4. In recent weeks, my laptop was very loud and also work well. So, I read an article in the HP website on the cleaning of the fan. So I disassembled my laptop and cleaned the fan. Then, I put in place what it was