How to get around Ampersand in text field in Select statement

I have an SQL statement I am trying to run in SQL*Plus. In one of my subqueries, I have a select statment in which some of the fields I am trying to pull have an "&" within the text. So, when I try and run the query it returns "Enter value for 35:". I've even tried wildcard characters and it is still not working. If anyone could help me with this, I would appreciate it. Here is a sample of my statement (the subquery is at the bottom of the statement):
select real_case.file_dt, real_case.dscr, pty_cd, first_name, last_name, addr_line1, addr_line2, city, st_cd, zip_cd
from real_case, pty, idnt, ptyaddr s1, addr
where real_case.case_id = pty.case_id
AND pty.idnt_id = idnt.idnt_id
AND pty.case_id = s1.case_id
and pty.seq = s1.seq
and s1.addr_id = addr.addr_id
and (real_case.file_dt >= '01-NOV-06'
and real_case.file_dt <= current_date)
and (real_case.dscr like '79D01-%'
or real_case.dscr like '79C01-%'
or real_case.dscr like '79D02-%')
and (pty.pty_cd like 'DFNDT')
and (s1.ins_dttm in
(select max(s2.ins_dttm) from ptyaddr s2
where s2.case_id = s1.case_id
and s2.seq = s1.seq))
and (real_case.case_id in
(select case_id from ptychrg
where ptychrg.actn_cd IN ('35-41-5-1&35-48-4-1')));Thanks,
Shannon

this?
SQL> set define off
SQL> ed
Wrote file afiedt.buf
  1  with t as
  2    (select 'a&b' col from dual
  3      union all
  4      select 'abc' from dual)
  5   select    * from t
  6*  where col like '%\&%'
  7  /
COL
a&b
or this
SQL> ed
Wrote file afiedt.buf
  1  with t as
  2    (select 'a&b' col from dual
  3      union all
  4      select 'abc' from dual)
  5   select    * from t
  6*  where col like '%'||chr(38)||'%'
SQL> /
COL
a&bjust '%'||chr(38)||'%' will not work.
You nedd either set scan off or set define off
correction
Message was edited by:
devmiral

