SQL: Finding the LIKE value on the Begining of a Field in a Record

I am looking for find the results using php and MySQL of the
1st 3 characters of a field in a recordset, for instanace the first
three numbers of a zip code. I know that using the like statement
and a % in the front will get me all records that have those
numbers in there (i.e. 074 >>> 07410, 07420, and 10742)
but what I want is only those that START with 074.
Thanks

Sorry I figured it out I had the % in the beginning and it
should have been at the end.

Similar Messages

  • Function Module to find the Begin Date of the Year

    Hi Experts,
    Could you let me know if there is a FM to find the "Begin Date of the Year".
    I appreciate your help.
    Thanks a lot.

    Hi,
    Do you want the Begin date of the <b>current</b> year..Try this..
    DATA: V_DATE TYPE SY-DATUM.
    V_DATE = SY-DATUM.
    V_DATE+4(4) = '0101'.
    WRITE: / 'Beginning date of the year ' , v_date.
    If you are mentioning about the Fiscal year..Then you can use the FM PERIOD_DAY_DETERMINE
    Thanks,
    Naren

  • How to find the Ranges for a field ?

    Hello All,
               Can anyone tell me how to find the ranges for a field.
    <b>1</b>, i.e say I want the Ranges Structure for the field LIFNR.
        The ranges structure for this is "<b>RANGE_LIFNR</b>".
        This I used in my Program since I know it previously.
        But now I want the ranges structure for the field <b>VBELN (Delivery Document).</b>
        I  don't know what is it !!!!!
    <b>2</b>, Is there any procedure to know the ranges structure for a particular field ?
    Regards,
    Deepu.K

    Hi Deepu,
    Using 'Where used list' you can able to find out RANGES tables.
    For VEBLN range table is --> CRM_AC_ASSIGN_VBELN
    If you using a program defined as shown below.
    DATA: r_vbeln type ranges of vbeln.
    The above statement also creates ranges structure in Runtime.
    Procedure finding range table structures
    go to SE37 -> Enter domain or dataelement value
    Go to where used list --> search for 'Structures'
    After getting all structure  --> Click 'SEARCH' butoon in tool bar --> Search for 'RANGES' word
    You can get all ranges tables in the search window
    If helps plz reward points.
    Regards
    Bhupal Reddy

  • HOw to  find the text for PERSK field in infotype 0001

    hi all
    HOw to  find the text for PERSK field in infotype 0001

    Hi
    T503T : contained the similar informative text for PERSK . read this for T503T-PTEXT.
    ..lakhan

  • Change the content of a field for a record in table

    Dear guru ,
    i know that there is chance to change the content of a field for a record in table using SE16 for the table involved and debugging.
    Can you explain me the flow to run this ?
    Thanks.

    >
    CONS  SAP wrote:
    > Dear guru ,
    > i know that there is chance to change the content of a field for a record in table using SE16 for the table involved and debugging.
    > Can you explain me the flow to run this ?
    > Thanks.
    Hi CONS SAP,
    You can use se16n transaction. This is very user friendly trnasaction. You may use it like this:
    1) Start transaction SE16n.
    2) Type the table name and press ENTER.
    3) Type the string "&sap_edit" into the command line and press Enter.
    4) Enter your selection criteria and press F8.
    Now you can easily change/delete/add the lines you want and then save.
    All Changes are recorded in the tables SE16N_CD_DATA and SE16N_CD_KEY.
    But I would request you to keep in mind the suggestions from Vijay Babu Dudla
    >
    Vijay Babu Dudla wrote:
    > if you are trying on some test table then it is ok. but don't update any transactional data like that. it is not good practice.
    >
    Many regards,
    Ravi.

  • URGENT! I cannot find the beginning of my recording

    I recorded an interview under voice and I had to stop the recording at 55 minutes and then start it again about 20 minutes later. I saved it and put my laptop on sleep after the first half. Now I cannot find the very beginning of my interview. All I can see is the second half of my interview which was 31 minutes and the second part of the first half of my interview. Did GB delete it? How do I find the very beginning of my recording?

    How do I prevent from recording on top of the first part of my interview? Can I add a new track within the same folder as the first part of my interview and continue to record the interview where I left off and not record over the first track?
    That is, what I am doing - I always create a second track for the next take. Then I can give the tracks different names.
    Perhaps you had the cycle region enabled? Thenn the recording will begin at the beginneing of the region. Usually the recording should start at the current position of the crosshair.

  • How do i find the total number of fields within all tables in one of my databases

    I'm in the process of creating some "gee whiz" metrics for one of my applications and want to find the total number of columns contained in its database.  Is there a stored procedure to get this information that would save me the effort
    of opening each of my 66 tables and counting the columns?  I also have the same question for my 138 views.  Thank you for any ideas you care to offer...............Phil Hoop
    Phil Hoop

    Hi Phil,
    Assumes SQL 2005 or higher
    Let 's try simple one ....
    SELECT COUNT(col.column_name), col.table_name
    FROM information_schema.columns col
    JOIN information_schema.tables tbl
    ON tbl.table_name = col.table_name
    AND tbl.table_schema = col.table_schema
    AND tbl.table_catalog = col.table_catalog
    AND tbl.table_type = 'VIEW'
    GROUP BY col.table_name
    Let me know if this will help you.
    If you think my suggestion is useful, please rate it as helpful.
    If it has helped you to resolve the problem, please Mark it as Answer.
    Varinder Sandhu www.varindersandhu.in

  • How can i find the tablename for that  field and suggest the report logic

    Hi experts
    The concept of BOM for finished components are defined in terms of semi finished goods. Hence, routing of a component from raw materials can not be seen directly in system through standard report.
    But users need to have the details of a routing of a component from raw material in one report. To provide the details in single report, development is required.
    With this report users can see the routing from raw material till component in one single report.
    Assumption
    BOM is maintained for a component with all related semi finished components till raw material properly.
    Material Number:  MARA – MATNR   - Multiple selection option should be there (Mandatory)
    Plant: AFRU – WERKS      - Single selection parameter (Mandatory)
    If procurement type is E or X, system has to check the routing through CA03.
    If procurement type if F, leave this field as blank
    1.operator
    2.material
    3.material description
    4.workcenter
    5.vendor
    6.operation description
    7.uom
    8.qty
    9.uom
    10.setuptime
    11.processingtime
    12.deliverytime
    using cs12,cs13
      here i have seen the details of finished goods components like semifinished goods,rawmaterils,i tried se11 to find the the table for relevent field,
    i cant get, if possible to suggest me the logic and how to find the relevent table for
    that field
    Regards
    ds

    for exploding the bom if you know header material use
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
    now check PLPO & PLKO table for routing or AFVC and AFVV for routing.
    if production order created you have to check in afvc and afvv else check in plpo and plko.
    for checking with plpo and plko you have to check MAPL table.
    for bom and material link
    MAST,STPO,STKO.
    stlnr is the common field
    regards
    shiba dutta

  • How to find the size of a field

    Can somebody tell how to find the sie of a varchar2 field?
    Thanks.

    SQL> desc global_name
    Name Null? Type
    GLOBAL_NAME VARCHAR2(4000)
    SQL> select global_name from global_name;
    GLOBAL_NAME
    ITFD.XXXXX.CO.XX
    1* select vsize(global_name) from global_name
    SQL> /
    VSIZE(GLOBAL_NAME)
    16

  • Where can I find the user key precedence hierarchy for each record type?

    Example: I want to update contact records through the CRMOD web service API.
    So I'm looking at the "Oracle Web Services On Demand Guide, Version 6.0 (released August 2010)", page 316, and it lists 3 user keys for Contact.wsdl v2.0 in the following order:
    1. FirstName and LastName
    2. Id
    3. ExternalSystemId
    From what I can see, this order does not seem to reflect the precedence hierarchy of these 3 user keys.
    I've send in a test update where I supplied a FN, LN, and EUID, ... and the contact that matched the EUID got updated.
    (I'm glad it did, because EUID really needs to take precedence over FN+LN, otherwise you could never change a contact's last name without knowing the contact's Row Id.)
    Does anyone know where I can find the precedence hierarchy for each record type's user keys (other than doing the obvious and time consuming "try+error")?

    Hi,
    we experienced similar problems with the account object and asked the oracle support about this. This was their answer:
    "[...] thank you for contacting CRM On Demand Customer Care. Regarding your question, please note the below: when perfoming a query, the user key fields are looked for in this order: - Row id - External System Id - AccountName and Location. Basically, the search will be performed by AccountName and Location only when the other fields are missing. This is an expected behavior because, the Row Id is the strongest filter as it is always unique. The external system Id comes second, as it is supposed to be unique in another system."
    So, I guess the order is always
    1) Row Id
    2) External System Id
    3) specific field combinations...
    kind regards
    Kai
    Edited by: Kai Hartmann on 28.04.2011 07:10

  • Class to find the components of a field-symbol

    Hi,
    Can anyone tell any class/function module to get the components of a field-symbol which is like an internal table.
    Thanks.

    Hi,
    I assume your field symbol is generic, it means was declared like
    field-symbols: <fs_tab> type any table.
    Later you assined some intrernal table to it and now you want to get components of structure of that table, right?
    You can use RTTS for this:
    "first create work area for that table
    data: wa_table type ref to data.
    field-symbols: <fs_wa> type any.
    create data wa_table like line of <fs_tab>.
    assign wa_table->* to <fs_wa>.  "<fs_wa> now work like work area for table <fs_tab>
    "now you get the components via RTTS classes
    type-pools: abap.
    data: r_struct type ref to cl_abap_structdescr,
             gt_components type abap_component_tab with header line.
    r_struct ?= cl_abap_typedescr=>DESCRIBE_BY_DATA( <fs_wa> ).
    gt_components = r_struct->GET_COMPONENTS( ). "here gt_components holds components of that table/structure
    Regards
    Marcin

  • How to find the difference of 2 fields in template?

    Hi,
    I am building an rtf template, I have two fields in the template which come from XML extract.
    I need to add one more column to the template which is the differecnce of the 2 columns (column1-column2).
    I don't have this column in the XML extract, I need to calculate this in the template.
    I am quiet new to using XML Publisher.
    Could somebody please tell me, how can I achieve this?
    Thanks in Advance,
    Thiru

    Hi,
    I am able to find the difference by <?(column1tag)-(column2tag)?>.
    But now I want to have the sum of this field at different levels
    <?sum((column1tag)-(column2tag))?> is not working giving some error.
    Could somebody please help me out, how can I achieve sum for this?
    Thanks in Advance,
    Thiru

  • How to find the list of org .field values in sap

    Hi,
    I need a list of org files values .
    example : I want to know ...
    Plant= WERKS,Cost Center=KOSTL.
    similarly I need the list of all org. values.
    what is the table name?
    Thanks in advance
    SR
    Message was edited by:
            sunny raj

    My apologies.....
    I need the list of non org filed values with the description
    example..
    BEGRU     Authorization group
    BSART     Order type
    BWART     Movement type (inventory management)
    I have already down loaded org filed values from USVAR table as Ben said.
    Thanks,
    sr
    null

  • To find the table name using field name

    Hi,
    Do we have any transaction code using field name to find out the table name
    Regards,
    P.Arunkumar.

    Hi Arun,
    The best way to find out table from field is,
    Use SE15 Transaction->dictionary fields ->table fields->goto table field columns
    Enter ur fields..
    or you can use ST05
    Reward points if it is useful
    Regards,
    R.Brahmankar

  • HT1937 how do i find the url link from a video i recorded on my ipod

    I recorded a video on my ipod touch and i have to send it in to the radio station. All they want is the url link but for the life of me i can't find it on my ipod or when i uploaded it to the computer.

    When you connect your iPod to iTunes and select it from the device pane, does it not show the capacity and amount of space being used by music, videos, and apps?
    You do not have to sync your entire library to your iPod, you can selectively control what does and does not sync.
    No device has the exact stated capacity, this is not specific to iPods.  There is always overhead that must be accounted for in the operating system running the device.  Also, every hard drive is unique in it's capacity.... could you imagine the disaster of marketing if every package had to accurately (to the byte) reflect the capacity of the device? 

