How to look into all fields (beginner question)

Hello,
I have a table which contains a series of columns like
'GRPREF00', 'GRPREF01', 'GRPREF02', ... 'GRPREF19'.
If I want to know whether the number 34 is in one of these columns, I use the following command:
Select * from <table_name> where 34 in ('GRPREF00', 'GRPREF01', 'GRPREF02', ... 'GRPREF19');
Obviously I cannot use the "..." and I am writing all the time the whole series of columns.
In order to shorten this command, I have already tried teh following command:
Select * from <table_name> where 34 in (*);
but this didn't work.
Does anybody know whether/how it is possible to define a range of columns to look in or whether/how it is possible to search through all the columns of a table?
Thanks
Dominique

Hello
That was really the gist of the original question. It was to find out if any columns contain 34 rather than any columns named 34. Just as a side note, your query would return 0 rows unless the column name was surrounded by double quotes when it was created:
CREATE TABLE dt_test_col (34 varchar2(10))
CREATE TABLE dt_test_col ("34" varchar2(10))
SELECT COUNT(1) counter
FROM user_tab_columns
WHERE column_name='34'
AND table_name= 'DT_TEST_COL' ;Another option, which is similar to one of the methods the OP tried is:
WITH test_data AS
(     SELECT
          CAST(NULL AS VARCHAR2(2)) AS col1,
          CAST(NULL AS VARCHAR2(2)) AS col2,
          CAST(NULL AS VARCHAR2(2)) AS col3,
          CAST(NULL AS VARCHAR2(2)) AS col4,
          CAST(NULL AS VARCHAR2(2)) AS col5,
          '34' AS col6,
          CAST(NULL AS VARCHAR2(2)) AS col7,
          CAST(NULL AS VARCHAR2(2)) AS col8,
          CAST(NULL AS VARCHAR2(2)) AS col9,
          CAST(NULL AS VARCHAR2(2)) AS col10
     FROM
          dual
SELECT
FROM
     test_data
WHERE
     '34' IN (col1,col2,col3,col4,col5,col6,col7,col8,col9,col10)
This does mean that you have to list all of the columns you want to check in the in statement, but the tradeoff is that you don't end up having to write dynamic sql.
The IN statement will likely be transformed by the optimizer into:
Predicate Information (identified by operation id):
   3 - filter("TEST_DATA"."COL1"='34' OR "TEST_DATA"."COL2"='34' OR
              "TEST_DATA"."COL3"='34' OR "TEST_DATA"."COL4"='34' OR "TEST_DATA"."COL5"='34' OR
              "TEST_DATA"."COL6"='34' OR "TEST_DATA"."COL7"='34' OR "TEST_DATA"."COL8"='34' OR
              "TEST_DATA"."COL9"='34' OR "TEST_DATA"."COL10"='34')Which saves you even more typing! :-)
HTH
David

