Query Sub behavior strange when using Expressions regular Oracle

I met a strange "inconsistent" when you use an Expression regular Oracle with subqueries in SQL. Here are some details on how to reproduce what I have observed. We managed to find a solution to this "problem" using a database index; I'm writing this case hoping to better understand why Regular Expressions Oracle do not seem to work in the same way that the older, standard functions integrated as INSTR, SUBSTR, AS, etc..

Environment settings:
This test has been done using Oracle XE (GR 11, 2) on 32-bit Windows operating system. For my test, I used the HR schema (which is delivered pre-completed with the installation of this product) with some modifications of my own.

Make the Test objects:
create table hr.emp_test as
select to_char(employee_id) as emp_id_char, employee_id as emp_id,
first_name, last_name, hire_date
from hr.employees;
To illustrate my test, I inserted mixed alphanumeric values and a null value in the column of my emp_id_char for good measure:
insert into hr.emp_test (emp_id_char, first_name, last_name, hire_date)
values ('XKCD123','TEST','LASTNAME',sysdate);
insert into hr.emp_test (emp_id_char, first_name, last_name, hire_date)
values (null,'TEST1','LASTNAME2',sysdate);
commit;
* (1) this request fails once a nonnumeric value is inserted into the emp_test table.*
with
   sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
      from hr.emp_test  )
select * from sub1
where emp_id between 100 and 110
* (2) this query works OK.*
with
   sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
      from hr.emp_test where emp_id_char not like 'X%'  )
select * from sub1
where emp_id between 100 and 110
* (3) this query works OK.*
with
   sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
      from hr.emp_test where instr(emp_id_char,'X',1) = 0 )
select * from sub1
where emp_id between 100 and 110
* (4) this query Fails.*
with
   sub1 as ( select emp_id_char, first_name, last_name, hire_date
               from hr.emp_test
              where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
   sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
              from sub1 )
select *
from sub2
where emp_id between 100 and 110

ERROR:
ORA-01722: invalid number
* (5) even down the results of the rational expression of 3rd under the query in sequential processing order also FAILS *.
with
   sub1 as ( select emp_id_char, first_name, last_name, hire_date
               from hr.emp_test
              where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
   sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
              from sub1 ),
   sub3 as ( select emp_id, first_name, last_name, hire_date from sub2 )
select *
from sub3
where emp_id between 100 and 110

ERROR:
ORA-01722: invalid number
* (6) that it does not like previous query as well *.
with
   sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date,
       regexp_instr(emp_id_char, '[^[:digit:]]') as reg_x 
       from hr.emp_test 
       where reg_x = 0),
   sub2 as ( select emp_id, first_name, last_name, hire_date, reg_x
      from sub1 where reg_x = 0 )
select * from sub2
where emp_id between 100 and 110

ERROR:
ORA-00904: "REG_X": invalid identifier
Our Solution...
Add a hint to the query of sup that 'hiding' the result of sub1 in memory. That did the trick. This suspicion resembles only viable workaround for this behavior. Other old built-in functions (INSTR, AS, etc.) an they were automatically following the execution plan (results of cache memory) that he had to use a 'hint' to force with the function of the regular expression.

The conclusion, which is what I would like to help to understand or explain is that:
If you create a series of queries/sup queries or inline views, values depend on "regular expression" type built-in sql functions do not seem to stick or maintain when implemented in complex query logic.

Any idea is appreciated!
Thank you!

Published by: 870810 on July 6, 2011 15:47

870810 wrote:
I met a strange "inconsistent" when you use an Expression regular Oracle with subqueries in SQL.

