Pure SQL and Border Use Cases?

Hi Gurus
I was developing a DB Adapter to select data from Shipping tables. I did it by polling as well as with Custom SQL. While using the custom SQL I got the following error in my domain.log
(my query that I wrote) failes, Caused by java.sql.SQLException: Invalid column index.
The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
What is a border use case, how do I decide that. So BPEL support the custom sql option very loosely?
Thx

The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

Similar Messages

  • Need help in this sql query to use Case Statement

    hi All,
    I have the below query -
    SELECT DISTINCT OFFC.PROV_ID
    ,OFFC.WK_DAY
    ,CASE
    WHEN OFFC.WK_DAY ='MONDAY' THEN 1
    WHEN OFFC.WK_DAY ='TUESDAY' THEN 2
    WHEN OFFC.WK_DAY ='WEDNESDAY' THEN 3
    WHEN OFFC.WK_DAY ='THURSDAY' THEN 4
    WHEN OFFC.WK_DAY ='FRIDAY' THEN 5
    WHEN OFFC.WK_DAY ='SATURDAY' THEN 6
    WHEN OFFC.WK_DAY ='SUNDAY' THEN 7
    END AS DOW
    ,OFFC.OFFC_OPENG_TIME
    ,OFFC.OFFC_CLSNG_TIME
    FROM GGDD.PROV_OFFC_HR OFFC
    WHERE OFFC.PROV_ID='0000600'
    WITH UR;
    this query is bringing results in 6 differnt rows with opening and closing time for each day separately. I want to generate the data in one row with each day having opening and closing time, so for 7 days, total 14 columns with opening and closing time. But i am not able to do that using case statement.
    can somebody help me in achieving that.
    thanks,
    iamhere

    Hi,
    Welcome to the forum!
    That's called a Pivot .
    Instead of having 1CASE expression, have 14, one for the opening and one for the closing time each day, and do GROUP BY to combine them onto one row.
    SELECT       OFFC.PROV_ID
    ,       MIN (CASE WHEN OFFC.WK_DAY ='MONDAY'    THEN OFFC.OFFC_OPENG_TIME END)     AS mon_opn
    ,       MIN (CASE WHEN OFFC.WK_DAY ='MONDAY'    THEN OFFC.OFFC_CLSNG_TIME END)     AS mon_cls
    ,       MIN (CASE WHEN OFFC.WK_DAY ='TUESDAY'   THEN OFFC.OFFC_OPENG_TIME END)     AS tue_opn
    ,       MIN (CASE WHEN OFFC.WK_DAY ='TUESDAY'   THEN OFFC.OFFC_CLSNG_TIME END)     AS tue_cls
    FROM        GGDD.PROV_OFFC_HR OFFC
    WHERE       OFFC.PROV_ID     = '0000600'
    GROUP BY  offc.prov_id
    ;This assumes there is (at most) only one row in the table for each distinct prov_id and weekday. If not, what do you want to do? Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
    The staement above works in Oracle 8.1 and up, but there's a better way (SELECT ... PIVOT) available in Oracle 11. What version are you using? (It's always a good idea to include this when you post a question.)
    Edited by: Frank Kulash on Jan 6, 2011 8:22 PM

  • Sql proposed to use case statement

    Hi All
    Can anyone help me here
    This code works fine,here inthe inner sub queries(b,c,d,e,f),i am getting the weekly counts of usage data from the table mf_wer_OBI_USAGE_reqq.
    As this is hitting same table with the similar set of queries so i was adviced to use case statement by taking the wk_1...5 in variable and making the query better
    I am unable to figure out how to proceed.
    Appreciate your help here.
    Thanks
    create table mf_wer_OBI_USAGE_reqq_WK
    as select x.user_name id,x.mon MONTH_COUNT,x.wk_1 WEEK1_COUNT,x.wk_2 WEEK2_COUNT,x.wk_3 WEEK3_COUNT,x.wk_4 WEEK4_COUNT,x.wk_5 WEEK5_COUNT,x.subject_area_name,
    y.EMP_FIRST_NAME FIRSTNAME,y.EMP_LAST_NAME SURNAME,y.E_MAIL_ADDRESS USER_MAILID,y.ouc OUC
    from (select a.user_name,a.mon,a.subject_area_name,b.wk_1,c.wk_2,d.wk_3,e.wk_4,f.wk_5
    from (select user_name,sum(count_us_st) mon,subject_area_name from mf_wer_OBI_USAGE_reqq group by user_name,subject_area_name) a,
    (select user_name,sum(count_us_st) wk_1,subject_area_name from mf_wer_OBI_USAGE_reqq where extract(day from start_dt) between 1 and 7
    group by user_name,subject_area_name) b,
    (select user_name,sum(count_us_st) wk_2,subject_area_name from mf_wer_OBI_USAGE_reqq where extract(day from start_dt) between 8 and 14
    group by user_name,subject_area_name) c,
    (select user_name,sum(count_us_st) wk_3,subject_area_name from mf_wer_OBI_USAGE_reqq where extract(day from start_dt) between 15 and 21
    group by user_name,subject_area_name) d,
    (select user_name,sum(count_us_st) wk_4,subject_area_name from mf_wer_OBI_USAGE_reqq where extract(day from start_dt) between 22 and 28
    group by user_name,subject_area_name) e,
    (select user_name,sum(count_us_st) wk_5,subject_area_name from mf_wer_OBI_USAGE_reqq where extract(day from start_dt) between 29 and 31
    group by user_name,subject_area_name) f
    where a.user_name=b.user_name(+)
    and a.subject_area_name=b.subject_area_name(+)
    and a.user_name=c.user_name(+)
    and a.subject_area_name=c.subject_area_name(+)
    and a.user_name=d.user_name(+)
    and a.subject_area_name=d.subject_area_name(+)
    and a.user_name=e.user_name(+)
    and a.subject_area_name=e.subject_area_name(+)
    and a.user_name=f.user_name(+)
    and a.subject_area_name=f.subject_area_name(+)) x,
    dm_employee y
    where x.user_name=y.id and
    y.active_flg='Y';

    Swas_fly wrote:
    This code works fineIf it's fine, why try to fix it?
    Post your table (only the relevant columns as a CREATE TABLE statement) and some sample data (INSERT into) and your required output.
    Post your code between these tags:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

  • How  to Pass String array from Java to PL/SQL  and this use in CURSOR

    hi,
    I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
    This array containing like (SYMPTOM ) to be returned from the java to the
    pl/sql (I am not querying the database to retrieve the information).
    I cannot find an example on this. I will give the PL/SQL block
    create or replace procedure DISEASE_DTL<*** String Array ***> as
    v_SYMPTOM number(5);
    CURSOR C1 is
    select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
    where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
    group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
    order by a.DISEASE_NAME ;
    begin
    for C1rec IN C1 loop
    select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
    insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
    values (SL_ID_SEQ.nextval,
    C1rec.DISEASE_NAME,
    (4/v_SYMPTOM), --------**** 4 is no of array element (n)************
    (1-(4/v_SYMPTOM)));
    end loop;
    commit;
    end DISEASE_DTL;
    Please give the proper solution and step ..
    Thanking you,
    Asish

    I've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
    http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/

  • Right way to connect, submit some SQL, and disconnect using ASP?

    I thought I knew how to do this but, with one, low-use web form, we're occasionally losing form submissions and I haven't been able to understand why.
    The form's processor is in a JSCRIPT "class" so I'll pull out the relevant bits below.
    I was just able to learn from a user that he saw the "cannot save" message "thrown" when the test for this.aConnection.State!=1 fails.
    No other place in the application presents that error, so I'd guess that's the problem. Thing is, how can a connect to the database occasionally fail when the database (11g on windows 2003) hasn't been down for weeks? The DB is in "shared" mode with I believe one dispatcher.
    Hints would sure be appreciated.
    this.aConnection=null;
    var sConnect="Provider=OraOLEDB.Oracle;Data Source=<>;User Id=<>;Password=<>";
    this.aConnection=Server.CreateObject( "ADODB.Connection" );
    if( !this.aConnection )
    throw "The application cannot access information.";
    this.aConnection.Open( sConnect );
    if( this.aConnection.State!=1 )
    throw "The application cannot save your submission.";
    this.aConnection.Execute( <DDL to insert>, 0, 1 );
    this.aConnection.Close();

    I've concluded that the State property of a Connection object isn't reliable. The moment I added the test:
    if( this.aConnection.State!=1 )
    throw "The application cannot save your submission.";
    we began to have problems with users of a our web app seeing the thrown message even though the database instance shows no evidence of connection trouble. I toyed with tracing OraOLEDB but never got that to work, and an Oracle support person suggested that type of tracing isn't reliable anyway. Finally, buried in some MS support document I saw the claim that a connection isn't actually opened until a recordset is returned.
    That suggests that the real test for "connected" is whether your app can do the work you intend it to do: in other words, "try."

  • SQL and SWINg USING Jbuilder6

    i an new user to jbuilder 6. i facing problem when i want to create new form in the project. this is because, if i create a new frame, then the xxx.java cannot be compiled...
    the second question is how to link from one interface to another? like one form to another?
    thanks

    I've concluded that the State property of a Connection object isn't reliable. The moment I added the test:
    if( this.aConnection.State!=1 )
    throw "The application cannot save your submission.";
    we began to have problems with users of a our web app seeing the thrown message even though the database instance shows no evidence of connection trouble. I toyed with tracing OraOLEDB but never got that to work, and an Oracle support person suggested that type of tracing isn't reliable anyway. Finally, buried in some MS support document I saw the claim that a connection isn't actually opened until a recordset is returned.
    That suggests that the real test for "connected" is whether your app can do the work you intend it to do: in other words, "try."

  • Custom Sql fails when using Date Parameter

    I need to do following using DB adapter
    select count(*) from some_table where creation_date >= #from_date and creation_date <= #to_date
    I used Custom sql options, but It did not asked for add params. so I added manually above params in the query. I am getting following query. I don't know how to get this working. i am on 10.1.3.
    Here I am getting from and to dates from a AQ message. AQ has from and to_date as date type elements. I am doing copy assign of these to SQL input params
    below is the error.
    <messages><input>
    <RecordCount_service_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    name="XI_RecordCount_serviceInput_msg"><XI_RecordCount_serviceInput xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">
    <ns0:v_fromdate1 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-01T00:00:00.000-06:00</ns0:v_fromdate1>
    <ns0:v_todate1 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-31T00:00:00.000-06:00</ns0:v_todate1>
    <ns0:v_fromdate2 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-01T00:00:00.000-06:00</ns0:v_fromdate2>
    <ns0:v_todate2 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-31T00:00:00.000-06:00</ns0:v_todate2>
    </XI_RecordCount_serviceInput>
    </part></RecordCount_service_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>1861</code>
    </part><part name="summary"><summary>file:/u01/app/oracle/product/10.1.3/bpm/bpel/domains/arun/tmp/.bpel_XI_P2EU_Allegro_Service_1.0_79d8666bc8efe5a375691e0a5f06e2e4.tmp/XI_RecordCount_service.wsdl [ XI_RecordCount_service_ptt::XI_RecordCount_service(XI_RecordCount_serviceInput_msg,XI_RecordCount_serviceOutput) ] - WSIF JCA Execute of operation 'XI_RecordCount_service' failed due to: Pure SQL Exception.
    Pure SQL Execute of select count(*) record_count FROM XI_TABLE WHERE ( (trunc(CREATION_DATE) >= ? AND TRUNC(CREATION_DATE) &lt;= ?) OR (trunc(last_update_date) >= ? AND TRUNC(last_update_date) &lt;= ?) ) failed. Caused by java.sql.SQLException: ORA-01861: literal does not match format string
    ; nested exception is:
         ORABPEL-11633
    Pure SQL Exception.
    Pure SQL Execute of select count(*) record_count FROM XI_TABLE WHERE ( (trunc(CREATION_DATE) >= ? AND TRUNC(CREATION_DATE) &lt;= ?) OR (trunc(last_update_date) >= ? AND TRUNC(last_update_date) &lt;= ?) ) failed. Caused by java.sql.SQLException: ORA-01861: literal does not match format string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part><part name="detail"><detail>ORA-01861: literal does not match format string
    </detail>
    </part></bindingFault></fault></messages>

    I think the database accepts only your database format' dd-mm-yyyy'.
    Try to define #from_date & #to_date as string and use to_date() in your custim sql statement.
    Marc

  • Java 2 UML Use Case Diagrams

    I am stuck at Use Case Diagrams generator, which takes Problem Statement or Requirement in english and generated Use Case Diagrams from it.
    I am successful at finding and seperating Parts of Speech from English sentances using PoS Taggers.
    how can i model them?
    are there any tips/open source programs available.

    learn English so the software understands you.

  • Howmany use cases

    This is an excerpt from "UML Distilled" by Martin Fowler & Kendall scott(pageno.47)
    "How many use cases should you have?During a recent OOPSLA panel discussion, several use case experts said that for a 10-person-year project, they would expect around a dozen use cases. These are base use cases; each use case would have many scenarios and many variant use cases. I've also seen projects of similar size with more than a hundred seperate use cases.(If you count the variant use cases for a dozen use cases , the number end up about the same.)As ever, use what works for you."
    EXCERpT END
    So far my understanding of variant use case is that a variant use case represents a functionality that is reapeating across many use cases. The above excerpt does not seem to fit with this understanding.
    During the initial phases of project, if high level use case representation has to be conveyed to a domain expert , making use cases which include a great deal of similar requirements is a good idea as the whole system can be represented in a very simple manner.
    For example , a use case like "manage accounts" can be further subdivided in to open , deposit, withdraw, close account in later stages of development. But the issue is could these be called as use case variants. And how these are to correlated to the original use case "manage accounts"?.
    thanking you,
    sprasad

    Be careful with RUP - it's very documentation centric, and I have yet to see a case where all of the required documentation is useful to the successful development of the project.
    The hierarchial decomposition of a problem domain is best illustrated through dual mechanisms - both the Use Case diagrams, and actual Use Case documentation. The diagrams can be developed in a hierarchial fashion (i.e. a single use case on a high level diagram decomposes into several more detailed use cases on a separate diagram).
    Where you stop the decomposition is really part of the art of use case analysis, and will be impacted by the methodology that your team practices. The teams that I work with practice various "Agile" methodologies (XP, Scrum, Crystal, DSDM, etc.), so what I look for in a "detailed" use case is 1) can a developer build the needed functionality within a single development iteration? and 2) What other functional areas (if any) are similar enough to encourage the development of more generic functionality to address multiple requirements. My guess is that this is equivalent to the "variant" use cases mentioned above (bear in mind I haven't read the book).
    So it really depends on how your project team works. If you are practicing a "heavy" methodology like RUP or Waterfall, where all of the analysis is done up front, it is important to define all of the use cases in advance. This doesn't change the issue of how to establish the functional requirements hierarchy, but it does change when you will put in the effort to identify this hierarchy.
    If, on the other hand, you are practicing an Agile methodology you will still need to identify the hierarchy, but you do it in stages. For instance, at the beginning of a project I will identify the major functional needs (i.e. an accounting system needs AR, AP, journals, GL, etc), but then I will concentrate on the detailed analysis of only one aspect of the application. From there the team will design and build it. Then we move on to the next aspect of the application. At the end you still have a detailed analysis of the application (hierarchial use case information), but you can much more readily adapt to changing business requirements, and you tend to produce a lot less meaningless documentation.

  • 10.1.3.0.3EA - use case diagrams

    hello,
    Is it possible to publish the diagrams and the use cases to a webserver?
    Thanks.
    Dany.

    Hi,
    If you select the Project node in the Navigator and then select 'Run | Javadoc <Project Name>' this will generate a JavaDoc style of your Use Cases and Use Case Diagrams and the Use Case Diagrams should allow you to click on a particular use case to jump to the definition.
    Hope that helps,
    Lisa
    JDev QA

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum,
    I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works fine, but my inputs parameters will vary. So I need to make my query dynamic to append the query strings at runtime depending on the inputs.
    For example I have 3 input variables - input1,input2 and input3 (in my request xsd) which are used in the pure sql query. Now if I get a 4th input parameter input4 in the request, I need to append this to query string as 'AND input4=[some value]' at runtime. Otherwise my query should have only 3 parameters. Please suggest how this can be achieved.
    Regards,
    Satya.

    This is a strange requirement, depending on the columns you have and what are optional in them, one way is to have separate operations and each opeartion will have different inputs and for each operation , a different DB Adapter is called. But this way, it results in more number of operations for the service as well as more number of references in the composite. Even if you pass the column inputs to the SQL procedure, it will result in a large number of if-else cases..
    Thanks,
    N

  • How to use, Case function and Filter in Column Formula?

    Hello All,
    I am using case function and also would like to filter value to populate.
    Below is showing error :
    case
    when '@{Time}' = 'Year' then "Time"."Fiscal Year"
    when '@{Time}' = 'Quarter' then "Time"."Fiscal Quarter"
    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')
    else ifnull('@{Time}','Selection Failed') end
    Thanks, AK

    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')I dont think Filter this works here or any other data types except number.
    Try to use option Column's->Filter->Advanced->Convert this filter to SQL
    If helps mark

  • Help needed in SQL performance - Using CASE in SQL statement versus 2 query

    Hi,
    I have a requirement to find count from a bunch of tables.
    The SQL I have gives the count of all members.
    I have created 2 queries to find count of active and inactive members.
    The key difference is only the active dates.
    Each query takes 20 seconds to execute.
    I modified the SQL to use CASE statement in the SELECT.
    So after the data is fetched the CASE statement will evaluate the active date and gives 2 counts (active and inactive)
    Is it advisable to use this approach. Will CASE improve SQL performance ? I have to justify this.
    Please let me know your thoughts.
    Thanks,
    J

    Hi,
    If it can be done in single SQL do it in single SQL.
    You said:
    Will CASE improve SQL performance There can be both cases to prove if the performance is better or worse.
    In your case you should tell us how it is.
    Regards,
    Bhushan

  • I downloaded Mozilla 4 and tried to use it then, I had to delete it and go back to 3.6 vs now I am having problems with my MS SQL 2005 why? What was changed to enable Mozilla 4 to sync with MS SQL and how do I get it corrected?

    After, trying Mozilla 4 beta and then having to go back to a previous vs of Mozilla 3.6.11 my MS OLE DB Provider for SQL 2005 Server has this error message '80040E57' I am using Windows 7 which was pre-installed on my new computer. I do not know how to fix it?

    The latest flash player release is 11,0,1,152.
    Can you upgrade to this version and see whether the crash stil exists?
    Go to get.adobe.com/flashplayer to download and install flash player.
    In case you need direct link to installer/uninstaller, please go to http://forums.adobe.com/message/3952360#3952360 to find them.
    saranlee wrote:
    My computer crashes repeatedly and I get the message pages are not responding do you want to stop, and/or shockwave is not responding do you want to stop. I have Windows XP Service Pack 3, I am having the same issues whether I use Internet Explorer, Google Chrome, or Mozilla Firefox. My HP Pavilion Desktop has 504 MB of Ram and I am using high speed internet connection. Because it was crashing so much, I used the uninstall program for Flash player to uninstall Flash, I checked my registry and removed anything I saw that was Flash. I then uninstalled Google Chrome and Mozilla Firefox, then I reinstalled the most recent versions from their websites. I did the same for FlashPlayer and Shockwave Flash. I went to the Adobe website and had them check to see if it was working and it shows I have FlashPlayer 10.3.181.36. The page that shows  which version of flash player goes with Windows XP states that I should have 10.3.181.34 (This is what I thought I had before I updated, I was having the same problems). When I went into my computer to see what version I have, it shows 11.5.9.620 Activex and both Flash Player and Flash Player Object is listed as 10.3.181.34. My firewall for Windows is set to medium. I also am running Norton Internet Security. It takes anywhere from 3-6minutes for some of my games to load, and I have to refresh at least 3-4 times in order to play. When I do start to play it freezes frequently and I use escape to free it up. This has been going on for a month. I have no idea what to do. I am not very computer savy and I have been learning as I go.

  • Using Case and Joins in update statement

    Hi all,
    I need to update one column in my table...but need to use case and joins...I wrote the query and it is not working
    I am getting an error msg saying...the SQL command not ended properly...
    I am not that good at SQL...Please help...
    update t1 a
    set a.name2=
    (case
    when b.msg2 in ('bingo') then '1'
    when b.msg2 in ('andrew') then '2'
    when b.msg2 in ('sam') then '3'
    else '4'
    end )
    from t1 a left outer join t2 b
    on a.name1 = b.msg1 ;
    Waiting for help on this...!
    Thanks in Advance... :)

    Another approach is to update an inline view defining the join:
    update
    ( select a.name2, b.msg2
      from   t1 a
      join   t2 b on b.msg1 = a.name1 ) q
    set q.name2 =
        case
          when q.msg2 = 'bingo' then '1'
          when q.msg2 = 'andrew' then '2'
          when q.msg2 = 'sam' then '3'
          else '4'
        end;which could also be rewritten as
    update
    ( select a.name2
           , case q.msg2
                when 'bingo'  then '1'
                when 'andrew' then '2'
                when 'sam'    then '3'
                else '4'
             end as new_name
      from   t1 a
      join   t2 b on b.msg1 = a.name1 ) q
    set name2 = new_name;The restriction is that the lookup (in this case, t2.msg1) has to be declared unique, via either a primary or unique key or unique index.
    (You don't strictly need to give the view an alias, but I used 'q' in case you tried 'a' or 'b' and wondered why they weren't recognised outside the view.)

