SQL AS not sufficient Condition for the identification of common strings

Hi guys,.

I can´t get my head around why the condition doesn't LIKE not the case which is why 1234 M - 4 not recognized as a similar to 1234 M 221-2?

CREATE EXCEL TABLE (EXCEL_ID VARCHAR (100));

CREATE A PD (PD_ID VARCHAR (100)); TABLE

INSERT INTO EXCEL (EXCEL_ID) VALUES('1234M221-2');

INSERT INTO PD (PD_ID) VALUES ('1234M - 4');

SELECT EXCEL_ID, PD. PD_ID

SINCE EXCEL ex

LEFT JOIN

PD (SELECT PD_ID FROM pp)

WE e.g. EXCEL_ID LIKE "%" | PD. PD_ID | » %'

Thanks for the tips!

Hello

metalray wrote:

Hi guys,.

I can´t get my head around why the condition doesn't LIKE not the case which is why 1234 M - 4 not recognized as a similar to 1234 M 221-2?

CREATE EXCEL TABLE (EXCEL_ID VARCHAR (100));

CREATE A PD (PD_ID VARCHAR (100)); TABLE

INSERT INTO EXCEL (EXCEL_ID) VALUES('1234M221-2');

INSERT INTO PD (PD_ID) VALUES ('1234M - 4');

SELECT EXCEL_ID, PD. PD_ID

SINCE EXCEL ex

LEFT JOIN

PD (SELECT PD_ID FROM pp)

WE e.g. EXCEL_ID LIKE "%" | PD. PD_ID | » %'

Thanks for the tips!

If pd.pd_id = "1234 M - 4', then

e.g. EXCEL_ID LIKE "%" | PD. PD_ID | » %'

will be TRUE if (and only if) ex.excel_id contains a substring of the exactly 7 characters, ' 1234 M - 4', in that order.  It may or may not be anything before '1234 M - 4'; That's what means the first '% '.  It may or may not be other stuff after the '1234 M - 4'; That's what means the last '% '.  But pd.pd_id must be there in its entirety.

Do you need something that will compare '1234 M 221-2' to ' 1234 M - 4' and return TRUE?  Explain, in general terms, why you consider similar and you firewall other pairs of strings is not to look like.  In addition to generic rules, CREATE TABLE and INSERT pairs of sample may be 6 or 12 strings, and the results that you want to start comparing them.  The results can look like this:

str_1 output str_2

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

1234 M 221 - 2 1234M - 4 REAL

1234M - M 4 1234, 221-2 FALSE

...

In each case, explain where or which of your rules chains followed (or broken) to be look similar (or not).

Tags: Database