This is the expected behavior and has nothing to do with regular expressions - much less directly (I'll explain later). Main rule: there is no WHERE clause predicate order. Even if you use views, views online, subquery factoring, optimizer etc. can extend your display, display online, a subquery factoring. And it's Optimizer who decides the order of execution predicate unless you use the ORDERED_PREDICATES key. Now, I can explain. Regular expressions are powerful enough but also everywhere in life to pay for it with the higher cost of execution. That's why optimizer decides to apply emp_id between 100 and 110 first and regexp_instr (emp_id_char, "[^ [: digit:]]'") = 0 later.

explain plan for
with
sub1 as ( select emp_id_char, first_name, last_name, hire_date
from emp_test
where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
from sub1 )
select *
from sub2
where emp_id between 100 and 110;

SQL> @?\rdbms\admin\utlxpls

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------
Plan hash value: 3124080142

------------------------------------------------------------------------------
| Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |          |     1 |    57 |     3   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| EMP_TEST |     1 |    57 |     3   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------

   1 - filter(TO_NUMBER("EMP_ID_CHAR")>=100 AND
              TO_NUMBER("EMP_ID_CHAR")<=110 AND  REGEXP_INSTR
              ("EMP_ID_CHAR",'[^[:digit:]]')=0)

15 rows selected.

SQL> 

As you can see, optimizer uses a FULL SCAN to read data from the table and apply emp_id between 100 and 110 which translates TO_NUMBER ("EMP_ID_CHAR") > = 100 AND TO_NUMBER ("EMP_ID_CHAR")<=110. and="" obviously="" it="" fails="" trying="" to="" convert="" xkcd123="" to="" number.="" now="" cost="" of="" instr(emp_id_char,'x',1)="0" is="" lower="" and="" optimizer="" decides="" to="" apply="" instr="" first.="" therefore="" xkcd123="" is="" filtered="" out="" before="" to_number="" is="">

SQL> explain plan for
  2  with
  3  sub1 as ( select emp_id_char, first_name, last_name, hire_date
  4  from emp_test
  5  where instr(emp_id_char, 'X') = 0 ),
  6  sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
  7  from sub1 )
  8  select *
  9  from sub2
 10  where emp_id between 100 and 110;

Explained.

SQL> @?\rdbms\admin\utlxpls

PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------
Plan hash value: 3124080142

------------------------------------------------------------------------------
| Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |          |     1 |    57 |     3   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| EMP_TEST |     1 |    57 |     3   (0)| 00:00:01 |
------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------

   1 - filter(INSTR("EMP_ID_CHAR",'X')=0 AND
              TO_NUMBER("EMP_ID_CHAR")>=100 AND TO_NUMBER("EMP_ID_CHAR")<=110)

14 rows selected.

SQL> 

The bottom LINE: With the help of strings to store non-chaine (numeric in your case) is never a good idea and shows design problems.

SY.

Tags: Database