Maybe you are looking for

  • Nokia E71 Fading Text On Display

    Hello Nokia Owners, Hopefully someone has seen this issue and have an easy fix, as I'm frustrated about this oddball occurrence. I'm wondering if there's a QA/QC issue at hand where these are being manufactured? Within the past 6 days, I've purchased

  • AFTER ALTER ON SCHEMA TRIGGER + all_tab_columns

    Hi everybody, I'm trying to get the column name of any column added to the table "TEST", So I create a trigger to ensure that job. My problem is that the view "all_tab_columns" doesn't contain the column "column_test " yet when the trigger audit_ddl_

  • How To Add InfoObject in the Data Selection Tab of InfoPackages in 2004s

    Hi Y'all! I would like to ask how to add an infoobject in the Data Selection Tab of the InfoPackage in 2004s.  It says its optional, this definintion of selection criteria for the infopackage. My apologies, I don't understand how this is done.  Surel

  • AQ DEQUEUE Stops working in 10.1.2 after restart

    We have many BPEL processes in 10.1.2 thats get kicked off by reading a message from Queue. Whenever we restart server from maintenance or anyother reason. All the enqueued messages are not getting picked up by BPEL. The only workaround for this is t

  • FM to call RFC dynamically

    Experts, I have a set of RFC's which has to be called dynamically. All RFCs have different set of input parameters. Is there any standard FM with which i can call RFCs with variant? similar to what we do for report using submit <progname> with select