How to use a stringfield as relational operator?

Hello

I try to use a stringfield as a relational operator. What I have:

ID STR01 STR02 STR03 AMOUNT
1AG< =.30000
2AG>30000

I want to get the ID of the line where ' if registered between STR01 and STR02 and 45000 is more then 30000 where I want to use the value in STR03 as relational operator in the SQL statement. So in this case the result should be ID 2.

The SQL should look like

SELECT ID FROM T WHERE has ' > = STR01 and had ' < = STRO02 AND 45000 STR03 AMOUNT

the stringvalue in STR03 is used as relational operator to determine whether the 45000 is lower or equal to 30000 (ID 1) or if 45000 is superior to 30000 (ID2).

Does anyone has an idea to solve my problem?

Concerning

Carsten

You can do this with a CASE statement in the WHERE clause, for example

WITH data AS (
  SELECT 1 AS id, 'A' AS str01, 'G' AS str02, '<=' AS str03, 30000 AS amount FROM DUAL
  UNION ALL
  SELECT 2 AS id, 'A' AS str01, 'G' AS str02, '>' AS str03, 30000 AS amount FROM DUAL
)
SELECT id
FROM   data
WHERE  'D' >= str01
AND    'D' <= str02
AND   (
       45000 <= CASE WHEN str03 = '<=' THEN amount END
  OR   45000 >  CASE WHEN str03 = '>' THEN amount END
);

Tags: Database