Maybe you are looking for

  • How can I play HD movies on iTunes on my windows 7 desktop?

    My monitor is a Samsung SyncMaster2494 and my video card is an NVIDIA GeForce GTX 550 Ti.  I have no issues running webpages, video games, etc. in HD, however I receive an error whenever I attempt to watch a movie on iTunes in HD.  The message reads

  • How can I achieve to print label without packaging

    hello As I do not handle packaging for label . Is there any way to achieve this . Also I tried to put different gen variant for different label size in material master and put the same region but the system is not allowing to put two different gen va

  • Add Comment in the very start of every Custom Program Automatically

    Hi, Friends, I have more than one thousand custom program and I have a requirement to add 4 to 5 lines of  comment in the very start of every program, means if code of the program is starting from the 1st line than this line must go to number 5 if I

  • What is it mean 48.1% - 14,149 ms - 3 hot spot inv. direct JVM call

    When we were profiling we saw this entry..48.1% - 14,149 ms - 3 hot spot inv. direct JVM call.It came under weblogic.thread.run is the time taken by weblogic thread taken to invoke Some application specific classes?

  • Avoiding request scope bean clashes for task flow calls

    Hi, I have two task flows, Tf1 calls Tf2 using a task flow call activity. The structures of the task flows are as follows: Tf1   Managed Bean: TfBean, request scope     class Tf1Bean       has property goTf2Button   View: View1     Button bound to #{