Similar Questions

  • UNPIVOT query returns an error when used in a cursor.

    I ran a procedure in a package, I develop and have had the text following error returned:
    ORA-00998: must name this expression with a column alias
    ORA-06512: at "MANAGE_BULK_UPLOAD_PKG", line 467
    ORA-06512: at line 10
    The error occurs here somewhere, the line number was above the INSERT Word. What alias could he ask?
      OPEN get_blocks_cur;
      LOOP
        FETCH get_blocks_cur INTO p_block;
        EXIT
      WHEN get_blocks_cur%NOTFOUND;
    
       INSERT
         INTO dev_fbt_assign_block
            ( doc_id
            , blk_id
            )
            (SELECT up.doc_id
                  , up.blk_id
               FROM (SELECT upl_id, doc_id, blk_id
                       FROM fbt_doc_bulk_upload
                     MODEL
                     RETURN UPDATED ROWS
                     PARTITION BY (p_block.upl_id)
                     DIMENSION BY (0 as i)
                     MEASURES
                     ( 'xxxx' AS doc_id
                     , 'xxxx' AS blk_id
                     , p_block.block_1
                     , p_block.block_2
                     , p_block.block_3
                     , p_block.block_4
                     , p_block.block_5
                     , p_block.block_6
                     , p_block.block_7
                     , p_block.block_8
                     , p_block.block_9
                     , p_block.block_10)
                     RULES UPSERT ALL
                     ( blk_id[1]=block_1[0]
                     , blk_id[2]=block_2[0]
                     , blk_id[3]=block_3[0]
                     , blk_id[4]=block_4[0]
                     , blk_id[5]=block_5[0]
                     , blk_id[6]=block_6[0]
                     , blk_id[7]=block_7[0]
                     , blk_id[8]=block_8[0]
                     , blk_id[9]=block_9[0]
                     , blk_id[10]=block_10[0])
                    ORDER BY upl_id) up
              WHERE up.doc_id = p_max_rec
                AND up.blk_id IS NOT NULL);
        COMMIT;
    
      END LOOP; -- Loop for get_blocks_cur
    
       CLOSE get_blocks_cur;
    Thank you
    Ben

    Published by: Benton on November 23, 2010 16:26

    Published by: Benton on November 24, 2010 15:38

    After adding aliases, you got the error message that is different, right?

    I understand the logic, but I do not think that the sliders and record treatment is suitable here.
    So instead of correcting what I consider a rather clumsy code, can I suggest this solution:

    UPDATE ben_bulk_upload
    SET doc_id = BEN_DOC_SEQ.nextval,
        status = 'UPLOADED'
    WHERE status = 'NOT LOADED';
    
    INSERT INTO ben_doc (doc_id, atr_id, title)
    SELECT doc_id, atr_id, title
    FROM ben_bulk_upload;
    
    INSERT INTO ben_assign_block (doc_id, blk_id)
    SELECT doc_id, blk_id
    FROM (
     SELECT doc_id, blk_id
     FROM ben_bulk_upload
     MODEL
     RETURN UPDATED ROWS
     PARTITION BY (doc_id)
     DIMENSION BY (0 as i)
     MEASURES
     ( cast(null as number) blk_id
     , block_1
     , block_2
     , block_3
     , block_4
     , block_5
     , block_6
     , block_7
     , block_8
     , block_9
     , block_10 )
     RULES UPSERT ALL
     ( blk_id[1]=block_1[0]
     , blk_id[2]=block_2[0]
     , blk_id[3]=block_3[0]
     , blk_id[4]=block_4[0]
     , blk_id[5]=block_5[0]
     , blk_id[6]=block_6[0]
     , blk_id[7]=block_7[0]
     , blk_id[8]=block_8[0]
     , blk_id[9]=block_9[0]
     , blk_id[10]=block_10[0] )
    )
    WHERE blk_id IS NOT NULL;
    

    Three SQL, not of PL/SQL statements.

  • Strange glitch Visual on the taskbar when using Firefox

    Hello

    I feel a strange glitch Visual on the taskbar when using firefox.

    Please take a look at this short video because it shows the problem, it's almost impossible to show in pictures.

    https://DL.dropboxusercontent.com/u/12595174/VIDEO0016.3gp

    I use firefox on Windows 7 Pro 64 bit v36.0.1. Video card is an ASUS R9 280 X using the latest drivers from AMD 14.12 Catalyst Omega Software.

    Motherboard is an ASUS M5A88 with 16 GB of ram and a processor of 6300 FX.

    It is a new construction that I have implemented in the last 24 hours, and this behavior was not present on the system using the same version of windows, firefox and even map chart and drivers. But on another card mother and CPU. Previous Board of Directors has been
    M4A79XTD EVO with a Phenom II X 4 955BE.

    The glitching does not occur when it is on the desktop and firefox is closed. It will not occur when you use IE - 64 nor does it when I am using the steam software or any Explorer windows/opening files.

    All the motherboard drivers are installed correctly, the integrated graphics card is disabled in the BIOS. I disabled the settings of firefox for hardware acceleration, smooth scrolling and text... to see if it was the question. It wasn't.

    I'd appreciate any help to solve this... Really, I don't want to use a different browser but it's bad enough and quite distracting to really annoy me, and I don't see any alternative.

    Thank you very much.
    H

    Hi jscher2000

    I was about to post a reply, because a friend suggested that maybe that's a rendering of issue rather than a firefox one video card even if it's strange how it affected firefox only. I didn't have a chance to test it on Chrome as it is a new construction and I don't want to install the software, I do not use.

    I went to the Manager of catalyst and had a glance to the settings. I changed something, but no help... I then started to make a simple change and test until I found that the activation "gpu up-scaling" in the properties of digital flat screens has solved the problem.

    I am now free twinkle

    Thanks for your quick response however.

  • Error-20020 when you use Express "Filter" VI?

    Help for error-20020 indicates the cut-off frequency Fc must answer 0<= fc=""><=>

    Implement

    Using LIFA read an Arduino Uno's analog input signal to about 125 samples per second.

    Using Express 'Filter' VI to filter the data. The filter is set to low-pass, Fc = 10 Hz, Type Buterworrh and IIR.

    The Express filter works when CF is set to 0.5 Hz.

    Why the CF must be st to a lower value to! / 100 of the sampling frequency?

    What does do to get a low pass frequency of 10 Hz wien cut-off sampling rate is 125 samples per second?

    Howard

    If you right-click on the express VI and select open front panel, you can transform into a Subvi regular and forest down into it and see how it works.  You will see in his heart basic filter functions, you can find in the range of Signal Processing.  There are also "Point by Point" filters in this palette that allow you to work a stitch at a time.  They also have an entry that allows you to tell him what really is the sampling frequency.

  • unknown error when using vi express daq devices

    Hi there I have unknown error when you try to use express DAQ of VI. I downloaded and installed device drivers OR who needed to generate EXE since then this problem was occurring what should I do I've done everything that has been mentioned in the following thread

    (http://forums.ni.com/ni/board/message?board.id=170&message.id=336246&query.id=2154746#M336246), but no use, I'm not able to understand the problem can someone help me.

    Hi david thank you for everything my problem is solved by formatting the c drive that was the only solution... Thanks anyway bye...

  • Whenever I restart my computer, my account to outlook express email is going to remove my itself. So I have to configure an email account, once again, when using outlook express.

    Original title: outlook express

    Whenever I restart my computer, my account to outlook express email is going to remove my itself. So I have to configure an e-mail account again when using outlook express, please tell me how to solve this problem.

    Hello

    1. is this problem limited to this user account?
    2. have you made changes on the computer recently?

    Method 1.
    Let us first start the sfc scan and check if there are any file system corruption.
    a. to do this, click Start, click programs, accessories principally made, right click Guest and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.
    b. type the following command and press ENTER:
    sfc/scannow
    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
     
    More information on SFC scan found in this document:
    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    http://support.Microsoft.com/kb/310747

    Method 2.
    If the problem persists, then create a new user profile and then copy your current users assigning to this profile. For more information, see:
    How to create and configure user accounts in Windows XP
    http://support.Microsoft.com/kb/279783

    How to copy data from a corrupted to a new profile in Windows XP user profile
    http://support.Microsoft.com/kb/811151

    How to recover damaged Windows XP user profile
    http://support.Microsoft.com/kb/555473

    I hope this helps.

  • When we need to use a query variable and how to use it?

    Hello

    When we create a line of dashboard, we set the variable, there are two types: variable presentation and application.
    I'm confuse when we need to use a query variable and how to use it?

    Thank you
    Anne

    Hello
    The variable 'demand' can be used if you want to use session related information specific to you.

    See below a:
    http://gerardnico.com/wiki/dat/OBIEE/logical_sql/obiee_set_request_variable_dashboard_prompt

    FYI... example of
    for the example query variable (a good post Nico)

    http://gerardnico.com/wiki/dat/OBIEE/set_variable

    for the variable of presentation with example

    http://gerardnico.com/wiki/dat/OBIEE/presentation_variable

    Thank you

    Deva

  • How can I use a regular expression to validate the email address

    How can I use a regular expression to validate the e-mail address.

    var emailExp:RegExp = /([a-z0-9._-]+?) @([a-z0-9.-] +). ([a - z] {2,4});

  • Expression regular-not clear for the result

    I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.

    Here are the queries:

    1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;

    2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;

    3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;

    All requests above returns the same result, i.e. 'APT '.

    Question: My understanding is:

    a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.

    b > parenthesis (i.e.) - represents the exact mactch

    c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)

    I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.

    Thank you

    Amrit Pandey


    Hi, Amrit,

    ba1fbc36-dd1f-46af-80EE-a9cedf91e344 wrote:

    I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.

    Here are the queries:

    1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;

    2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;

    3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;

    All requests above returns the same result, i.e. 'APT '.

    Question: My understanding is:

    a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.

    b > parenthesis (i.e.) - represents the exact mactch

    c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)

    I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.

    Thank you

    Amrit Pandey

    Be careful.  Cut and paste the exact code you run.

    I do not get the same results for alI these queries.  I get an error message ' ORA-00936: missing expression. "for the 3rd.  Maybe you wanted to have the circumflex accent (^) inside the single quotes, like this:

    SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")

    , ('^ [[: alpha:]] +')

    ) AS addr

    DOUBLE;

    a > you're right;

    [[: alpha:]] +.

    refers to a group of characters 1 or more adjacent, which are all letters of the alphabet.

    b > an expression can almost always be enclosed in parentheses free.  In other words, almost anywhere, you can use an expression

    x you can also use

    (x)               or

    ((x))                  or

    (((x))) and so on.  Each of them the same meaning.

    This has nothing to do with regular expressions.

    In expressions regular, curved brackets can be used for the Backreferences, for example \1 can be used to return to exactly what corresponded to the subexpression inside the 1st pair of parentheses.  You are not using anything like \1 here, so this backreferences do not apply to this question.

    c > sign means negation only when it comes immediately after [.]  For example

    SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")

    ", ' [^ [: alpha:]] +"

    ) AS addr

    DOUBLE;

    product

    ADDR

    ------

    -101,

    in other words, the characters 1 or more consecutive which are NOT letters of the alphabet.

    Outside square brackets, the circumflex accent means the beginning of the string.

  • emails missing when outlook express compact

    When outlook express is closed, he asked if I wanted to compact the files to save space. After compaction, all mails disappeared and are no longer in the Inbox. Where can I find them

    Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.

    Why OE insists on compacting folders when I close it? :
    http://www.insideoe.com/FAQs/why.htm#compact
     
    Why mail disappears:
    http://www.insideoe.com/problems/bugs.htm#mailgone
     
    About file Corruption:
    http://www.Microsoft.com/Windows/IE/community/columns/filecorruption.mspx

    Recovery methods:

    If you use XP/SP2 or SP3, and are fully patched, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.

    To restore a folder bak on the message store folder, first find the location of the message store.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.

    Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.

    Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.

    First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.

    If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.

    If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.
     
    If you have not then bak copies of your dbx files in the Recycle Bin:

    DBXpress run in extract disc Mode is the best chance to recover messages:
    http://www.oehelp.com/DBXpress/default.aspx

    And see:
    http://www.oehelp.com/OETips.aspx#4

    A general warning to help avoid this in the future:

    Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

  • WCF error when using the API of VSM

    VSM 9.1.4

    Oracle 10g R2

    I am attemtping to use the "MessageSendMessage" command in the VSM API to send back the client permissions and I get the following error message when running it from the VSM server.

    ERROR: The operation 'ContractUnlinkCIAsync' cannot be loaded because it has a parameter or type System.ServiceModel.Channels.Message or a type that has the MessageContractAttribute and other parameters of different types of return. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method should not use other types of settings.

    It's an odd error because I do not use the "ContractUnlinkCI" command which tells me that there is a problem with the generation of the class file.

    I ran the following command to generate my config file and the class in the directory "C:\Program Files (x 86) \Microsoft 4.0 Tools":

    Svcutil t:code /MessageContract. [URL ServiceManager.svc] / out: ISMAPI.cs /config:ISMAPI.config

    The class files and generated config ok. Then I copied the game config to the Web site's web.config file:

    < system.serviceModel >

    < links >

    < basicHttpBinding >

    < connection name = "BasicHttpBinding_IServiceManager" / >

    < / basicHttpBinding >

    < / links >

    < customer >

    < endpoint address = "[ServiceManager.svc URL]" binding = "basicHttpBinding" bindingConfiguration = contract "BasicHttpBinding_IServiceManager" = "IServiceManager" name = "BasicHttpBinding_IServiceManager" / >

    < / customer >

    < system.serviceModel >

    I put the ISMAPI.cs file in the App_Code to my site folder:

    DirectoryStructure.JPG

    My code works fine when I run locally and include the correct querystring values, but it returns the error above, when I run the code from the VSM server. The query string I used: default.aspx? ajaxfunction = 2 & tasknumber = 425134 & agent = 2370 & recvofficer = 2370

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using System.Runtime.Serialization;
    using System.ServiceModel;

    partial class _Default: System.Web.UI.Page
    {
    Protected Sub Page_Load (object sender, EventArgs e)
    {
    Response.Expires = - 1;
    Response.ContentType = "text/plain";
    If (Request.QueryString ["ajaxfunction"]! = null)
    {
    Try
    {
    Int16 intFunction = Int16.Parse (Request.QueryString ["ajaxfunction"]. (ToString());
    Switch (intFunction)
    {
    case 1:
    If (Request.QueryString ["tasknumber"]! = null)
    {
    Int64 intTaskNumber = Int64.Parse (Request.QueryString ["tasknumber"]. (ToString());
    Response.Write (getTaskApprovalComments (intTaskNumber.ToString ()));
    }
    break;
    case 2:
    If (Request.QueryString ["tasknumber"]! = null & & Request.QueryString ["officer"]! = null & & Request.QueryString ["recvofficer"]! = null)
    {
    MessageRequest load = new MessageRequest();
    inStruct.sLoginUserID = System.Configuration.ConfigurationManager.AppSettings ["apiLogin"];
    inStruct.sLoginPassword = System.Configuration.ConfigurationManager.AppSettings ["apiPassword"];
    inStruct.sDatabase = System.Configuration.ConfigurationManager.AppSettings ["apiDatabase"];
    inStruct.eEntityType = CRTEntityForEmail.Task;
    inStruct.nEntityRef = Int32.Parse (Request.QueryString ["tasknumber"]);
    inStruct.ePriority = MailPriority.Normal;
    inStruct.eMMAMessageType = MessageMMAType.Approval;
    inStruct.nMessageType = 130;
    inStruct.lRecipientRef = ' ~ ' + Request.QueryString ["recvofficer"];
    inStruct.eRecipientType = MessageRecipientType.Person;
    inStruct.bEmail = true;
    MessageResponse outStruct = new MessageResponse();
    SMC ServiceManagerClient = new ServiceManagerClient();
    outStruct = SCM. MessageSendMessage (inStruct);
    Response.Write (outStruct.sMessage);
    }
    break;
    by default:
    Response.Write ("ERROR: invalid function!");
    break;
    }
    }
    catch (System.Exception Exception)
    {
    Response.Write ("ERROR:" + exception.) (Message);
    }
    }
    Response.End ();
    }

    I hope one of the other directors VSM has met this problem and knows a solution. I tried Googling this issue but with my knowledge of WCF, I don't know what I'm looking at. I also tried commenting on the problem area in the ISMAPI.cs file but it gives me an other errors so I obviously don't know what I'm doing.

    Thank you.

    If locally it works fine I guess you should compare the versions of .net framework assigned to your web applications (application pool), and all the parameters specified in the web.config file.

  • Case statement in query sub

    Hi, I have two questions, here is my initial code:

    Select
    CC.name_id_no
    cc.discover_date
    cc.cla_case_no
    max (rl.year_of_incident) Non_Loss_Past_5
    rl.timestamp
    of cla_case cc, rbn_loss rl
    where cc.name_id_no = rl.customer_no
    and rl.year_of_incident < trunc (cc.discover_date)
    and rl.type_of_loss < 1000
    and rl.timestamp < trunc (cc.discover_date)
    and (cc.question_class = 20
    or cc.question_class = 25)
    and < 1095 (trunc (cc.discover_date)-(rl.year_of_incident))
    - and (trunc (cc.discover_date) <>(rl.year_of_incident))
    Group of cc.cla_case_no, name_id_no, cc.discover_date, rl.timestamp

    Now a cla_case_no can map to several year_of_incident. I want only the cla_case_no that maps to the max year_of_incident, that is to say it should only be a single cla_case_no corresponding to the max year_of_incident.

    To work around this problem, I did the following is not very effective and I hope that it can be improved:

    Select distinct z.cla_case_no from)

    Select
    CC.name_id_no
    cc.discover_date
    cc.cla_case_no
    max (rl.year_of_incident) Non_MW_Loss_Past_5
    rl.timestamp
    of cla_case cc, rbn_loss rl
    where cc.name_id_no = rl.customer_no
    and rl.year_of_incident < trunc (cc.discover_date)
    and rl.type_of_loss < 1000
    and rl.timestamp < trunc (cc.discover_date)
    and (cc.question_class = 20
    or cc.question_class = 25)
    and < 1095 (trunc (cc.discover_date)-(rl.year_of_incident))
    - and (trunc (cc.discover_date) <>(rl.year_of_incident))
    Group of cc.cla_case_no, name_id_no, cc.discover_date, rl.timestamp
    ) z

    Now comes the second question: the above is actually a subquery that will link to a larger table via cla_case_no ccx

    SELECT

    This is to say, (select distinct z.cla_case_no of)

    Select cc.name_id_no, cc.discover_date, cc.cla_case_no, max (rl.year_of_incident) Non_MW_Loss_Past_5, rl.timestamp
    of cla_case cc, rbn_loss rl
    where cc.name_id_no = rl.customer_no
    and rl.year_of_incident < trunc (cc.discover_date)
    and rl.type_of_loss < 1000
    and rl.timestamp < trunc (cc.discover_date)
    and (cc.question_class = 20
    or cc.question_class = 25)
    and < 1095 (trunc (cc.discover_date)-(rl.year_of_incident))
    - and (trunc (cc.discover_date) <>(rl.year_of_incident))
    Group of cc.cla_case_no, name_id_no, cc.discover_date, rl.timestamp
    ) z
    where z.cla_case_no = ccx.cla_case_no
    ) Non_MW_Loss_Past_5

    Etc.

    Now only some cc.cla_case_no the subquery to be match to the ccx_cla_case_no of the main table and the other entries will be void.

    What I am asking, is that if the subquery returns a result that IS NOT NULL to return some ELSE 'Y' "n" instead of her ranges from cla_case_no entries (null) in the Non_MW_Loss_Past_5 column

    Thank you!!!

    Banner:
    Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Hello

    Looks like you have another copy of this issue:
    Case statement and query sub
    This probably isn't your fault, but you must mark the other copy as "Answered" right away, and then you only have to look for answers in one place.

    885178 wrote:
    ... Now a cla_case_no can map to several year_of_incident. I want only the cla_case_no that maps to the max year_of_incident, that is to say it should only be a single cla_case_no corresponding to the max year_of_incident.

    If you know there is only one, then you can use last, and you don't need GrOUP BY

    To work around this problem, I did the following is not very effective and I hope that it can be improved:

    Select distinct z.cla_case_no from)

    Select
    CC.name_id_no
    cc.discover_date
    cc.cla_case_no
    max (rl.year_of_incident) Non_MW_Loss_Past_5
    rl.timestamp
    of cla_case cc, rbn_loss rl
    where cc.name_id_no = rl.customer_no
    and rl.year_of_incident<>
    and rl.type_of_loss<>
    and rl.timestamp<>
    and (cc.question_class = 20
    or cc.question_class = 25)
    and (trunc (cc.discover_date)-(rl.year_of_incident))<>
    -(trunc (cc.discover_date) <> (rl.year_of_incident))
    Group of cc.cla_case_no, name_id_no, cc.discover_date, rl.timestamp
    ) z

    Here's one way:

    SELECT       MIN (cla_case_no) KEEP (DENSE_RANK LAST ORDER BY r1.year_of_incident)
                         AS latest_cla_case_no
    FROM       cla_case     cc
    ,             rbn_loss      rl
    WHERE     cc.name_id_no          = rl.customer_no
    AND       rl.year_of_incident     > TRUNC (cc.discover_date) - 1095
    AND       rl.year_of_incident      < TRUNC (cc.discover_date)
    AND       rl.type_of_loss     < 1000
    AND       rl.timestamp          < TRUNC (cc.discover_date)
    AND       cc.question_class     IN (20, 25)
    ;
    

    If post you some examples of data (CREATE TABLE and INSERT statements) and outcomes from these data, I was able to test this.

    Now comes the second question: the above is actually a subquery that will link to a larger table via cla_case_no ccx

    SELECT

    This is to say, (select distinct z.cla_case_no of)

    Select cc.name_id_no, cc.discover_date, cc.cla_case_no, max (rl.year_of_incident) Non_MW_Loss_Past_5, rl.timestamp
    of cla_case cc, rbn_loss rl
    where cc.name_id_no = rl.customer_no
    and rl.year_of_incident<>
    and rl.type_of_loss<>
    and rl.timestamp<>
    and (cc.question_class = 20
    or cc.question_class = 25)
    and (trunc (cc.discover_date)-(rl.year_of_incident))<>
    -(trunc (cc.discover_date) <> (rl.year_of_incident))
    Group of cc.cla_case_no, name_id_no, cc.discover_date, rl.timestamp
    ) z
    where z.cla_case_no = ccx.cla_case_no
    ) Non_MW_Loss_Past_5

    Etc.

    Now only some cc.cla_case_no the subquery to be match to the ccx_cla_case_no of the main table and the other entries will be void.

    What I am asking, is that if the subquery returns a result that IS NOT NULL to return some ELSE 'Y' "n" instead of her ranges from cla_case_no entries (null) in the Non_MW_Loss_Past_5 column

    NVL2 (x, 'Y', 'N')
    

    Returns 'Y' if x is NULL, and it returns "n" If x is not NULL. X can be a scalar subquery:

    NVL2 ((SELECT ...), 'Y', 'N')
    

    You can also use an EXISTS subquery:

    CASE
        WHEN  EXISTS (SELECT ...)
        THEN  'Y'
        ELSE  'N'
    END
    
  • System crash when use underscore

    Hello.

    He seems to have a bug in the creation of TextLine when use the pointed out...

    Quick glance:

    for ()var iIndex:int = 0; iIndex < 10000; iIndex ++)

    {

         var strTest: String = « ' < flow: TextFlow paddingTop = "3" paddingLeft = "3" whiteSpaceCollapse = "preserve" xmlns:flow = "http://ns.adobe.com/textLayout/2008" > < flow: p > < textDecoration flow: duration = "highlight" > a < / flow: duration of > <: duration of flow > < / flow: duration > < / flow: p > < / flow: TextFlow > ' » ;

         var oTextFlow: TextFlow = TextFilter.importToFlow (strTest, TextFilter.TEXT_LAYOUT_FORMAT);

         var arTextLine: Array = new Array();

         var oTextLineHandler: function = function (oTextLine: TextLine): Sub {arTextLine.push (oTextLine) ;};

    TextLineFactory.createTextLinesFromTextFlow (oTextLineHandler, oTextFlow,

    new Rectangle (0, 0, 200, 200));

    }

    When you try this, PLANE crash. (Flex Builder 3).

    THS code is just one example of bug... I know its useless

    Its very strange that, if you do not create the TextFlow in the loop, it's ok...

    var strTest: String = « ' < flow: TextFlow paddingTop = "3" paddingLeft = "3" whiteSpaceCollapse = "preserve" xmlns:flow = "http://ns.adobe.com/textLayout/2008" > < flow: p > < textDecoration flow: duration = "highlight" > a < / flow: duration of > <: duration of flow > < / flow: duration > < / flow: p > < / flow: TextFlow > ' » ;

    var oTextFlow: TextFlow = TextFilter.importToFlow (strTest, TextFilter.TEXT_LAYOUT_FORMAT);

    for ()var iIndex:int = 0; iIndex < 10000; iIndex ++)

    {

         var arTextLine: Array = new Array();

         var oTextLineHandler: function = function (oTextLine: TextLine): Sub {arTextLine.push (oTextLine) ;};

    TextLineFactory.createTextLinesFromTextFlow (oTextLineHandler, oTextFlow,

    new Rectangle (0, 0, 200, 200));

    }

    What can I do? just wait for a beta version or is there a process to sync, I'm bored?

    PS: Sorry for my English...

    Interesting to note that the problem is specific AIR. I'll take an AIR project to see if I can reproduce.

    You can try this test on a newer version of TLF? The new CFC is available here: http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/libs/

  • Line breaks ignored when using text HTML CSS and embedded fonts

    Someone at - it find it.
    When you use a style sheet with html text in a dynamic textfield with embedded fonts line breaks are ignored. It's as if TextField.condenseWhite is set to true. Essentially the < p > tags are treated as a < br / > tag.

    If I do not incorporate fonts, it works fine. Another weird thing is that if I add an empty paragraph < p > < / p > between the first two paragraphs it makes any following paragraph behave correctly. for example

    < p > first text paragraph here < /p >
    < p > second text paragraph here < /p >
    < p > third text of paragraph here < /p >

    poster as if there are < br / > between each of them.

    But

    < p > first text paragraph here < /p >
    < p > < / p >
    < p > second text paragraph here < /p >
    < p > third text of paragraph here < /p >

    behaves correctly even for the third paragraph.

    Here is the code that I work with (by using XML as I am filling dynamic textfield to XML)

    any help much appreciated

    UPDATE:
    After reading http://www.kirupa.com/forum/showthread.php?t=307326
    I tried the same experiment using a TF designed in the IDE, the results for each, although the TextFields are essentially the same are totally different.

    Updated CODE accordingly - just need TF on stage, called "ideTextField" with the font "Arial".



    Ok
    I gave up to play with style sheets, try display: block, inline, different ways to format the XML data, in play with XML.ignoreWhiteSpace and XML.prettyPrinting etc.

    I went down the road of encodeURI, using a regular expression to remove all tabs, line breaks and the transport returns. This now gives consistent results for all situations, even incorporated and any fonts embedded.

    for example
    _TEXT:string = TEXT FROM XML, HTML TEXT etc.

    var st:String = encodeURI (_text);

    var model: RegExp = /(%09) + | (0 %) + | (0 % D) + / g ;

    St = st.replace (model, "");
    St = decodeURI (st);

    YOUTEXTFIELD.htmlText = m;

    The

    Tags always behave like a
    Tag, but you can add an extra
    to simulate a paragraph.

    Here is the example with the updates,

    Hope this helps someone

  • I have a problem when using Google Maps, at a certain point my custards computer window and says there is a problem with the display drivers and he recovered, but it is not. Problem does not occur with Int Explorrer, so I don't think it's the computer

    When using google maps via Firefox, after asking a place which is not the General section of North America who comes up regularly, the firefox screen becomes white with a narrow banner at the top. A message appears in the lower right corner that says something on display drivers having had a problem, but now have been recovered. However, the display is not recover and the message of the banner is that Firefox is not responding. When I go to restart Firefox if I'm about to restore, the page is still frozen.
    I don't think there is a problem with my computer because it doesn't happen if I used to go to google maps, then G-cards works normally.
    This phenomenon didn't happen before the last update Google or Firefox. I used Fiefox for some years and also Google Maps on previous computers and on this one and not had it before.
    It is a relatively young computer (Asus EeSlate 121) less than a year. I have used Firefox since I bought it and until recently had no problem with Google Maps.

    I solved it myself, after the 'note' that was FF/Mozilla, just as I finished my message, commenting on what it was that my system was, I wnnt back to check my plug-ins, etc. I downloaded the latest Java, the TWO 32-bit AND 64-bit versions and latest Firefox.
    Now everything works.
    Thank you
    B.

Maybe you are looking for