Similar Questions

  • How to use Labview "" buttons"" in the operation of the program?

    I try to use the ok button to run the program adds to the value of the cluster X Y (millemetre) [which is the operation of machine vision] with value X Y offset [which i will to enter myself] but... I don't ' know how it does do, now I try to use the structure of the event, but it does not work

    Please give me some advice please... by the way I've got to do this thing made by 3 days because of my calendar... thank you

    This software is also to locate the orientation for robot to cling to the object using the CCD camera

    Place the structure of the event within a while loop. Take a look at some of the examples provided with LV, for sure, they show it.

    Then, use the change event of value for the ok button (square button of the terminal that fram for the locking behavior set correctly).

    You can pass the data of XY to the loop to output in the same framework of the event to read the moment you press the ok button.

    Felix

  • How to use as operator for several values

    Hi all

    I want to obtain the column values for the column - filed_name which ends by ('X 1', 'X 2' 'X 3' 'X 4' 'X 5' 'X 0' 'XA' 'XB' "XM" "XP" 'X' "CM" "MT") of the variable_info table


    I tried to use as shown below

    SELECT * FROM VARIABLE_INFO WHERE FieldName like (' %x 1 "," %X 0 ");

    but getting error
    ORA-00907: lack of right parenthesis

    can someone tell me how to use as operator for multiple values?

    Thank you/kumar

    You need not a subquery, just make sure that you use parentheses to group your GOLD requirements

    SELECT RELATION ,
    FIELD_NAME ,
    ATTRIBUTE ,
    FIELD_DESCRIPTION,
    SOURCE
    FROM VARIABLE_INFO
    WHERE RELATION NOT IN ( 'CHAI',  'ITAB', 'ITB2', 'ITB3', 'MINI', 'NOTE', 'MINC', 'FINI', 'FTIM', 'FWTG', 'FMLY', 'FMIS', 'FSUM', 'MEMB' ,'FINC', 'FASO')
    AND (SUBSTR(FIELD_NAME,-2) in ('X1', 'X2' ,'X3', 'X4', 'X5', 'X0', 'XA', 'XB', 'XM' ,'XP' ,'CM','MT')
      OR substr(FIELD_NAME,-1) in ('X')
      OR substr(FIELD_NAME,1) in ('J')
      )
    AND (ATTRIBUTE LIKE 'NUM%' OR ATTRIBUTE = '-') ;
    

    The error you are getting sounds like a problem with the definition of VARIABLE_INFO. It seems the synonym or something that it points to rear edge

    For example:

    CREATE SYNONYM X FOR DUAL;
    CREATE SYNONYM Y FOR X;
    CREATE OR REPLACE SYNONYM X FOR Y;
    SELECT * FROM Y;
    
    SQL Error: ORA-01775: looping chain of synonyms
    

    Kind regards
    Bob

  • I tried to update the drivers that I used my motherboard Asus drive and some how it changes some firmware on the operating system

    OK, my problem is that I don't have a PC before generation. It is a custom build. A week ago while I was trying to update the drivers, I used my motherboard Asus drive and some how it changes some firmware on the operating system. now that is fixed. and now, just yesterday I downloaded the Windows Essentrils to win mail. This morning I woke up and started my PC and I get a red screen saying that some unauthorized to the firmware change has been done to solve this problem, I think I have to erase my hard drive and re to stall my win 7. and how do I do with the disc because it is a refurbished lic. Windows Essentials

    Yes

    Boot from the Windows 7 DVD

    Click Install now

    Accept the license agreement

    When the option is displayed to select a type of installation, click (Custom advanced)

    Click on drive Options

    Select the disc/s click on Delete

    Click new

    Click on apply

    Click OK

    Click Format, and then click next to proceed with the installation

  • How to use between operator in Disqualification without using the script processor?

    Hello Experts,

    How to use between operator in Disqualification? for example phonenumberLength between 7 and 10. I don't want to use the script processor? Also how to reproduce the SWITCH statement Disqualification CASE?

    Thank you

    Konate

    1 Add a processor 'check the length.

    2. connect the transformer and open the configuration dialog box

    3. in the tab 'Attributes' select your attribute of telephone number as the "field Check.

    4. in the tab "Options", enter "7-15"in the option 'number of valid characters.

    5. run the process.

    a. accounts with [included] a character length 7-15 phone numbers out of the release of "valid".

    b. records with a length of character <7 or="">15 phone numbers out of the release of "Invalid character count.

    Note: the processor also adds a 'LengthValid' flag attribute which you may also branch on [with the values "Y" and "NC" for both scenarios above]. See Library of processor of the online help for more information.

    Thank you

    Nick

  • How to use 'not like' operator in BI Publisher

    We build a report using BI publisher and need to put a check where you should see only the lines where the code does not start with S. We are aware of the starts - with operator in BI publisher, but when we try to use it with no, BI publisher generates an error. Can you please let us know how to use the not operator with "starts - with" or "contains" bi publisher?

    Also how to use 'not like' operator in BI Publisher?

    Any help will be really appreciated.

    Thank you

    You can use

    not(starts-with(ELEMENT_NAME, 'A')
    
  • How to use 'LIKE' operator/substr/instr with if condition?

    Hello

    How to use 'LIKE' operator/substr/instr with if condition?

    I can use the following function:
    <? xdofx:InStr('ssStatus','Open',1) = '0'? >
    which returns true or false depending on ssStatus as Open *.

    But when I try to use <? If: xdofx:instr('ssStatus','Open',1) = '0'? > calculating <? end if? >

    It gives an error.

    Any suggestion? OR a solution?
    Thank you.

    Published by: user12427117 on March 10, 2011 20:42

    Published by: user12427117 on March 10, 2011 20:46

    You can try to use

    0? >

    Use contains to AS

  • Error 734: PPP link control has been terminated... always show upward when I try to connect to the internet... How do I solve this problem... I m using win 7 as my operating system.

    • I want to connect Internet usiang dial-up access. I m using nok * a modem n81as and telkoms * l as the map. When I m trying to connect it always failed and an error appeared and said: "Error 734: the PPP link control has been terminated. and I m using Windows 7 as my operating system. Please help me solve this problem.thanks a lot...

    the 734 error can be solved by adding a piece of code...

    On your laptop, open the list of devices and dpouble click on the unit matched BB... Select material and double click on blue tooth modem... Select advanced in the additional parameter, place the following code:

    + cgdcont = 1, "IP", "bb.telus.com"

    I'm on telus and by using a bold 9700... to determine the URL above, you BB select Option > Advanced Options > TCP/IP

    APN:BB. TELUS.com... in the code snippet above replace bb.telus.com by all that is not in your apn...

    try to connect

  • HP Pavilion dv6-6135dx Enterta: how to use the recovery discs

    I have a HP Pavilion dv6-6135dx Entertainment Notebook PC laptop with Windows 7 Home Premium 64-bit Service Pack 1. All Windows updates have been installed. I did a scan for sfc.exe. Empty folder of Pendingrenames then the scan has begun with this empty folder. Once the scan has been done there 2 156 files in the folder Pendingrenames put by sfc.exe.

    The CBS.log log shows more than 2500 pages of problems reported by sfc.exe/scannow. It's huge to be listed here. Most seem to be related to the 'stores' relative to the updates of Windows that have been downloaded in the past months. Looks like there are about 6 500 system files corrupted reported and not of miracle.  I think that "WinDoze" people don't like me not with nearly 90% of the corrupt files were caused by the downloaded Windows updates.

    The newspaper says in 95% of the problems, he was unable to remedy. I don't have a Windows 7 installation DVD because my OS is an OEM installation so I can't perform a "repair Windows". My only recourse seems to use my HP recovery disks. There are 3 DVD, numbers 1 and 2 seems to be the recovery of the DVD and number 3 seems to be a kind of supplement, possibly having to with Windows 7 Home Premium 64-bit Service Pack 1.  Don't know what the 3rd DVD or how to use it. Any suggestions what it is and how to install it would be greatly appreciated.

    Someone at - it suggestions as what I can do, in addition to a full recovery. My restore points do not go back too far that when these Windows updates have been downloaded and installed.

    Is there a list of the Windows updates & Windows somewhere that should not be loaded with this operating system? I plan to install all updates "critical", "largest". I might just give up those optional. I downloaded and tried the update Rediness tool (SURT) system which was a complete exercise in futility. Just made me more the corrupted system files.

    Would appreciate any help that I can use with this. I look forward to a full recovery, since it will take me several hours to reinstall all my programs.

    Skip

    Your system is a State that you have no choice.

  • How to use Apple time machine to back up multiple pc, I have an ipad, hp (WINDOWS 7, AND the door of ENTRY WITH XP

    How to use Apple time machine to back up multiple pc, I have an ipad, hp (WINDOWS 7, AND the door of ENTRY WITH XP

    Hi David,

    Time Machine is a backup utility in built for the Mac operating system that works with your Mac and a (sold separately) external hard drive or Time Capsule airport. You can go through the article to get the idea of base on the application.

    The basics of the Mac: Time Machine

    http://support.Apple.com/kb/ht1427

    You can go through the items in the link for your reference.

    Time Machine

    http://www.Apple.com/in/support/TimeMachine/

    I suggest you to contact the Apple support forums for help on the issue.

    https://discussions.Apple.com/index.jspa

    Do not hesitate to contact us for any information related to Windows.

  • I downloaded Adobe filter but I don't know how to use it

    I asked for information on the web a blocker and was brought to Adobe filter. I downloaded it but there were no indications on how to use it for my children. Where can I learn to use it? I use the Windows XP operating system. I downloaded adobefilter.com

    BlueCoat K9 is a free access: http://www1.k9webprotection.com/

  • How to use the utility to update (uefi) BIOS HP

    Notebook: G62 a10em

    I downloaded the BIOS update tool from http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4063 & lc = on & cc = us & dlc = in & sw_lang = & product = 4226...

    and it is installed on my USB key.

    Now, how can I update my bios?

    The USB key contains now:

    BIOS

    | - Current (empty folder)

    | - New (empty folder)

    | - Previous (empty folder)

    BIOSUpdate

    -CryptRSA.efi

    -CryptRSA32.efi

    -HpBiosUpdate.efi

    -HpBiosUpdate.s09

    -HpBiosUpdate.sig

    -HpBiosUpdate32.efi

    -HpBiosUpdate32.s09

    -HpBiosUpdate32.sig

    my current version of bios is f. 08

    I did a cut above.

    After looking at the appropriate file you downloaded, it says this:

    "Prerequisites .
    -Microsoft .NET 2.0 is required. UEFI and Custom Imaging - the HP BIOS update must be run from a FAT or FAT32, partition with a volume of the "HP_TOOLS" name This Installer gives you the option to install on the hard disk (HDD) or USB. If you install on the HARD disk and the HP_TOOLS partition is not present, Setup prompts to create the HP_TOOLS partition. If you install on a USB key, Setup renames the partition on the USB in HP_TOOLS. If you use a custom image, you can create the HP_TOOLS partition manually with the type FAT32 and that the volume HP_TOOLS name. ATTENTION:-the UEFI system partition is not protected and can be removed. -Backup of the computer by using the complete PC Backup feature of Microsoft Windows Vista does not save the UEFI system partition. For these reasons, HP recommends that you place no additional data on the UEFI system partition. Because the partition is not backed up, corruption or failure of the partition will result in the loss of all data on the partition, as well as the loss of UEFI functionality. "For more information, visit: www.hp.com/go/techcenter/startup"

    There is little documentation on how to use it, but a Member here figured it out.

    http://h30434.www3.HP.com/T5/operating-systems-and-software/envy-14-system-recovery-doesn-t-work-with-latest-BIOS/m-p/328684/highlight/false#M45165

    using Windows 7:
    Just plug in the USB key and then run the SPnnnnn.exe BIOS file downloaded from the Web site drivers HP.
    Assuming that the USB is configured correctly (see below), Setup the BIOS sees the HP_TOOLS partition on the USB, copy of the BIOS and its file signature on the USB key, then run Setup winflash. The system BIOS detects the USB and the partition HP_TOOLS and the BIOS is magically updated.
    I put in place a new USB key as follows:
    1 rename the partition HP_TOOLS from the hard drive to something different like HP_TOOLSbak
    2. Plug the USB
    3. Download and run the utility to update the BIOS (not the BIOS, still) drivers HP support page.
    4. Select the option to install to a USB
    5. Select the option to create the partition HP_TOOLS
    6. The reader should now be formatted as HP_TOOLS with a record of Hewlett-Packard containing BIOS and BIOSUpdate records. The BIOS folder contains empty current, news and previous records.
    7 download and run the HP System Diagnostics (UEFI) MS drivers HP support page
    8. Select the option to install on a USB key. This will create a SystemDiags folder under the Hewlett-Packard folder
    9. Download and run the HP Notebook System BIOS update for the HP support page drivers, given that the USB is correctly tagged it will install the update of the bios on the USB drive
    10, we have to end up with a HP_TOOLS partition on the USB drive identical to the one that you removed from the hard drive.
    Once you have configured the USB drive, you can upgrade to other versions of BIOS (most recent or oldest) using this drive, as I mentioned above: just plug in the USB and then download and run the BIOS Setup program.

    Having said that I'm not sure of what you do, once you boot the USB drive.

    .

  • Satellite L450-12W - how to use the folder HDDrecovery?

    Hello

    I need to get this L450, but its owner did not get it back dvd.

    The system does not start, and he said:
    + BOOTMGR is missing.
    Press ctrl + alt + delete to restart +.

    I noticed the hard drive of 320 is divided into three partitions:
    first of all, hidden, SYSTEM, 400MiB, with the diag + flag +, and there's the Startup Manager (+ bootmgr, BOOTSECT. BAK+ and the folder + start +) and a folder called recovery + where there is a subfolder called + WindowsRE + which contains + winRE.wim +.
    second is WINDOWS, 149GiB, with the flag + start +; This is the operating system.
    in third place is given, 148GiB, no flag. Here's a folder called HDDRecovery size 6.4GiB and a folder called + MONICA-TOSH + where there are a lot of backups that I don't know how to use.

    Then, I tried to follow the manual, which know to press the 0 (zero) key when starting to start the recovery from the hard disk, but it did not work, no screen appears and the error message appears again.

    What should I do?

    Thanks, and sorry for my English, I'm Italian.

    EDIT: I forgot to say that I also tried to fix the problem with the Windows7 DVD repair tools, but he did not find any operating system with a Linux Live, I see that all the system files are in the WINDOWS partition!

    Hey Buddy,

    The HDDrecovery usable only if you are able to access the Windows Advanced Boot menu. There is an option called fix my computer which will start the Toshiba HDDrecovery.
    I put t know what the user manual you have, but AFAIK press zero will not work. You must press the F8 key to access the advanced boot menu.
    It work?

    If not, there is nothing you can do I think wait Toshiba Recovery disk Windows reinstallation. This will restore the preinstalled settings of Toshiba. If you n t have this disc, you can order it here:
    https://backupmedia.Toshiba.EU/landing.aspx

    Alternative you can use a Microsoft Windows disk to reinstall Windows. After that, you have all the drivers and tools from Toshiba Web site.

  • How to use product recovery CD-rom?

    How to use product recovery cd-rom on the satellite A40 range?

    Hi Daniel,.

    To use the recovery CD, simply insert the first CD (assuming there are two) in the CD drive and then just turn on your laptop while pressing the 'C' key on the keyboard. This will cause the laptop to load a minimal operating system on the CD that will start the process of recovery of the product.

    You should also be an initial menu that asks you if you want to do a complete system restore or restore 'Expert'. The full restore will delete all of your 'C' drive and will then install the entire system (excluding all the extras you'll have to install afterwards). The recovery of 'Expert' will allow you to partition your hard drive before you install the operating system in the C"" drive.

    Kind regards

  • Satellite M300 - how to use the recovery disk creator?

    Satellite M300

    How to use Recovery Disc Creator and what is the main function of Recovery Disc Creator?

    Hello

    I guess you didn't read the manual again because it explains quite well what is the recovery disk creator.

    However, this tool creates the Toshiba restore disk. This disc contains a picture of the factory settings. This means that the Windows operating system that is pre-installed with all the drivers and tools of Toshiba. It of easy to use (just boot from the disc), simply follow the instructions on the screen.

    For example, if you install another Windows or Windows peut t start you can use this disk to recover a system that works.

Maybe you are looking for

  • How to print from an iPad Pro on a wired network printer?

    We have new iPads for our busines. They are Pros iPad on iOS 9.3.4. It would be a great help if we could get them to print on our WIRED network printer. The iPads are on LTE

  • No Spanish language

    My Alcatel 6015 X (ffos 1.3.0.0) have no Spanish language in the language menu. English, Russian, French, Romanian (why?) How can I solve this problem? I need Spanish keyboard and menu.

  • Equium A200-1V0 - freezes after plug power supply AC?

    Hi all I'm trying to find the solution of the problem: My laptop Equium A200 1V0 freezes as soon as I plug the power running. I tried the new battery and new AC adapter after reading some solutions of the internet but so far without success. It works

  • HP DVD RAM GH 82N

    My PC comes with a HP DVD RAM GH 82N. I want to burn CD / DVD. Is there a tutorial of what I need to know and do. I think I need to create a file of documents on the original CD and then put a blank disc in the drawer and close it. Am I warm up or is

  • How to remove virus from my book mac 2014 air

    I'm getting this pop up in safari and chrome, and also message call saying this number to remove the virus and shows a link for mac cleaner. How can I remove the virus air book of my mac? Thank you.