"select into" query statements using the DI API

I am trying to use the DI API (6.5) t create a temp table based on an existing table.  For example, here is a query string....
select * into ORDR_TEMP from ORDR
Code...
oRecordSet := IRecordset(oCompany.GetBusinessObject(BoRecordset));
oRecordset.DoQuery(sSql);
Error I get...
1). [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use SELECT INTO in browse mode. 2). [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared
For any other regular select statements the previous code works.  Does anyone know for sure if a "select into" statement is not possible using the DI API?

Hi Bill,
I´m not really sure if select into is avaiable. But here you´ve got a hint: You could use a user defined function to do it, and just call the function from your code.
SELECT dbo.MyFunction()
Having this function defined in your SQL Server:
CREATE function MyFunction ()
returns char(2)
AS
Begin
select * into ORDR_TEMP from ORDR
Return ('OK')
End
Hope this helps,
Ibai Peñ

Similar Messages

  • Java applet using the Swing API

    write a Java applet using the Swing API to manage a PC repair shop. When a PC is brought in for repair, a member of staff will use this applet to log it into the system as a repair job. They will also be able to use the applet to manage the job e.g. allocate a person to carry out the repair and enter costs.
    You must not use a tool such as JBuilder to generate Java code. If you use code from elsewhere e.g. a text book, you must highlight the code and state the reference clearly and include a photocopy of the relevant pages from the text book or other source.
    You should hard-code some initial data into your applet. You should not store any data in a file or database.
    Level of functionality you should attempt to implement:
    Level 1 � Your applet should:
    a.     As a minimum, your program should store (in memory) at least 10 repair jobs. For each repair job, you need to store:
    �     The name and phone number of the customer bringing the PC in for repair;
    �     A brief textual description of the problem;
    �     Whether the PC is under warranty or not.
    b.     Your program must allocate and display a unique number for the job once it is accepted.
    c.     The user must be able to view the details of jobs. They should be able to select either:
    �     All the jobs in the system; or
    �     Jobs being carried out under warranty.
    Level 2 � Your applet must meet the requirements for level 1. In addition it should:
    a.     You should carry out appropriate validation checks on input data e.g. the phone number contains all digits.
    b.     System should cope with an unlimited number of jobs.
    c.     The user should be able to select a job and then allocate a repairer to that job.
    d.     The user should be able to display a list of jobs for each repairer.
    Level 3 - Your applet must meet the requirements for level 1 and 2. In addition it should allow the user to:
    a.     Select a job and input the cost of repair for:
    �     the number of hours labour;
    �     parts.
    b.     Select a job and present the user with a cost for the labour (hard code an hourly labour cost) and parts, plus a total for that job. For jobs under warranty the total will be zero, however the cost of labour and parts will be shown.
    c.     Be able to inform the business of the total expected income from the all the jobs in the system that are not under warranty.
    Level 4 � Your applet must meet the requirements for level 1 to 3. In addition:
    a.     The user should be able to enter a job priority which can be identified as high, medium or low.
    b.     Each repairer should be able to view a list of their jobs in order of priority.

    Done, what next ?
    Noah

  • Why is this query not using the index?

    check out this query:-
    SELECT CUST_PO_NUMBER, HEADER_ID, ORDER_TYPE, PO_DATE
    FROM TABLE1
    WHERE STATUS = 'N'
    and here's the explain plan:-
    1     
    2     -------------------------------------------------------------------------------------
    3     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    4     -------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 2735K| 140M| 81036 (2)|
    6     |* 1 | TABLE ACCESS FULL| TABLE1 | 2735K| 140M| 81036 (2)|
    7     -------------------------------------------------------------------------------------
    8     
    9     Predicate Information (identified by operation id):
    10     ---------------------------------------------------
    11     
    12     1 - filter("STATUS"='N')
    There is already an index on this column, as is shown below:-
         INDEX_NAME INDEX_TYPE     UNIQUENESS     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION
    1     TABLE1_IDX2 NORMAL     NONUNIQUE     TABLE1      STATUS     1
    2     TABLE1_IDX NORMAL     NONUNIQUE     TABLE1     HEADER_ID     1
    So why is this query not using the index on the 'STATUS' Column?
    I've already tried using optimizer hints and regathering the stats on the table, but the execution plan still remains the same, i.e. it still uses a FTS.
    I have tried this command also:-
    exec dbms_stats.gather_table_stats('GECS','GEPS_CS_SALES_ORDER_HEADER',method_opt=>'for all indexed columns size auto',cascade=>true,degree=>4);
    inspite of this, the query is still using a full table scan.
    The table has around 55 Lakh records, across 60 columns. And because of the FTS, the query is taking a long time to execute. How do i make it use the index?
    Please help.
    Edited by: user10047779 on Mar 16, 2010 6:55 AM

    If the cardinality is really as skewed as that, you may want to look at putting a histogram on the column (sounds like it would be in order, and that you don't have one).
    create table skewed_a_lot
    as
       select
          case when mod(level, 1000) = 0 then 'N' else 'Y' end as Flag,
          level as col1
       from dual connect by level <= 1000000;
    create index skewed_a_lot_i01 on skewed_a_lot (flag);
    exec dbms_stats.gather_table_stats(user, 'SKEWED_A_LOT', cascade => true, method_opt => 'for all indexed columns size auto');Is an example.

  • I want single update query without use the function.

    I want to update sells_table selling_code field with max date product_code from product table.
    In product table there is multiple product_code date wise.
    I have been done it with below quey with the use of function but can we do it in only one update query
    without use the function.
    UPDATE sells_table
    SET selling_code = MAXDATEPRODUCT(ctd_vpk_product_code)
    WHERE NVL(update_product_flag,0) = 0 ;
    CREATE OR REPLACE FUNCTION HVL.maxdateproduct (p_product IN VARCHAR2) RETURN NUMBER
    IS
    max_date_product VARCHAR2 (100);
    BEGIN
    BEGIN
    SELECT NVL (TRIM (product_code), 0)
    INTO max_date_product
    FROM (SELECT product_code, xref_end_dt
    FROM product
    WHERE TO_NUMBER (p_product) = pr.item_id
    ORDER BY xref_end_dt DESC)
    WHERE ROWNUM = 1; -- It will return only one row - max date product code
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN 0;
    END;
    RETURN max_date_product;
    END maxdateproduct;
    Thanks in Advance.

    Hi,
    Something like this.
    update setlls_table st
            set selling_code =(select nvl(trim(product_code)) from 
                                  (select product_code
                                          , rank() over (partition by item_id order by xref_end_dt DESC) rn
                                       from product
                                   ) pr
                                   where rn =1
                                         and pr.item_id = st.ctd_vpk_product_code
                               ) where NVL(update_product_flag,0) = 0 ;As such not tested due to lack of input sample.
    Regards
    Anurag Tibrewal.

  • Using the Desktop API in Java SE 6 (Mustang)

    <p>The Java platform continues to evolve, and Java applications can now integrate with the host desktop better than ever before. This new article describes how to integrate your Java application into the desktop using new Java SE 6 features:</p>
    http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/desktop_api/

    peterwkc wrote:
    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
    >
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so.

  • IPhoto:How to update to use the DR API instead????

    Ahoy.
    While trying to figure out why safari keeps quitting on me, I found an answer to someone else, who was told to go into logs and I was floowing along, but I guess they are ahead of tiger- anwyay I did find this, and wonder, can I do as it suggests somehow?
    iPhoto: WARNING: The DiscRec SPI from the DiscRecording framework is deprecated in 10.3 and later.
    iPhoto: WARNING: This app is contributing to an overall degradation of system performance and should
    iPhoto: WARNING: be updated to use the DR API instead.
    iPhoto: WARNING: The DiscRec SPI from the DiscRecording framework is deprecated in 10.3 and later.
    iPhoto: WARNING: This app is contributing to an overall degradation of system performance and should
    iPhoto: WARNING: be updated to use the DR API instead.
    Fin

    BDAqua saved me a lot of typing.   It wasn't clear, though, if you just needed to vent or if you're wanting to address these issues (which will involve a lot of typing).
    One of the main ones you need to do before you do any installing or installing of Flash Player is deal with the disk that won't verify.  Basically you're working with a computer that doesn't know where all its files are.  The computer uses a directory to keep tack of them and your directory needs repairing.  If you don't repair it then you'll just end up losing files, and getting more problems with running the computer.  It's a little bit like never changing the oil in the car, or dealing with an oil leak when it happens.
    First, if at all possible make a backup of the drive in its present configuration.  If something goes wrong during repair attempts and makes things worse you will have a backup.  You will have to decide how to work this in the light of any present backups you may have, for example, a backup that may be a few days out of date.  In that case you may want to keep that one and make a second backup of this as they are now, though I realize people often don't have a lot of empty drives sitting around.
    Boot from the System Installer disc that came with your computer or is the one for the version you currently have on there, select language if applicable, choose utilities, run Disk Utility and verify (and repair if necessary) the drive. You can verify a drive from DU on your main drive while booted but I have found this can result in incorrect reporting of errors. To repair your drive you have to run it from a drive other than the boot drive anyway.
    Next, boot from your drive in [Safe Mode|http://docs.info.apple.com/article.html?artnum=107393] and repair permissions.  You can repair permissions while booted from the installer disc but this uses the permissions configuration on the installer disc which may be out of date if you have run any updates on your computer.  Booting your computer to Safe Mode restricts the number of things running on your computer while permissions are being run and does a bit of spring cleaning at the same time.
    +Reading+
    [Resolve startup issues and perform disk maintenance with Disk Utility and fsck|http://docs.info.apple.com/article.html?artnum=106214]
    [Using Disk Utility in Mac OS X 10.4.3 or later|http://docs.info.apple.com/article.html?artnum=302672]
    [Disk Utility's Repair Disk Permissions 10.0-10.6|http://docs.info.apple.com/article.html?artnum=25751]
    "Try Disk Utility" (modified from [http://support.apple.com/kb/TS1417])
    1. Insert the Mac OS X Install disc that came with your computer (Edit: Do not use this disc if it is not the same general version as what you have currently on your computer, e.g. use a Tiger disc for a Tiger drive, not a Panther disc), then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    Then boot in Safe Mode, (holding Shift key down at bootup; takes longer to boot this way so be patient), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    [Mac OS X: Starting up in Safe Mode|http://docs.info.apple.com/article.html?artnum=107393]
    [What is Safe Boot, Safe Mode? (Mac OS X)|http://support.apple.com/kb/HT1564]
    [Safe Boot takes longer than normal startup|http://docs.info.apple.com/article.html?artnum=107394]
    [Mac OS X 10.4, 10.5- Computer shuts down during Safe Boot|http://support.apple.com/kb/TA24054]
    There's some things Disk Utility won't repair (more often thatn not). In that case you need to use a tool such as Diskwarrio (probably #1 but only does this one thing), or TechTool Pro, or...

  • Converting an Excel file into a CSV with the DI API

    Hello everyone,
    it's my first post and also my first project with SBO, As the topic's header implies I have to write a program which converts an excel sheet into a CSV file, I have been reading a little about the DI API, and I would like to have further information about how to use the DI to access file data and/or alter it, other than what is already listed in the tutorials.
    Thanks in advance.

    Hi Amin,
    Unfortunately I am not aware of any way to this using only the DI API, it will be neccesary to include some other APIs or manual work.
    Off the top of my head I can only think of two workarounds to this:
    - Using the recordset and Excel combined. Read all the data from one column in a table and write it to a column in an Excel file possibly using a loop. Once the process of copying all desired columns and their data is complete, save the file as .csv using the excel API. I'm afraid I don't have an example of this. (It also may be possible using Microsofts SMO or another database API rather than the recordset.)
    With this approach the drawback is it might take a long time to figure out and develop in the short term, but in the long term would save alot of manual work as it could be automatic.
    - The alternative is unfortunately a manual approach: Simply run a query on the table, and then copy all the values from a column and paste it into the excel file.
    This has no short term work but is alot of manual work in the long term.
    Hope this is useful,
    Regards,
    Niall

  • How can i know if my query is using the index ?

    Hello...
    How can i know if my query is using the index of the table or not?
    im using set autotrace on...but is there another way to do it?
    thanks!
    Alessandro Falanque.

    Hi,
    You can use Explain Plan for checking that your query is using proper index or not. First you need to check that Plan_table is installed in your database or not. If it is not there THEN THE SCRIPT WILL BE LIKE THIS:
    CREATE TABLE PLAN_TABLE (
    STATEMENT_ID VARCHAR2 (30),
    TIMESTAMP DATE,
    REMARKS VARCHAR2 (80),
    OPERATION VARCHAR2 (30),
    OPTIONS VARCHAR2 (30),
    OBJECT_NODE VARCHAR2 (128),
    OBJECT_OWNER VARCHAR2 (30),
    OBJECT_NAME VARCHAR2 (30),
    OBJECT_INSTANCE NUMBER,
    OBJECT_TYPE VARCHAR2 (30),
    OPTIMIZER VARCHAR2 (255),
    SEARCH_COLUMNS NUMBER,
    ID NUMBER,
    PARENT_ID NUMBER,
    POSITION NUMBER,
    COST NUMBER,
    CARDINALITY NUMBER,
    BYTES NUMBER,
    OTHER_TAG VARCHAR2 (255),
    PARTITION_START VARCHAR2 (255),
    PARTITION_STOP VARCHAR2 (255),
    PARTITION_ID NUMBER,
    OTHER LONG,
    DISTRIBUTION VARCHAR2 (30))
    TABLESPACE SYSTEM NOLOGGING
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 10240
    NEXT 10240
    PCTINCREASE 50
    MINEXTENTS 1
    MAXEXTENTS 121
    FREELISTS 1 FREELIST GROUPS 1 )
    NOCACHE;
    After that write the following command in the SQL prompt.
    Explain plan for (Select statement);
    Select level, SubStr( lpad(' ',2*(Level-1)) || operation || ' ' ||
    object_name || ' ' || options || ' ' ||
    decode(id, null , ' ', decode(position, null,' ', 'Cost = ' || position) ),1,100)
    || ' ' || nvl(other_tag, ' ') Operation
    from PLAN_TABLE
    start with id = 0
    connect by
    prior id = parent_id;
    This will show how the query is getting executed . What are all the indexes it is using etc.
    Cheers.
    Samujjwal Basu

  • How to use the crypto api with gemalto cyberflex 32k ?

    Hello ,
    I've done many javacard programs using this method :
    _compilation with javacard kit 2.2.1
    _convertion into ".cap"  with the javacard kit 2.1.2
    All this programs work fine with this method : helloworld, read, write in the card, ....
    But when i want to use the crypto api, i can't charge the program in the card (just by adding 2 lines for generating keys):
    ----------> returns 0x80206A80 (6A80: Wrong data / Incorrect values i data.)
    I think it's because i use the 2.1.2 version , but if i use the 2.2.1 to convert , it's another error and no program work with this method.....even helloworld doesn't work...
    -----------> returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied.)
    I thing i must change my gpshel command , but i have read many forums but can't find the configuration for my card cyberflex 32k, some people had similar problems so they used the kit 2.1.2 combined with 2.2.1 like me, but i think they can't use the crypto api with this.........
    Any help will be apreciated,
    kind regards
    Franck
    Edited by: jojo85 on Mar 20, 2009 11:03 AM

    Hello,
    Thanks Sonnyyu,
    I deleted my gpshell 1.4.2 directory and i installed gpshell 1.4.0 instead like they said , to avoid some bugs
    i've tested the exemple CardEdgeII.ijc ,
    here's what i got:
    mode_201
    enable_trace
    establish_context
    card_connect -readerNumber 1
    select -AID a0000000030000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    delete -AID A0000003230101
    delete -AID A00000032301
    delete -AID A00000000101
    delete -AID A000000001mode_201
    enable_trace
    establish_context
    card_connect -readerNumber 1
    select -AID a0000000030000
    Command --> 00A4040007A0000000030000
    Wrapped command --> 00A4040007A0000000030000
    Response <-- 6F188407A0000000030000A50D9F6E060011020201009F6501FF9000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    Command --> 8050000008674672AE4B85E01800
    Wrapped command --> 8050000008674672AE4B85E01800
    Response <-- 000081410002B2C600E4010151982BB4CF843B1431E57DB6418652AE9000
    Command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
    Wrapped command --> 848201001073CF9B92B3F11E10BE12D1318E9A8095
    Response <-- 9000
    delete -AID A0000003230101
    Command --> 80E40000094F07A000000323010100
    Wrapped command --> 84E40000114F07A000000323010149D51E784E07966B00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A00000032301
    Command --> 80E40000084F06A0000003230100
    Wrapped command --> 84E40000104F06A00000032301E3788AF4A9E32C2100
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A00000000101
    Command --> 80E40000084F06A0000000010100
    Wrapped command --> 84E40000104F06A00000000101C3CC96E6E54AF0ED00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID A000000001
    Command --> 80E40000074F05A00000000100
    Wrapped command --> 84E400000F4F05A000000001DA73D168B218692C00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
    install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2
    Command --> 80E602001705A00000000107A00000000300000006EF04C60231000000
    Wrapped command --> 84E602001F05A00000000107A00000000300000006EF04C60231000019F52839EB52A80200
    Response <-- 009000
    Command --> 80E80000EFC48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010
    Wrapped command --> 84E80000F7C48230F401000FDECAFFED010204000105A00000000102001F000F001F000A00290256006C2307000A04230000067F00060000000004010004002904000107A0000000620101010107A0000000620102010107A0000000620201000107A000000062000103000A0106A0000000010119CE06006C00800313000C040400051856FFFF1BA41A2A17FB1818183718A61971008300020001011100001E4F1EC51F771F9A1FA71FAC1FB31FBC1FCD1FF41FFD20082043204B205520662071008300030001010D0000209520B520C520D52101211C21742196221F2230226F227D22E1072307000640188C00861803880010C9DE1DD3FD6CD8CE
    Response <-- 9000
    Command --> 80E80001EF08900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A08252906160504
    Wrapped command --> 84E80001F708900B7F001C7B001C03104D387B001C041075387B001C051073387B001C061063387B001C07106C387B001C081065387B001C10061030387B001C1007103038187B001C037B001C925B8C004D6108119CFF8D005318100891008087011810089100808702AD02038F00803D0610108C002037AD020324940000807B001C037B001C925B8B002A7A05361A0525321A062529071F62071F10086C08119C108D00531607610EAD021F24940000802804700CAD011F2494000080280415046708119C108D0053031A07258D002E2905198B003016056A081167008D00531605076D08119C0F8D00531A082529061605045F95980396338536
    Response <-- 9000
    °
    °
    °
    there are again many lines and the response is always 9000
    i'll try to find a converter to convert the .cap files of my crypto application into .ijc files
    thanks,
    kind regards
    Franck
    Edited by: jojo85 on Mar 21, 2009 2:48 PM

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

  • Write an UPdate statement using the logic used in PL/SQL block (oracle 10g)

    Hi All,
    I have written the following PL/SQL block. I want to write an UPDATE statement using the logic used in the following PL/SQL block. can any one please help me out in this regards.
    DECLARE
       v_hoov_fag   gor_gold_post.hoov_flg%TYPE;
       v_b49n          gor_gold_post.b49n%TYPE;
       CURSOR c
       IS
          SELECT bs_id, loyalty_date, loyalty_period, contract_date
            FROM gor_gold_post
           WHERE tariff_code IN (169, 135, 136);
    BEGIN
       FOR rec IN c
       LOOP
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 304
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_hoov_flg := 1;
          ELSE
             v_hoover_flag := 99;
          END IF;
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 121.6
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_b49n := 1;
          ELSE
             v_b49n := 99;
          END IF;
          UPDATE gor_gold_post
             SET hoov_flg = v_hoov_flg,
                 b49n = v_b49n
           WHERE bs_id = rec.bs_id AND tariff_code IN (169, 135, 136);
          COMMIT;
       END LOOP;
    END;Thank you,

    Using case statement.
    UPDATE gor_gold_post
       SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
                                   OR
                                   (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END,
           b49n      = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
                             OR
                             (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END
    WHERE tariff_code IN (169, 135, 136);Note: Code not tested.

  • How to use the windows API GetCaretPos with FireFox? It works with IE

    I want to get caret position from a windows desktop application using the Windows API GetCaretPos. It works in any windows Application and in IE. It worked also in FireFox for some minutes in version 3.6.8 but than it stopped working. Can anyone tell me how to make it work?
    == This happened ==
    Every time Firefox opened

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Did this fix your problems? Please report back to us!

  • Creating junit test cases using the reflection API

    In order to use the reflection API to get information about a *.java file's class name and methods, I need to compile the *.java file first, and then get info through the *.class file. Am I right?
    Eclipse, the Java IDE, can create junit test cases for java files the user selects right after the *.java files have been created, and even before the *.java files have been compiled by the user. I guess Eclipse internally compiles the java files before creating JUnit test cases for them. Does anyone know about it? Thanks.

    Let me explain my problem in more details.
    Given any java source tree, my program is supposed to create junit test cases for each class using java reflection. My approach is to scan through the source tree to keep the list of classes available, then compile all the java files in the given source tree, then do Class.forName() to load them to get their methods... Obviously I don't know what classes I will have at compilation time. I create a temp_classes directory as the output directory for the given source tree java files, and I add temp_classes to my classpath when I strart up my own program. However, that won't work..
    D:\eclipse\workspace\cmpe271_hw4\classes>java -classpath ..\classes;..\temp_classes Test
    javac -classpath .\temp_classes; -d .\temp_classes @temp_classes\javalist.txt
    java.lang.ClassNotFoundException: Factory
    java.lang.ClassNotFoundException: InvalidDateFormatException
    java.lang.ClassNotFoundException: MyUtility
    java.lang.ClassNotFoundException: Storage

  • Accessing Business Graphics using the WebDynpro API

    I would like to access Business Graphics created with IGS using the WebDynpro Business Graphics API.
    I have no problem displaying the graphic in WebDynpro UI, but i have no idea how to access the binary data of the graphic to work with it outside of WebDynpro UI (in fact i want to embed it into a PDF form).
    Is there any possibility to do this using the WebDynpro API?
    I would appreciate your help!
    Regards,
    Christoph

    Thanks, but this al clear to me. I am able to display business graphics on web without problem (I have dynamic Business Graphic in my WebDynpro User Interface).
    The Problem is, that i want to make further processing with the graphic. Therefore i need to access the binary data of the graphic.
    Do you know if there is any possibility to get the binary data of the bmp - image generated by IGS into a byte array?

  • Using the JMS API in Java EE Applications

    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.

    peterwkc wrote:
    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
    >
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so.

Maybe you are looking for

  • HT4914 Can I use iTunes Match when I move to Japan?

    I may be moving to Japan and traveleing abroad for 2-3 years. If I sign up for music match, can I still access it internationaly?

  • Why does my site not appear correctly on other computers?????

    I made a website for the gallery I manage. address is 12spsg.com When making the site with CS4 it looked fine on both computers I was working on but now the left sidebar is appearing in the middle of the screen, the top menu bar is not all one row th

  • Regarding the functional modules

    hi, there are three types of function modules are there. 1)normal functional modules 2)remote functional modules 3)update functional modules what is the update functional modules? please provide me the information regarding this functiional modules

  • SDN access with Safari For Windows?

    All, Am just playing around with the Safari browser and when I try to access SDN using the same, I get a pop up stating, "to view this page you need to log into WebURLProtectionSpace Proxy HTTPS proxy server www.sdn.sap.com:443" Has anyone tried acce

  • Satellite P745 Audio Jack / Headphone jack not working

    Good day to all, I have recently performed a fresh install of Windows 7 Ultimate on my Toshiba Satellite P745, and manually installed only important drivers (NVDIA and Intel Graphics, Realtek HD Audio Manager, etc.). I do not prefer the built-in rest