Similar Messages

  • How do i lock all fields without using the signature function with adobe lifecycle designer 9

    How do i lock all fields without using the signature function with adobe lifecycle designer 9 ...
    I want it to have the same affect as when a signature is used but not use that function. I want a button that says lock all fields. And then you can click it again to unlock all fields...
    Thanks

    Here you go!
    LOCK the form once its SAVEd?

  • How to look into a method?

    Hello all:
    I am wondering if there is a way to look into a method simply by its name? As we all know, we can get the detail description of most of the classes in JAVA by browsing online documentation:
    - API & Language Documentation
    - Java 2 Platform API Specification .
    On the page, there is a left frame listing class names in alphebetical order. By clicking on a particular class name, we can get the description of that class on right frame.
    It's very convenient.
    Therefore, I want to know if there is a way to get the description of methods in the same manner as classes. Is there a webpage which lists most of the methods in JAVA language and its descriptions? So that we can check the detail of a method without knowing which class it belongs to. I think it should be very useful. Because there are times we see a new method name and unfortunately we don't know which class it belongs to. Thus, it is a bit difficult to check the detail of that method because we don't know its class name.
    That is why I am looking for a way to check the detail of a method in the same manner as a class.

    Thanks to you all:
    Yes, I find the index and it works. However, I am just not smart enough to find that search link. Mwstein, can you point to me where can I find that search link? Thanks again for your replies.

  • How to select into a field of my internal table?

    Howdy,
    I have an internal table:
    TYPES: BEGIN OF T_OUTPUT,
            EQUIPMENT         TYPE  EQUI-EQUNR,
            DESCRIPTION       TYPE  EQKT-EQKTX,
            EQUIPMENT_CAT     TYPE  EQUI-EQTYP,
            MASTER_WARRANTY    TYPE  BGMKOBJ-MGANR,
            DELIVERY           TYPE  LIKP-VBELN,
    END OF T_OUTPUT.
    DATA: ITAB_DETAILS TYPE STANDARD TABLE OF T_OUTPUT WITH HEADER LINE.
    Now i'd like to do a slect from LIKP into the field ITAB_DETAILS-delivery, but his code doesn't work?
    SELECT VBELN FROM LIKP INTO table ITAB_details-delivery
             WHERE  VBELN IN S_VBELN
             AND VKORG  = P_VKORG
             AND WERKS  = P_WERKS
             AND ERDAT IN S_ERDAT
             AND LFART IN S_LFART.
    Does anyone know what I am doing wrong?
    I need to keep the name of the field as 'delivery' and I don't want to change its order in the internal table - Otherwise I'd ahve used the 'MOVE CORRESPONDING' command.
    Does anyone have any ideas?
    Thanks!

    STEVE,
    Modified Code:
    Get value for Delivery
       SELECT <b>SINGLE</b> VBELN FROM LIKP
           INTO ITAB_details-delivery
             WHERE  VBELN IN S_VBELN
             AND VKORG  = P_VKORG
             AND WERKS  = P_WERKS
             AND ERDAT IN S_ERDAT
             AND LFART IN S_LFART.
    Insert into Internal Table ASSUMING u have values for
    other fields in the Work Area.
    <b>  append ITAB_DELIVERY.</b>
    Thanks
    Kam

  • How can I Validate all fields of the form and show validation summary?

    Hello,
    I am building a dynamic form with livecycle. I need to implement two fetures:
    1. Show the user all invalid fields of the form when he tries to submit it (show him validation summary) and guide him to correct the errors.
    2. Remove the highlight frame from mandatory fields after user enters his input.
    Thanks a lot in advance,
    Peter.

    Okey once more a try...
    Normally you don't get a list of the fields that didn't pass the validation. So, you have to script the list by yourself!
    If you put the validation script in the exit field that means if the user doesn't enter the field, the script won't be executed.
    You could make an additional script into presave, presubmit, validate or whatever that will force the user to go to the field.
    For example make a field only mandatory if the user doesn't enter anything.
    Way to make mandatory fields that won't be shown if the user had provided response
    if (this.rawValue == null) {
    this.validate.nullTest = "error";
    this.edge.color.value = "255,0,0";
    this.assist.toolTip.value = "This field is mandatory, please provide a response...";
    xfa.layout.relayout();
    else {
    this.validate.nullTest = "disabled";
    this.border.edge.color.value = "255,255,255";
    this.assist.toolTip.value = "This field is optional...";
    xfa.layout.relayout();
    Will JUST get mandatory if the user doesn't provide response. (Is an older script I got here and changed slightly for you.)
    Do the parts in the event that should "fire" them. Probably divide it into two parts with two if statements instead of the else...
    Think good about the event!
    Way to make a list of what things the user has forgotten!
    You can make an invisible TextField that will be shown AND populated if the user tries to submit something invalid.
    Calculate Event of the Textfield:
    this.rawValue = " "
    if (Dezimalfeld1.rawValue == null)
    {this.rawValue = this.rawValue + "*Please enter something into Dezimalfield1, Page1,...                                                    ";}
    if (Dezimalfeld2.rawValue == null)
    {this.rawValue = this.rawValue + "*Please enter something into Dezimalfield1, Page1,...                                                    ";}
    (Of course you've got to name the fields exactly.
    All scripts are JAVASCRIPT!)

  • How do I reset all field on a form? Do I have to go line by line?

    I would like to keep a master version of a fillable form in my Adobe app, but every time I fill it out and export to another application (i.e. Google Drive, Box, DropBox) it saves the filled in version and I have to go line by line to erase the data and create a new form.  Is there a faster way to clear all form fields after exporting the document?

    Unfortunately, yes, that's what you have to do. That is a long-standing feature request.

  • We had a contaminated email and now we cannot send emails . our service provider thinks problem in 'mail' settings but did not want to get into that area. Can you advise how we look into this

    we had a contaminated email and now we cannot send emails.  Our service provider advises that 'Mail' settings may be compromised.  but were not willing to get into resetting.   How can this be fixed ?

    jenfromwa wrote:
    we had a contaminated email and now we cannot send emails.
    Not exactly sure what you mean by contaminated, but there is currently no known e-mail that could impact the Apple Mail application as you have described.
    Without knowing who your e-mail provider is and what type of account (IMAP or POP3) we can't advise you as to what those settings might be.
    One way to fix it would be to delete the account from Apple Mail Preferences->Accounts and add it back.

  • HT5887 Air Drop does not transmit Contact info located in the Notes Section of the Contact.  How does one transfer All Fields of a contact record?

    Transferred a Contact from my iPhone 5S/ios7 to my iPad Air.  Successfully transferred the Contact including all ph numbers, email addresses, and street addresses.   But -- it did NOT transfer all the text in the "Notes" section of the original Contact.  Why?   Some of my Contacts also have a photo in the same Notes Section.  I don't want to sync the devices via the cloud because I just want selected Contacts.  Sharing via email does the same thing - no Notes.  Only way I've found is to Sync with Outlook Contacts on my Windows XP and Windows7 PCs.

    So far it appears Microsoft's Outlook program is the only contact manager capable of "Forwarding" a Contact record that is all inclusive of all the data in the Contact including the Notes data.
    While some may use the Notes field to store "secret or confidential" information...I've used it to store more mundane Notes that are not NOT confidential or sensitive in any way.  Moreover....only want to "Share" (Microsoft calls it "Forward") with my own multiple devices.  The "Notes" data might include a picture, another type of image, a map, a URL, etc.  I and the rest of the MS Windows user world began building Contacts in Outlook so long ago it is not practical to switch to iOS-based personal info management software unless it allows complete conversions or "Sharing" as Apple calls it.
    Microsoft figured this out years ago by allowing the user to choose whether to include Notes or not when "Forwarding" any individual Outlook Contact Record.  It sounds like we need Microsoft Outlook for iOS like we have MS Outlook for MAC.  With thousands of Contacts in MS Outlook 2010 I can't do without the Notes data in my files.  And it isn't practical to use a syncing function when I only need 10-20% of my overall contacts on some of my iOS devices.

  • Looking into macs a few question

    Hey everyone, i'm looking in to buying a mac laptop and i had a few quesitons.
    1. Im an active web designer and i do a lot of graphic designs, so which mac would be best?
    2. are you able to install different web browsers, such as opera, firefox, etc.. because i like to test all of my site in serval browsers.

    With either the MacBook or the MacBook Pro you can use an external monitor. The external monitor on the MacBook can go up to 1920x1200 resolution, but the MacBook Pro can go up to 2560x1600 dual-link DVI, so if you wanted to use the 30-inch widescreen monitors you would need the Pro.
    With Remote Desktop from Microsoft you can open a remote control session to a PC, so you can also test out your web sites on that platform using the Mac as a console:
    http://www.microsoft.com/mac/products/remote-desktop/default.mspx

  • How to enable all fields in DTP Semantic Group....

    Hi
    In BI, for one of my Master Bearing Infoobjects DTP-> Semantic Group is enabled for all fields. But for 2nd master bearing infoobject, only its primary keys are enabled & non-primary keys r disabled in its semantic group. Even both structure have same DTP settings and both have data.
    Could u pls. let me know why is it so & how can i enable all fields in semantic group.
    Thanks...

    Hi Harpal,
    What are your target and source objects?
    Take a look to the following link.
    [http://help.sap.com/saphelp_nw70/helpdata/en/42/fa50e40f501a77e10000000a422035/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/42/fa50e40f501a77e10000000a422035/frameset.htm]
    Choose This graphic is explained in the accompanying text Semantic Groups to specify
    how you want to build the data packages that are read from the source (DataSource or
    InfoProvider). To do this, define key fields. Data records that have the same key
    are combined in a single data package.
    This setting is only relevant for DataStore objects with data fields that are
    overwritten. This setting also defines the key fields for the error stack.
    By defining the key for the error stack, you ensure that the data can
    be updated in the target in the correct order once the incorrect data
    records have been corrected.
    Regards, Federico

  • Cannot insert Chinese character into nvarchar2 field

    I have tested in two environments:
    1. Database Character Set: ZHS16CGB231280
    National Character Set: AL16UTF8
    If the field type of datatable is varchar2 or nvarchar2, the provider can read and write Chinese correctly.
    2. Database Character Set:WE8MSWIN1252
    National Character Set: AL16UTF8
    The provider can not read and write Chinese correctly even the field type of datatable is nvarchar2
    I find that for the second one, both MS .NET Managed Provider for Oracle and Oracle Managed Data Provider cannot read and write NCHAR or NVARCHAR2 fields. The data inserted into these fields become question marks.
    Even if I changed the NLS_LANG registry to SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280, the result is the same.
    For the second situation, only after I change the Database Character Set to ZHS16CGB231280 with ALTER DATABASE CHARACTER SET statement, can I insert Chinese correctly.
    Does any know why I cannot insert Chinese characters into Unicode fields when the Database Character Set is WE8MSWIN1252? Thanks.
    Regards,
    Jason

    Hi Jason,
    First of all, I am not familiar with MS .NET Managed Provider for Oracle or Oracle Managed Data Provider.
    How did you insert these Simplified Chinese characters into the NVARCHAR2 column ? Are they hardcoded as string literals as part of the SQL INSERT statement ? If so, this could be because, all SQL statements are converted into the database character set before they are parsed by the SQL engine; hence these Chinese characters would be lost if your db character set was WE8MSWIN1252 but not when it was ZHS16CGB231280.
    Two workarounds, both involved the removal of hardcoding chinese characters.
    1. Rewrite your string literal using the SQL function UNISTR().
    2. Use bind variables instead of text literals in the SQL.
    Thanks
    Nat

  • All fields same height in repeating frame

    Hi,
    If I have multiple fields inside a repeating frame and all fields and the frame are set to vertically expand, how can I force all fields to be the same height as the highest field so that everything looks equal in height even though there may be less text or no text in some fields?
    Thanks

    Hello!
    If you use expand property to all fields they can't be at same height.
    You mast set the property to fixed and set equal height to all fields on the canvas.

  • Selecting all fields other than a few .

    A table has fields a1,a2 among many others. How do I select all fields from the table minus these two?
    I am looking for something like select *-(a1,a2) from t1 ;                                                                                                                                                                                                                                                                                                                                   

    SET ECHO OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET PAGESIZE 0
    SET TIMING OFF
    SET VERIFY OFF
    SPOOL query.sql
    SELECT 'SELECT ' &#0124; &#0124; column_name
    FROM user_tab_columns
    WHERE table_name = 'T1'
    AND column_name NOT IN ('A1','A2')
    AND column_id =
    (SELECT MIN (column_id)
    FROM user_tab_columns
    WHERE table_name = 'T1'
    AND column_name NOT IN ('A1','A2'));
    SELECT ' , ' &#0124; &#0124; column_name
    FROM user_tab_columns
    WHERE table_name = 'T1'
    AND column_name NOT IN ('A1','A2')
    AND column_id >
    (SELECT MIN (column_id)
    FROM user_tab_columns
    WHERE table_name = 'T1'
    AND column_name NOT IN ('A1','A2'));
    SELECT 'FROM t1;'
    FROM DUAL;
    SPOOL OFF
    START query
    null

  • All fields are not coming in view

    Hi,
    I have created a view with 6 fields but when i am accessing it with SM30 only first 4 fields are showing (key fields) not the last two fields.
    how to display the all fields.
    thanks

    Hi
    May be the problem is you have done a 2 screen table maintenance. First screen in table control will display only the key fields. When you select that row by double clicking you shall be displayed with the other two fields.
    ~ Ranganath

  • How to retrieve ABAP query field metedata using SAP JCO?

    How can I retrieve all field details (such as field name, field description, output length field type) using SAP JCO for an ABAP Query?
    I have query name, user group, query area and infoset name with me.
    Thanks

    Hi,
    Please use the DDIF_FIELDINFO_GET (standard) Function Module to retireve the details which you have mentioned.
    Thanks,
    Arun

Maybe you are looking for