Similar Questions

  • SQL error: ORA-01840: value not long enough for the format of the date of entry

    It is a delete SQL in a driver of demand, which gives no error, but does remove all the lines either. I have converted the removal 'from' to ' Select * ' and may see the following error:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "CAL_0812")
    Error report:
    SQL error: ORA-01840: value not long enough for the format of the date of entry


    The interesting thing is that if I attach a condition of emplid, then the SQL above does not give an error and return lines:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "FM_CG_0812")
    and emplid = "1234"

    now, if the number of lines is identified (by giving more number of emplids), it begins to give the error when the number of rows returned is greater than about 30. It is completely independent of what employee is used, so there is no question of data dependence.

    Function optimizer cost is off and a subquery nest is off on the init.ora file

    subquery UNNEST= false

    optimizercost_based_transformation = off


    I don't know if it has something to do with this problem.

    Explanations would be welcome!

    Thank you
    Vikas

    I think it is question of data combined with a not very sensible date format mask (it could fail when the null data, because of your concatenation with '01' and work when not null data).
    Have you tried with a simple TRUNC?

    Your code:

    ...TO_DATE(TO_CHAR(ELG.PRD_END_DT, 'YYYY') || TO_CHAR(ELG.PRD_END_DT , 'MM') || '01' , 'YYYY-MM-DD') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    After change:

    ...TRUNC(ELG.PRD_END_DT , 'MM') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    Nicolas.

  • Why G33/G31, which is a graphic chipset is detected by the utility for the identification of the chips?

    Why G33/G31, which is a graphic chipset is detected by the utility for the identification of the chips and not the main chipset?

    Thank in advance for any info that you can provide me with

    Concerning

    Macias
    -Please do not use TinyURL my firewall blocks them.
    Click on the star of CONGRATULATIONS on the left, if I helped you. Please mark as RESOLVED, if your question has been answered.

    Hi, Macias:

    The G31 and G33 chipsets chipsets are not only graphic.

    http://Ark.Intel.com/products/chipsets/29000

    http://Ark.Intel.com/products/chipsets/30686

    Kind regards

    Paul

  • How to ensure sufficient resources for the redundancy of the site?

    I was wondering how to make sure that there are enough resources between the 2 sites to cover a site failure.

    With 2 active/active sites with their own 5.0 vCenters, there is SAN replication between the 2 sites for particular VM. All we need is RS. but he still gets hit back in the budget.

    We add the virtual computer to a single site, how can we ensure there are sufficient resources to the second site to run the existing virtual machine more who can be taken on during a DR scenario?

    Something like admission through vCenters control would be great. I suppose I could change the percentage of reserved as ability to failover cluster resources every now and then that I added the VM to the other site, or change the "cluster host failure tolerate" n + one estimate of the number of hosts the VM replied to the other use of the site, but I would like something with a little more science behind it.

    MRS. solve/help with this problem?

    What others are doing in this situation?

    Thank you.

    SRM does not help or solve the problem. Best practices for using the change in the percentage of reserved as opposed to the option host cluster resources. This gives much more flexibility and should be recalculated when you add new hosts and VM. I usually calculate the two mountains. In your calculations, always leave enough vCPU and vRAM for the hypervisor. Most people forget this.

    When you do your calculations, you'll need of sufficient space for the two environments at each site. Take into account the growth (average growth) needs more hypervisors.

    A good suggestion is to get the book: VMware vSphere 5 technical Deepdive of Clustering. Its written by Duncan Epping and Frank Denneman. I read it and its great. I kept with me when I draw environments vSphere as reference when I need it. Deepdive technique than it really is!

  • vmrun.exe error: not sufficient permissions in the host operating system

    Hello

    Someone at - it a list of errors than vmru.exe product and what they mean?

    I have this error: not sufficient permissions in the system of operating host when I try to remote start a virtual machine. What is c?

    Kind regards

    Garry

    This means that you do not have sufficient permissions to turn the virtual computer in question, to ensure that the permissions on vCenter is configured correctly, or if you connect directly to the host ESX (i) you have the required permissions.

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    http://Twitter.com/lamw

    If you find this information useful, please give points to "correct" or "useful".

  • Error: Not sufficient permissions in the OS host on Ubuntu 8.04 x 86 host

    When I run the command:

    vmrun T - h server http://localhost:8333 / sdk u myuser-p mypassword stop "[standard] vm-ofi2b/vm - ofi2b.vmx ' soft

    I get the following error:

    Error: Not sufficient permissions in the host operating system

    I have granted permissions on WM Infr.Web access for this user to Power Off (under all the privileges/Virtual Machines / Interaction).

    I guess the problem is due to a lack of permissions for this user on the host SO and not in their configuration of vmware.

    What are the minimum permissions that a user of linux must have in order to stop a virtual machine?

    I thank in advance.

    I created a role on Server 2.0 (on Linux) which just had Power On privileges, suspends and the Console, assigned to a (very) Limited User Interaction so that the role and this is the account I use in a shutdown script to suspend my VMs.

    Also, make sure that escape you, for example in double quotes or backslashes, 'special' characters (such as spaces) in the password that you will also get this message when the user name password are wrong.

  • The message I get is Microsoft word has not been installed for the current user. Please run set up to install the application. I reinstalled the software, but get the same message.

    The message I get is Microsoft word has not been installed for the current user.   Please run set up to install the application.   I reinstalled the software, but get the same message.

    Hello

    See the methods listed in the articles below and check.
    You receive an error "Microsoft has not been installed for the current user" message when you try to start an Office 2003 program or an Office XP program for the first time
    http://support.Microsoft.com/kb/898512
     
    You receive a message "Microsoft has not been installed for the current user" when you start an Office XP program or start of Microsoft Office Maintenance mode
    http://support.Microsoft.com/kb/298022

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • It "seems" is not an API for the art media at the CC of Adobe Photoshop for the touchscreen.

    PC: Microsoft SurfaceBook, Win-10, 64-bit, 16 GB of RAM

    All-in-one touchscreen Lenovo A740, Win-10, 64-bit, 16 GB of RAM

    Application two computers; Adobe Photoshop & CorelPAINT CC X 6

    SurfaceBook-in CC Adobe Photoshop works well with the pen & touch.

    Lenovo A740 - in CC Adobe Photoshop is inadmissible to capacitive pen (mouse works fine).

    Still... CorelPAINT X 6 works well with the mouse, touch and capacitive stylus.

    QUESTION - why the CC of Adobe Photoshop features lack INK API required for brush motor to work with capacitive touch screen on my Lenovo A740?

    It "seems" is not an API for the art media at the CC of Adobe Photoshop for the touchscreen.

    If... I'm wrong, please point me in the right direction.

    Move on to the Discussion of Photoshop

  • I will be able to cancel my subscription to Photoshop after 1 month and not to pay for the rest of the year?

    I got only 1 month out of the second year of University and will buy Adobe Photoshop for use at home at the moment. I will be able to cancel the subscription once the 1 month is over and not to pay for the rest of the year? I read that they take 50% of the years cost you? Thank you!

    Cancel see answer #1 in https://forums.adobe.com/thread/2023066 - includes a link to Chat from Monday to Friday

  • A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\VMware vCenter Server Appliance.

    Hello gentlemen,

    I can not only save this virtual machine with Backup Exec 2014 for a long time.

    They are there was no snapshot in snapshot Manager.

    Could you help me?

    A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\VMware vCenter Server Appliance.

    V-79-57344-38260 - failed to create a snapshot of the virtual machine. The virtual machine is no longer exist, or may be too busy to pause to take the snap.

    A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\FRPA111PRIM01.

    V-79-57344-38299-\vm\FRPA111PRIM01 ha-data center (DC) VMVCB::\\192.168.204.42\VCGuestVm\ (DC). To try to take a snapshot of a virtual machine failed because it could not be suspended in a file system.

    Hello

    I found the solution.

    I disabled the JOB BE general relativity.

    and the host where the virtual machine belong was not the right time. No Ntp server has been configured.

    I did and now there works.

    I think that the problem can come from this.

  • Cannot open the illustration. There is not enough room for the window; increase the area of document and try again

    Hello

    I'm under Illustrator CS6 on a Mac version 10.10.3. I created an Illustration and I accidentally did very little to save and close the window. Now whenever I open the file I get the error "unable to open the illustration. There is not enough room for the window; increase the area of document and try again. "This problem is specific to this file only - I can open all other correct files, and anyone who tries to open that particular file on a completely separate machine receives the same error. I read all the posts of people having the same error message, but their problem is different from mine because my problem is specifically limited to this file. I've trashed preferences, hidden and shown the toolbar Application and an open framework of other files and makes them great as possible, has the file open on the file menu, instead of double clicking, and none of these methods work.

    Can anyone help?

    Thank you so much in advance!

    Well, problem solved. For future users with this problem:

    Open a new document in Illustrator

    Press "F" to enter full screen mode

    File > open to open the file problem

  • I just bought a Canon 7 d, Mark II, new DellXPS and 5.2 of Lightroom.  The Lighthouse is not open the 7DMark II, but opens the older 7 d that I imported.  I checked the update of the home page and do not see one for the 7 5 d Mark II.  Please say what t

    I just bought a Canon 7 d, Mark II, new DellXPS and 5.2 of Lightroom.  The Lighthouse is not open the 7DMark II, but opens the older 7 d that I imported.  I checked the update of the home page and do not see one for the 7 5 d Mark II.  Please that's where - otherwise what.  I'm "waiting until what his doing."  Thank you.

    Upgrade to the current version, which is Lightroom 5.7.1. You can do it from the Lightroom Help menu and choose updates.

  • entry not long enough for the date format value

    Hi all
    my table PF having IN_DATE is number format we save date number format as 20120101 (Jan 01, 2012)
    and IN_DATE can have 0 (zeros) also.

    When running under query, I get error "not long enough for the format of the value entry date.
    Please, help me to sort it, why this error is coming?

    Thanks in advance
    SELECT * FROM pf WHERE 
    TO_DATE(IN_DATE,'YYYYMMDD') > TRUNC(SYSDATE)-100
    and IN_DATE  != 0;
    Published by: user10736825 on May 20, 2013 15:30

    Hello

    When you store date information in a column NUMBER (or string), you just ask in trouble. The best way to avoid this problem is to use a DATE for date information column.

    The next best thing is to avoid the conversion of the NUMBER into a DATE. DATEs (such as returned by SYSDATE) still can b converted without risking a mistake, so instead of

    user10736825 wrote:

    SELECT * FROM pf WHERE
    TO_DATE(IN_DATE,'YYYYMMDD') > TRUNC(SYSDATE)-100
    and IN_DATE  != 0;
    

    use:

    SELECT  *
    FROM      pf
    WHERE      in_date  > TO_NUMBER ( TO_CHAR ( TRUNC (SYSDATE) - 100
                                         , 'YYYYMMDD'
                               )
                        )
    ;
    
  • Requisition import error: Element is invalid or not purchase-enabled for the

    Hi all -

    That we met at the origin of the error:

    Destination organization is not valid or receiving parameters are missing

    Cause: You have entered an invalid destination organization.

    Action: Enter a destination organization invalid.

    But see him again, an error has occurred after application to import finished. I went through the purchase/receive Options, but I can't find this set-up. How can I activate the attribute enabled-purchase from a supplier? Or how can I check if it is enabled for the vendor in question?

    Error after requisition full import
    Element is invalid or not purchase-enabled for purchasing organization

    Cause: You have entered an item that is invalid or not purchase-enabled for the Organization to purchase. This is required for a type of source of 'supplier '.

    Action: Enter a valid element that is activated by buying for the Organization to purchase.


    Best regards
    Jenn

    Try running req import exception report

    Purchase Oracle provides Exceptions application to import report, which can be used to diagnose problems with the records, which were currently incorrect on the PO_REQUISITIONS_INTERFACE_ALL table. To run the report, follow these steps:

    1. responsibility for the use of purchase, go to reports-> Run
    2. Select the imported requisition exception report
    There is a parameter called "remove the Exceptions". If it is filled with 'Yes', then all the records in the table PO_REQUISITIONS_INTERFACE_ALL with a status of "ERROR" and the corresponding records in the PO_INTERFACE_ERRORS will be deleted when the report is run. You can also restrict the records deleted by selecting the Batch_id and the Source of the Interface code.

    If the parameter is set to no, and then you will see errors in the report and power manually fix the data in the table, if desired. then, at the end of the correction of data, run application to import again to deal with the changed lines in the interface table

    Just check in case if it is not already
    The agenda must contain price master org
    Make sure that the attributes of item of purchase are on
    agenda should be assigned to the org of validation point which, in most cases, will be the master org. or if it is different... by going to the options provider financial purchase tab

    Mahendra

    Published by: Mahendra on April 26, 2013 16:43

  • B2B-50083: Protocol for the identification of the Document error. E-mail traffic

    Hi all the gurus of B2B...

    Requirement-

    1. the customer send an email to attachemnet to an e-mail address,
    2 SOA Composite using Oracle mark B2B is the email address,


    B2B is the address of electronic mail to vote correctly.
    However Business/Wire messsage is an error like:-

    Error -: B2B-50083: Protocol for the identification of the Document error.
    at oracle.tip.b2b.engine.Engine.identifyDocument(Engine.java:5062)
    at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2180)
    at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1660)
    at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4047)
    at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3687)
    at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3160)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:619)
    at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:220)
    to oracle.integration.platform.blocks.executor.WorkManagerExecutor$ 1.run(WorkManagerExecutor.java:120)
    to weblogic.work.j2ee.J2EEWorkManager$ WorkWithListener.run (J2EEWorkManager.java:183)
    at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)


    Log shows that the agreement is validated too. However, does ' t message contains the id of the agreement.

    It is a simple message with no attachment.

    @ Channel configuration look, use Content Type - application/xml

    It is a custom document. Expression of identification used - ' / * '.
    Here is the schema used in the definition of the Document definition:


    < xsd: Schema container = "http://www.w3.org/2001/XMLSchema" >
    < xsd: element name = "email" type = "mailsType" / >
    < xsd: complexType name = "mailsType" >
    < xsd: Sequence minOccurs = "0" maxOccurs = "unbounded" >
    < xsd: element name = "mail" type = "mailType" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < xsd: complexType name = "mailType" >
    < xsd: SEQUENCE >
    < xsd: element name = "envelope" type = "envelopeType" / >
    < xsd: element name = "body" type = "bodyType" / >
    < xsd: element name = "home" type = 'attachmentType '.
    minOccurs = "0" maxOccurs = "unbounded" / >
    < / xsd: SEQUENCE >
    < xsd: attribute use = "required" name = "id" type = "xsd: Integer" / >
    < / xsd: complexType >
    < xsd: element name = "header" >
    < xsd: complexType >
    < xsd:simpleContent >
    < xsd:extension base = "XSD: String" >
    < xsd: attribute Ref = use "name" = "required" / >
    < / xsd:extension >
    < / xsd:simpleContent >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Date" type = "xsd: DateTime" / >
    < xsd: complexType name = "envelopeType" >
    < xsd: SEQUENCE >
    < xsd: element name = "" type = "xsd: String" / >
    < xsd: element name = "En" type = "xsd: String" / >
    < xsd: ELEMENT ref = "Date" / >
    < xsd: element name = "Topic" type = "xsd: String" / >
    < xsd: ELEMENT ref = "header" minOccurs = "0" maxOccurs = "unbounded" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "" type = "xsd: String" use = "required" / >
    < / xsd: complexType >
    < xsd:simpleType name = "BodyType" >
    < xsd:restriction base = "XSD: String" / >
    < / xsd:simpleType >
    < xsd: complexType name = 'attachmentType' >
    < xsd:group ref = "attachmentContent" / >
    < xsd: attribute Ref = use "name" = "required" / >
    < / xsd: complexType >
    < xsd:group name = "attachmentContent" >
    < xsd: SEQUENCE >
    < xsd: element name = "MIME type" >
    < xsd: complexType >
    < xsd:attributeGroup ref = "mimeTypeAttributes" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "content" type = "xsd: String" minOccurs = "0" / >
    < / xsd: SEQUENCE >
    < / xsd:group >
    < xsd: attribute name = "name" type = "xsd: String" / >
    < xsd:attributeGroup name = "mimeTypeAttributes" >
    < xsd: attribute name = "type" type = "mimeTopLevelType" use = "required" / >
    "< xsd: attribute name =" subtype "type =" xsd: String "use ="required"/ >".
    < / xsd:attributeGroup >
    < xsd:simpleType name = "mimeTopLevelType" >
    < xsd:restriction base = "XSD: String" >
    < value xsd: Enumeration = "text" / >
    < value xsd: Enumeration = "multipart" / >
    < value xsd: Enumeration = "application" / >
    < value xsd: Enumeration = "message" / >
    < value xsd: Enumeration = "image" / >
    < value xsd: Enumeration = "audio" / >
    < value xsd: Enumeration = "video" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: Schema >



    Someone please choose and help me... Thank you very much in advance.

    Thank you
    Vivek Acharya

    Hi Vivek,

    B2B will use payload in the body to identify the incoming document. If your customer must either send a happy (delimited) text/XML in the body (as well as any attachment he wants to send) in a predefined format that you can configure as identification criteria in the definition of document. That is why I will propose implement it to get confirmation with your partner and then the mutually agreed solution.

    Kind regards
    Anuj

