Combine to fields

Hi all,
I would like to know how i can combine two fields into one without leaving a gap in between. for example
VendId
W0031 01
s0051  02
I would  like for the gap in between to disappear and show like this
VendId
W003101
s005102
Below is the query i am working on.
thanks
SELECT DISTINCT (v.vendor || r.addrnum ) "VendId",v.vendor "Vendor Id", v.vnamel "Vendor Name",
                r.aaddr1 address, r.acity city, r.astate state,
                r.azipcode "Zip Code", r.aphone "Phone Number",
                TO_CHAR ((MAX (p.datepur)),
                         'YYYY-MM-DD'
                        ) AS "Plan Purchase Date"
           FROM vendor v, vendaddr r, planhold p
          WHERE v.vendor = r.vendor
            AND p.vendor = r.vendor
            AND (p.datepur >= TO_DATE ('2002-01-01', 'YYYY-MM-DD'))
            AND v.vobsolet = 'N'
       GROUP BY v.vendor,
                r.addrnum,
                v.vnamel,
                r.aaddr1,
                r.acity,
                r.astate,
                r.azipcode,
                r.aphone
       ORDER BY v.vnamel

combine? You already combining fields:
v.vendor || r.addrnum

Similar Messages

  • Please Help: Problem - Combining database fields in a text object

    Hello
    Thank you for viewing my thread and any helpful feedback you may provide. I am having trouble with the "Combining database fields in a text object" tutorial in the Help under: Quick Start\Quick Start for new users\Combining database fields in a text object.
    After following the steps and previewing, I see the last name, first name stacked on top of each other in preview and design view. I don't know why this is happening. Can anyone point me in the right direction so the text is displayed the same way as it is in the Help?
    Thanks
    M

    Hi, 
    I don't think the field is actually in the text object but just stacked on top of it. 
    When you double-click on the text object, you the cursor should be inside it now.  Is the database field in there?  If not, then you can drag and drop it into the text object where you want it to go. 
    You will know if it's going in because the edit cursor will show you where in the text object it will drop. 
    The other way to do it is to drop the database field on the report somewhere and copy it to the clipboard and paste it into the text object. 
    Good luck,
    Brian

  • Formula to combine multiple fields on one column

    Hi All,
    How do you create a formula in the formula editor that allows you combine several fields onto one column. An example: if I wanted to combine a street address onto one column when it is several fields in the data base. I know I need to seriously work on my coding, because it probbably is not that difficult. I've tried slect statementw with Case True and different If then else statements, but I am not getting all of value to return.
    Regards-

    Hi Kyle,
    To avoid null values you need to convert "Default values for nulls" in the formula editor.
    Edit your formula
    {database.field1} + " " + {database.field2} + " " + {database.field3}
    and in formula editor at the top you can see a dropdown list with "Exception for nulls" change this and select "Default values for nulls"
    Now you can avoid the nulss in output
    Regards,
    Raghavendra

  • How to combine +two fields without submitting page (via AJAX/HTMLDB_Get)?

    Hi all,
    After my last contribution "Request for Scott Spendolini" I was able to create the scripts to update fields in forms without having to refresh the page. Thanks again to Scott, Carl and the others who helped me solving my problem.
    I have another question regarding this however. How do I combine two (or more) values on a form to fill a field with the values, for instance to create a unique Primary-key field?
    This is the example: combine the postcode and the house-number (and maybe an extension to the housenumber) in one field 'adrescode'. This uniquely identifies an adress in the Netherlands. I can 'get' the postcode to fill the first part of the adrescode, but how do I modify the scripts to 'get' the housenumber (huisnummer) and - if not left null - the extension to the housenumber?
    Here are the scripts I created to far:
    in the region source of the page I have the following Javascript:
    <script language="JavaScript1.1" type="text/javascript">
    function f_P52_getAdrescode ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=P52_getAdrescode',0);
    get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P52_ADRESCODE').value = gReturn  }
    else
    {  html_GetElement('P52_ADRESCODE').value = 'null'  }
    get = null;
    </script>
    and in the shared components of the application I have created an process P52_getAdrescode as follows:
    declare
      l_adrescode varchar2(16);
    begin
        l_adrescode := :P52_POSTCODE || :P52_HUISNR ;
        if :P52_HUISNRTOEVOEGING is null then
              NULL ;
        else
              l_adrescode := l_adrescode ||':'||:P52_HUISNRTOEVOEGING ;
        end if ;
        htp.prn(l_adrescode);
    -- dbms_output.put_line(l_adrescode);
    end;
    I ran this PL/SQL in the SQL-section of HTMLDB and it does what a expect: combine the values in a new string.
    In my page however, it only gets the value of postcode and puts this into the adrescode field.
    So my question is: how do I modify the Javascript (I Guess) so that also the fields 'huisnummer' and 'huisnummertoevoeging' end up in the adrescode field?
    Thanks for your help,
    Jan.

    Carl, Scott,
    I have two pages with exact the same fields and codings (as described before in this Post.
    I now have two different named functions and application processes, a javascript an process for each page. They both do the same thing, use the same code except for the page-number (:P52_ and :P92). I tried to make one process to replace both, but ran into problems when I changed the name in the get.add statement.
    Changing the get.add from: get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value) to: get.add('POSTCODE',html_GetElement('P52_POSTCODE').value) always ends up in what looks like a complete html-(source)dump of the page in the field that has to be updated. Even when I replace the :P52_POSTCODE in the application process as well Changing back the application process and the javascript to so that both javascript and process use the :P52_ again and the function returns the correct value again. What am I doing wrong?
    I requested an online-workspace to post the application to it, but have no answer to my request yet, so I can't provide a working example at the moment....
    Thanks for your help again,
    Jan.

  • Which apprach is better to to introduce an ID field or combine other fields

    I have the following problems when i am designing my database for an online exam system:-
    1.     I have a question table and answer table; where each question contains many answers and each answer have one question.
    Now i have two approaches for designing the answer table, either by having:-
    Answer_Id (PK),
    Answer_Description,
    Is_right.
    Question_ID (FK)
    Or
    Answer_description
    Is_right.
    Question_ID (FK)
    Having PK (Question_ID & Answer_description).
    2.     Same issue applies for this scenario; I have an article table and a comment table, where each article can have many comments and each comment can belong to an article.
    Now i have two approaches for designing comment table, either by having:-
    Comment_ID (PK)
    article_ID (FK)
    Comment_Desc
    Created_BY
    Created_time
    Or
    article_ID (FK)
    Comment_Desc
    Created_BY
    Created_time
    Having PK(Created_BY & Created_Date), since it s not possible to be able provide two comment at the same time!by the same user!!
    So is it better to introduce the ID field for both (comment & answers) tables or having my PK by combining the available columns
    Thanks in advance for any help.

    Re: creating different tables that represets different question types
    Re: Implementing a varchar multi-valued attribute for my customer table
    How many more variations do you plan on posting?

  • Order Combination indicator field setting on Customer Master create

    When creating a new customer master record it is auto populating the Order Combination flag on the Sales Data --> Shipping tab.  Where can this setting be "turned off" so it does not auto populate as checked?

    Dear Vicky,
    Menu Path:1
    IMG  &#61664; FINANCIAL ACCOUNTING&#61664; ACCOUNT RECEIVABLE AND ACCOUNT PAYABLE&#61664; CUSTOMER ACCOUNTS&#61664; MASTER DATA&#61664; PREPARATIONS FOR CREATING CUSTOMER MASTER DATA&#61664; DEFINE ACCOUNT GROUPS WITH SCREEN LAYOUT
    Or  
    Menu Path:2
    IMG&#61664; LOGISTICS GENERAL&#61664; BUSINESS PARTNER&#61664; CUSTOMERS&#61664;CONTROL&#61664; DEFINE ACCOUNT GROUPS  AND FIELD SELECTION FOR CUSTOMERS
    Or
    Goto Transaction OBD2
    There you select your account group then, PRESS F2 , it will take you to Change view
    "customer account group” Details screen, there you double click on the sales area data
    which is available under field status tab, system will take you to Maintain Field status: Overview
    screen, there you double click on the Shipping then it will take you to Maintain Field status:
    shipping screen , there you will find field "Order combination" you put that field in the
    Suppress status, you requirement will get solved.
    Reward points please if it is useful
    Chandramohan

  • Combining table fields

    Hi,
    I'm mysql, PHP and DW
    I have a table named 'people' made of three columns, id , first_name and last_name.
    I need to run a sql sentence where i get the id field as it is and the other 2 fields combined together as fullname.
    i tried this as a recordset in DW5 but i got an error message:
    Select people.id, people.first_name&' '& people.last_name As fullname
    from poeple,
    thanks for help
    Joe

    SELECT id, CONCAT(first_name, ' ', last_name) As fullname FROM people
    The correct term is concatenate, not combine. That's probably why you didn't find anything by searching.
    http://www.google.com/search?q=concatenate+sql+table+fields

  • Combine database fields as parameter

    Post Author: teddybear
    CA Forum: General
    I am building a financial report. Among other, the user want to select the report based on financial year and period. For example, from 2006 period 6 to 2007 period 2.
    If I am going to use normal parameter, then records that having year equal to 2006 or 2007 AND period 2 to 6 will be selected. This is not right. Example, record with year 2006 and period 2 will be selected.
    My question, how can I create a parameter with combine field.

    Post Author: nscheaff
    CA Forum: Data Connectivity and SQL
    In the following SQL statement the Database is parameterized...select * from {?Database}.dbo.YourTable This works using and ODBC connection against a Microsoft SQL Server 2000 database.Is that what you are looking for?

  • Combine metadata fields for a caption?

    In Aperture 3.2.2 is it posible to create a field in the metadata view which combines data from more than one field?  I want an easy way to cut and paste basic EXIF data to use in a photo caption, without having to copy data from each field seperately.  For example, I'd like all my captions in a blog or a book to contain Camera Model, Lens, Shutter Speed, Aperture, Exposure Comp., and ISO.  Can I get all of that data automatically inserted into one field which I can then copy from?  Hopefully the question makes sense.
    Thanks in advance.

    Thanks for the quick answers.  I want have a caption whcih I can paste under each each photo in a book or blog which looks something like this: "Nikon D300s, Nikkor 70-200mm f.2.8, 1/640sec @ f.4.8 (-0.33ev), ISO 400".  At the moment I have to type that out each time.  I was hoping I could create a field in the metadata similar to a database field which combines data from other fields.  The outcome would be that I could just cut and paste the data from a single field, and it would always follow the same format, etc.  Looks impossible?

  • Query: How can I combine several fields to one field

    I have this Query:
    SELECT T0.[Cardname], T1.[Street], T1.[ZipCode], T1.[City], T1.[Country] FROM OCRD T0  INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode WHERE T0.[CardName] Like '%[%0]%'
    I have two questions on it:
    1)   Now I get two lines with the same results because each BusinessPartner has a billing-address and a shipment-address. How can I get one result with only the shipment-address fields.
    2)   When I run this query as a Formatted Search on an addressfield I only get the first field (= CardName) in the Addressfield. How can I get Cardname, Street, Zipcode, City and Country in ONE field (ic Address2)?

    Answer -1
    T1.AdresType = 'S' for ship to address
    T1.AdresType = 'B' for bill to address
    SELECT T0.Cardname, T1.Street, T1.ZipCode, T1.City, T1.Country FROM OCRD T0 INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode WHERE T0.CardName Like '%%[%0]%' AND T1.AdresType = 'S'
    Answer-2
    Modify this query
    Select T1.Address + Char(12) + T1.ZipCode + Char(12) + T1.Street + Char(12) + T1.Block +Char(12) + T1.City + Char(12) + T1.County + Char(12) + T1.ZipCode
    FROM CRD1 T1 INNER JOIN OCRD T0 ON T0.CardCode = T1.CardCode
    Where T1.AdresType='S'
    Hope this solves problem.
    Edited by: Jeyakanthan A on May 28, 2009 1:45 PM

  • Combining 2 fields

    I have a need to total on 2 fields. THere is a sort of main fields and subfield. There is a need for a total of the main field and then each time the subfield changes, put a total of the subfield. I am having trouble getting this to work.

    Hi
    Yes, now I understood what exactly you are looking for :
    Do the following :
    --Create a gorup on Continent
    --Create second group on City
    Now create the following formulas :
    On City group header place the below formula
    Whileprintingrecords;
    numbervar x:=0;
    on the Detail line place the below formula
    Whileprintingrecords;
    numbervar x;
    numbervar y;
    x:=x+1;
    y:=y+1;
    On City group footer place this formula
    Whileprintingrecords;
    numbervar x;
    On Continent group footer place the below formula
    Whileprintingrecords;
    numbervar y;
    Thanks,
    Sastry

  • Combining 3 fields

    Dear Friends
    I am using 3 fields : firstname - middle name - last name.
    I want to join all these three fields together truncting the space. and store in the 4th field as username.
    Please suggest a command.
    sandy

    Lokanath Giri wrote:
    Do you find any diff. between my blog & Ammad Ahmed blog???Of course there is difference see the space added between each field by using the ' ' single quotes which is being asked in last post and also if the issue is to remove spaces then no need to mention as i did not the trim function will do automatically.
    see the difference also.
    Your
    :block.field1 := RTIM((LTRIM(:firstname,' '),' ')|| RTIM((LTRIM(:middle name,' '),' ') ||RTIM((LTRIM(:last name,' '),' ');
    By me
    :employee.name := RTRIM(LTRIM(:firstname))||' '|| RTRIM(LTRIM(:middlename))||' '||RTRIM(LTRIM(:lastname));
    By the way may i know what is the reason is to dig the old post?
    -Ammad

  • Combining 2 fields into 1 field

    field1 field2 field3
    AA 1234
    BB 2345
    CC 3456
    output
    field3
    AA1234
    BB1234
    CC3456
    thx!

    Re: can you build this query for my requirement, Urgent

  • Text fields combining when PDF is saved and reopened

    This has been a source of great frustration for not just me, but my coworkers working on the same documents.  I individually create text fields in a spreadsheet/table format either initially in MS Word and converting to PDF, or create them in Acrobat while editing the document. 
    After I save the document and open it later to edit, the text fields are combined arbitrarily, usually close or touching fields are combined, such as parts of a column, but sometimes single letters from other fields get combined.  At the same time, some other text fields will sometimes get split into individual rows. 
    Beyond looking messy when I want to edit these fields, the main problem i have in these cases is that whenever i try  to edit these now combined text fields, the text and/or format of the field will get jumbled, thus making it impossible to edit.
    Anyone else had this problem or know how to prevent it?

    Hi - yes Iv'e tried in in several events inc 'Initialize' anbd 'Layout Ready', 'Doc Ready' - just cant seem to get it to work.
    Here is the troublesome portion of the form, if you add some impact ratings the color will change, then save and close the form, reopen and the color formatting is lost
    Dropbox - BIA Impacts for forum.pdf
    Any help appreciated
    Thanks
    E

  • Combining DD-MON field with YYYY field from GL table

    I am running into issues with GL_Cancelled_Date which is displaying the wrong 4 digit year. The GL_Encumbered_Date for these rows is correct and I am looking at ways to combine these fields to output the correct full DD-MON-YYYY date. The below code displays all of the bad rows of data and the last two coloumns display the correct DD-MON and YYYY dates. But I am unsure of how to combine the DD-MON from GL_Cancelled_Date with the YYYY from GL_Encumbered_Date.
    I have written out:
    SELECT
          PRH.SEGMENT1,
          prd.GL_ENCUMBERED_DATE,
          TO_CHAR(PRD.GL_ENCUMBERED_DATE,'YYYY'),
          PRD.GL_CANCELLED_DATE,
          TO_CHAR(PRD.GL_CANCELLED_DATE, 'DD-MON-YYYY'),
          to_char(prd.gl_cancelled_date,'YYYY'),
          to_char(prd.gl_cancelled_date,'DD-MON-') as date_day_month,
          to_char(prd.gl_encumbered_date,'YYYY') as date_year
    FROM
         PO_REQUISITION_HEADERS_ALL PRH,
         PO_REQUISITION_LINES_ALL   PRL,
         PO_REQ_DISTRIBUTIONS_ALL   PRD
    WHERE
         PRH.REQUISITION_HEADER_ID = PRL.REQUISITION_HEADER_ID
          AND   PRL.REQUISITION_LINE_ID   = PRD.REQUISITION_LINE_ID
          AND   PRD.GL_CANCELLED_DATE IS NOT NULL
          AND   to_char(PRD.GL_CANCELLED_DATE,'YYYY') LIKE '00%';

    Hi,
    Here's one way to correct the table:
    UPDATE  po_req_distributions_all
    SET     gl_cancelled_date = ADD_MONTHS ( gl_cancelled_date
                                           , 12 * ( EXTRACT (YEAR FROM gl_encumbered_date)
                                                  - EXTRACT (YEAR FROM gl_cancelled_date)
    WHERE   EXTRACT (YEAR FROM gl_encumbered_date)
        <>  EXTRACT (YEAR FROM gl_cancelled_date)
    When this finishes, gl_cancelled_date will always have the same year as gl_encumbered_date, but hte original months, days, hours, minutes and seconds of gl_cancelled_date will be unchanged.  (Exception: If the original gl_cancelled_date is February 29, and gl_encumbered_date is NOT in a leap year, then the day will be changed to 28, since there is no February 29 in the correct year.  If the original gl_cancelled_date is February 28, and gl_encumbered_date IS in a leap year, then the day will be changed to 29.  This can be fixed if it's a problem.)
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as UPDATE, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Point out where the statement above is getting the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • Itunes songs cutting off

    i have downloaded my previous purchases but they cut off at about 1.45 into the song this is really getting me fed up does anyone have a solution

  • Small Dropdown problem in Jdeveloper

    hi, i am using Jdeveloper 10.1.2.1.0. i have dropdown containing few fields and when i try to run the jsp page the first field in the dropdown is automatically get selected and i want some thing like, unless i select the dropdown and click on what i

  • My iPhone was stolen, If the theif restores the phone will that make the phone untrackable by me?

    If the thief removed my sim, restored the phone, and is now using it for themselves does that mean that I will not be able to track it any longer? Am I screwed if this is what has happend?

  • Email Scheduling agreements to external vendors

    Hi, How do i send email to vendor about after MRP runs changes of Scheduling agreements? I know how to send PO as email? Do i have use SAP standard program and form to send the changes of Scheduling agreements by email to Vendor? Appreciates everyone

  • Import / Export between two instances

    Hi everyone, in very new in oracle, i have created two new instances, prod and test, apps team have are now doing the setup on the test instance, is it possible to import and export all the things they have done on the test to the prod once they're f