Similar Messages

  • How to Add/Concatenate to a text field, values selected in a combo box

    I have a combo box form field that allows the user to select a value from a list and click on an Add button. The Add button should add/concatenate the vaue selected to a text field in order to create a list of values selected. I'm not sure how to do this using Javascript in Acrobat? I know I need to add the javascript to the Add button's Mouse Up action. Any help would be greatly appreciated. Thanks!

    Thanks so much - it works!
    >>> "Gilad D (try67)" <[email protected]> 9/25/2013 9:16 AM >>>
    Re: How to Add/Concatenate to a text field, values selected in a combo box created by Gilad D (try67) ( http://forums.adobe.com/people/try67 ) in JavaScript - View the full discussion ( http://forums.adobe.com/message/5712118#5712118 )
    Let's say the text field's name is "Text1", and the combo is called "Combo1". You can then use this code as the MouseUp script of the Add button:
    var f1 = this.getField("Text1");
    var f2 = this.getField("Combo1");
    if (f1.value=="") f1.value = f2.value;
    else f1.value = f1.value + ", " + f2.value;
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5712118#5712118
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5712118#5712118
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5712118#5712118. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in JavaScript by email ( mailto:[email protected].com ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=3286 )
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • SQL query - how to get parameters into a function within a SELECT statement

    Hi,
    I have SQL query roughly as follows
    SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
    FROM...
    WHERE...
    How to get alias "D_NAME" as a valid parameter into FunctionX?

    Hi,
    user8819407 wrote:
    Hi,
    I have SQL query roughly as follows
    SELECT A, B, C, MAX(CASE...) AS "D_NAME", FunctionX(B, C, "D_NAME")
    FROM...
    WHERE...
    How to get alias "D_NAME" as a valid parameter into FunctionX?Either
    (1) repeat the calculation or
    (2) compute it in a sub-query
    Here's an example of (2)
    WITH  got_d_name  AS
        SELECT A, B, C, MAX(CASE...) AS "D_NAME"
        FROM...
        WHERE...
    SELECT  A, B, C, D_NAME, FunctionX (B, C, D_NAME)
    FROM    got_d_name
    ;A column alias (like d_name) can be referenced in the ORDER BY clause of the query where it was defined, but that's the only place in that query where it can be referenced.

  • How to get the sum in BSEG table using select statement

    hai all
    i made the internal tale "itab1" .. i want to get the som  feild of  DMBTR in BSG table my code is here but its not working gave som error massage (Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables.)  plz tel me how should i do it..... i want to get the som of that feild....          
    loop at itab1
         SELECT sum( DMBTR  ) from bseg INTO itab1-DMBTR141_45
             where GJAHR = itab1-GJAHR
             and   BELNR = itab1-BELNR.
    endloop.
    regard
    nawa

    SELECT BELNR GJAHR SHKZG DMBTR
                 from bseg
                 INTO table it_bseg
                 for all entries in itab1
                 where GJAHR = itab1-GJAHR
                   and BELNR = itab1-BELNR.
    loop at it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-dmbtr = it_bseg-dmbtr * ( -1 ).
        ELSE.
          it_bseg-dmbtr = it_bseg-dmbtr.
        ENDIF.
        MODIFY it_bseg.
    endloop.
    loop at it_bseg.
    READ TABLE itab1 with key belnr = it_bseg-belnr
                               gjahr = it_bseg-gjahr.
    if sy-subrc = 0.
    collect it_bseg into it_bseg_amount.
    endif.
    endloop.
    U can use the collect statement
    Regards
    Gopi

  • How to get all values from an interval using select statement

    Hi,
    Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
    something like this:
    select (for x in 1,1024 loop x end loop) from dual
    (this, of course, doesn't work)
    The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
    Thanks in advance for your help,
    Mia.

    For your simple case, with a lower boundary of 1, you can use:
    SELECT rownum
    FROM all_objects
    WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
    SELECT rownum + (50 - 1)
    FROM all_objects
    WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
    TTFN
    John

  • How To Get Around iCloud Terms

    How To Get Around iCloud Terms & Conditions Error After iOS 7 Upgrade
    It is being widely reported that some users are experiencing errors with iCloud after upgrading to iOS 7.  The issue has to do with the iCloud Terms & Conditions which were changed with the new version of iOS.  After upgrading, users are prompted to accept the new iCloud Terms & Conditions but when they attempt to do so they get a “Unable to connect to server” error.  This then disables iCloud on their device

    Hi nene
               in case of invoice without PO, The payment term will be selected from the vendor master data (in View : payment terms transaction in XK03).
    Check payment term in  master data is exist or not.
    the data is in the table LFB1 : Field ZTERM
    Regards
    Wiboon

  • How to get automatically sysdate in a field

    How to get sysdate automatically in a field in ADF

    As provided in the above blog post provided by Branislav,
    use the groovy expressions for defaulting the date using the following expressions is the right & recommended approach:
    Only date: adf.currentDate
    Date with Time: adf.currentDateTime
    see section 3.6.1 in ADF Developer's guide:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcintro.htm#CEGJJJBA
    Thanks,
    Navaneeth

  • How to get google back in search field

    how to get google back in search field of Safari

    Safari 6
    URL address bar and Google search are unified and is called Smart search field.
    When you search with Google "Google search" will appear.
    There is no more a separate Google search field.
    Prior versions of Safari
    Click the "View" menu in the Safari menu bar and select "Customize Toolbar".
    From the dropdown drag the default set into the Toolbar.

  • HT1222 My phone is telling me about a Software Update but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    My phone is telling me about a Software Update 7.1.1 but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    See if this helps:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212

  • Since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    Unfortunately, I have a very similar problem. Since I upgraded to os 5.1 on my new iPhone 4S the reminders screen will not add new reminders or scroll up and down. What's more strange is the screen will still scroll side to side allowing access to the Completed list, and both the Completed list and Date functions work normally so this must be an upgrades glitch.

  • I accepted/installed an update for iMovie and it turns out that this version is not compatible with my graphics card. So now I can no longer open or use iMovie.  Any ideas on how to get around this - how to revert to the previous version.

    I accepted/installed an update for iMovie and it turns out that this version is not compatible with my graphics card. So now I can no longer open or use iMovie.  Any ideas on how to get around this - how to revert to the previous version??

    Look in your Applications folder.  If your system behaved as expected, you should have an iMovie 9.0 folder in your Applications folder.  Apple moved the old version there as even they suspected the new versions was a train wreck.

  • Please help! We got a used Mac Mini and we don't have the former owner's password, so we can't install anything like flash player.  Does anyone know how to get around this?

    Please help! We got a used Mac Mini and we don't have the former owner's password, so we can't install anything like flash player.  Does anyone know how to get around this? I don't know how to wipe the hard drive, and the support online doesn't seem to work.

    As posted previously:
    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    If installing Leopard the process is similar in some respects.  If you wish to begin anew then after selecting the target disk click on the Options button and select the Erase and Install option then click on the OK button.  To install over an existing system do the following:
    How to Perform an Archive and Install
    An Archive and Install will NOT erase your hard drive, but you must have sufficient free space for a second OS X installation which could be from 3-9 GBs depending upon the version of OS X and selected installation options. The free space requirement is over and above normal free space requirements which should be at least 6-10 GBs. Read all the linked references carefully before proceeding.
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger, Leopard or Snow Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • My downloads of iTunes and related software onto my Windows PC fails every time with error message that the software does not have valid signature.  How to get around this problem?

    I have trouble downloading iTunes software and related software like the new ios8 on both my desktop--Windows 7, and my laptop--Windows Vista, because I keep getting error messages saying the software has been deleted because invalid signature.   I have tried download and install and I have tried just download, but neither method works.   So I am stuck with the older software and my new iPad 2 Air isn't connecting because I need ios8 apparently.
    I have an iPhone 5 and a new iPad 2 Air.
    How to get around the Windows problem, please?
    Thank you!

    bump

  • Hi i've just signed up for lightroom and when i go into the develop screen i get a blue screen with a cross through it and it says cant load picture. any idea how to get around this?

    hi i've just signed up for lightroom and when i go into the develop screen i get a blue screen with a cross through it and it says cant load picture. any idea how to get around this?

    I'm having same problem in develop module which is laggy as hell compared to LR5.8
    Library module is fine but develop module is slow as hell....5 seconds to make ANY adjustment.

  • How do i detect am empty text field condition?

    Hi im a newbie with swing. I have a small problem. I have a text field. When user types some text into it i display a pane in the GUI. When the text field is cleared, i need to hide the pane. So basically i need to detect the condition when the text field is empty.
    I tried one approach in which i capture key press event. So when user presses the backspace key to clear the text field, the event is fired. In the keyPress method, i check if text field is empty using getText() method.
    So my keyPressed method is as follows:
    keyPressed()
    if(textField.getText().trim().equals(""))
         // make my pane invisible here
    This does work , however it requires one additional key press before detecting that the text field is empty. For ex if there are 3 letters in the text field, i require to press the backspace key 4 times to hide the pane. I think this is because the key presses event occurs first & is handled & after that the GUI is repainted with the new data.
    Any idea how i can tackle this? Or is there any other way in which i can detect the moment the text field becomes empty?

    Demo:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DocumentListenerExample {
        public static void main(String[] args) {
            final JLabel state = new JLabel();
            final JTextField field = new JTextField(10);
            field.getDocument().addDocumentListener(new DocumentListener(){
                public void insertUpdate(DocumentEvent e) {
                    change();
                public void removeUpdate(DocumentEvent e) {
                    change();
                public void changedUpdate(DocumentEvent e) {
                private void change() {
                    String text = field.getText().trim();
                    state.setText(text.length()==0 ? "empty field" : "non-empty field");
            JPanel cp = new JPanel(new GridLayout(1,2,8,8));
            cp.setBorder(BorderFactory.createEmptyBorder(8,8,8,8));
            cp.add(field);
            cp.add(state);
            field.setText("enter your text here");
            JFrame f = new JFrame("DocumentListenerExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(cp);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

Maybe you are looking for