Maybe you are looking for

  • P10 - 304 - no display after wake up

    HelloI sometimes have a display problem with my P10-304. Panel display won't wake upAfter waking up from hibernation or suspend-to-RAM. Blue led power is on, HD and CPU fans are working well. I have preinstalled, xp of origin with v6.4.10.4485 nvidia

  • Can I use iTunes gift cards to buy an app?

    Can I use iTunes gift cards to buy an app?

  • Satellite M300 Toshiba bluetooth does not work

    Hi guys,. Somehow my bluetooth stopped working and the laptop is only 6 months old. It worked fine when I got it. It was already installed in the laptop.Bluetooth icon shows RED color and usually when it has a connection, it is white. I tried to rebo

  • cannot D - L package updates or programs except to "downloads" Win 7

    My resident non MS programs are unable to assimilate updates.  As and when they are accepted, rather than be included in the current program, they are sent to the folder "downloads" in Word format.  They cannot be opened, run or installed, once they

  • Change the background color of the banner in the theme of the APEX 25

    Hi guys,.I'm changing the background color of the banner in the theme of the APEX 25 (in white).Oracle.apex.com: Application Express 4.2.5.00.08Theme/UI: 25. Reactive bluePage template: A level Tabs - no side barUsing Internet Explorer 8I have create