2 fields into one

Hey guys,
was hoping you could help me out here. is there a way for information from two different fields to copy over into one. I do mass amounts of rebate applications and the application form has the first and last name seperate so i enter then in two different fields. I have a 2nd page that i use as a cover page that has the customers name and address so i want to have the first and last name from the previous page transfer to one field on the cover page. is this possible?
Thanks

That code will combine 2 fields with a space separater but it will add a leading or trailing space if there is only one non-empty field and fill the field with a space if both fields are empty.
The following function will combine upto 3 fields and use an optional separater but will not add any leading or trailing blanks if any or all of the fields are empty or null.
// Concatenate 3 strings with separators where needed
function fillin(s1, s2, s3, sep) {
Purpose: concatenate up to 3 strings with an optional separator
inputs:
s1: required input string text or empty string
s2: required input string text or empty string
s3: required input string text or empty string
sep: optional separator sting
returns:
sResult concatenated string
// variable to determine how to concatenate the strings
  var test = 0; // all strings null
  var sResult; // re slut string to return
// force any number string to a character string for input variables
  s1 = s1.toString();
  s2 = s2.toString();
  s3 = s3.toString();
  if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
assign a binary value for each string present 
so the computed value of the strings will indicate which strings are present
when converted to a binary value
  if (s1 != "") test += 1; // string 1 present add binary value: 001
  if (s2 != "") test += 2; // string 2 present add binary value: 010
  if (s3 != "") test += 4; // string 3 present add binary value: 100
  /* return appropriate string combination based on
  calculated test value as a binary value
  switch (test.toString(2)) {
  case "0": // no non-empty strings passed - binary 0
     sResult = "";
  break;
  case "1": // only string 1 present - binary 1
     sResult = s1;  
  break;
  case "10": // only string 2 present - binary 10
     sResult = s2;  
  break;
  case "11": // string 1 and 2 present - binary 10 + 1
     sResult = s1 + sep + s2; 
  break;
  case "100": // only string 3 present - binary 100
     sResult = s3;
  break;
  case "101": // string 1 and 3 - binary 100 + 001
     sResult = s1 + sep + s3; 
  break;
  case "110": // string 2 and 3 - binary 100 + 010
     sResult = s2 + sep + s3; 
  break;
  case "111": // all 3 strings  - binary 100 + 010 + 001
     sResult = s1 + sep + s2 + sep + s3; 
  break;
  default: // any missed combinations
     sResult = "";
  break;
return sResult;
// combine two fields seperated by a space; optional 3rd field is a null string;
event.vlaue = fillin(this.getField("First Name').value, this.getField("Last Name").value, "", " ")

Similar Messages

  • To Join two SAP fields into one info object

    Hi All,
    Can you please suggest the best method to concatenate values from two R/3 fields into one info object master data table?
    The requirement is to create a Sales report where I need to report on sales against  sales type.
    Sales type is a list of joint values of item category ( 0ITEM_CATEG) and bill type (0BILL_TYPE).
    So, I need a list of all item categories and billing types in a single object and report sales value against it.
    Please suggest.
    Thanks,
    Sharmishtha

    Hi Venkat,
    In DSO any case you will not be having more than 16 Keys. I am surprised seeing requirement of more than 16 keys, but anyways you need to go with some workaround.
    You can concatenate multiple Fields and map to one Dummy InfoObject which will be Key in DSO so in actual you have more than 16 Keys but have 16 Keys in system.
    But analyze requirement in detail because this will increase data redundancy and time for load will get increased.
    Also for new issues start new discussion otherwise people will not able to help you in this forum.
    Regards,
    Ganesh

  • Combine two date field into one timestamp field

    Hello all,
    I need help combining two date fields into one timestamp field.
    I have separate Date and Milliseconds fields and want to
    combine to one Timestamp field can some suggest sql???

    This is my data
    01 JAN 1989 12:01:00.001 AM
    this is my insert drag_time is a timestamp field in another schema
    INSERT
    INTO DRAG (drag_time)
    SELECT to_char(drag_time, 'DD MON YYYY HH12:MI:SS')||(drag_second)||to_char(drag_time, ' AM')
    FROM sa.drag;
    This is the error
    ERROR at line 3:
    ORA-01855: AM/A.M. or PM/P.M. required

  • Formatting Address Fields into one

    Using Acrobat X PRO:
    I have a multi-page document in which a user is prompted for the address in two different formats:
    1) With the address split into 4 different values/fields:
    Street Field, City Field, State Field, Zip Field
    Example: "1234 Count Rd" (Next Line) "St Louis", "MO"  "55555"
    2) With the address all together:
    Complete Address on one line with a maximum length of 40 Characters.
    Example: 1234 Count Rd, St. Louis, MO 55555
    I would like users to be able to Fill in the Street, City, State, and Zip fields, and no matter what the format of the following fields, have the data autopopulated.
    This isn't a problem for example #1.  However, with #2 if i place all fields close together, I have to guess on how far apart to space each field and still have it fit and format properly.
    Is there any way to combine the values of 4 fields into one value (separated by commas)?
    Making the address field 'auto-fit' may be necessary but it's ugly if there is extra space in the remaining fields. 
    PLEASE SEE THIS EXAMPLE document i have created for the purpose of this post

    And if the combined fields are longer than 40 characters?
    With Acrobat 4 there was a sample form that one entered the data in fields like tile, first name, mi, last name, abd degrees  and then created a full name from those individual fields and adjusted for missing data.
    The doucment level script:
    / Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
      var test = 0; // all strings null
      var sResult; // re slut string to return
    // force any number string to a character string for input variables
      s1 = s1.toString();
      s2 = s2.toString();
      s3 = s3.toString();
      if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present 
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
      if (s1 != "") test += 1; // string 1 present add binary value: 001
      if (s2 != "") test += 2; // string 2 present add binary value: 010
      if (s3 != "") test += 4; // string 3 present add binary value: 100
      /* return appropriate string combination based on
      calculated test value as a binary value
      switch (test.toString(2)) {
      case "0": // no non-empty strings passed - binary 0
         sResult = "";
      break;
      case "1": // only string 1 present - binary 1
         sResult = s1;  
      break;
      case "10": // only string 2 present - binary 10
         sResult = s2;  
      break;
      case "11": // string 1 and 2 present - binary 10 + 1
         sResult = s1 + sep + s2; 
      break;
      case "100": // only string 3 present - binary 100
         sResult = s3;
      break;
      case "101": // string 1 and 3 - binary 100 + 001
         sResult = s1 + sep + s3; 
      break;
      case "110": // string 2 and 3 - binary 100 + 010
         sResult = s2 + sep + s3; 
      break;
      case "111": // all 3 strings  - binary 100 + 010 + 001
         sResult = s1 + sep + s2 + sep + s3; 
      break;
      default: // any missed combinations
         sResult = "";
      break;
    return sResult;
    And then one could use a custom calculation script for a full address field:
    // Full business address including country
    function doFullBusinessAddress() {
      var ba = this.getField("business.address.full");
      var bc = this.getField("business.address.citystatezip");
      var bu = this.getField("business.address.country");
      event.value = fillin(ba.value, bc.value, bu.value, ", ");
    doFullBusinessAddress();

  • 2 Form Fields into one DB Entry

    I apologize in advance if this question has been asked and answered multiple times. I am new to this and extremely frustrated because I keep getting stuck.
    I am using Dreamweaver to create a website with Coldfusion as the server. I am using Quickbooks and QODBC to use the DB to integrate with CF.
    I have created a form with multiple fields all text entries. I have been able to get all the information to post into my database correctly. However my question is I want to create a multiple entry that would combine two form fields into one column in the database table. For instance I have First Name and Last Name as form fields when the user submits I want these to both enter into their respective columns in the table but also combine into one entry with format Last Name, First Name into a FULL NAME Column in the table. Is this possible if so how????? Thanks in advance.

    This is my current code::
    <cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "customer">
      <cfquery datasource="QBs">  
        INSERT INTO Customer (Name, FirstName, LastName, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode)
    VALUES (<cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
    <cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="41">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
    <cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
    <cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
    <cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="41">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.streetaddress") AND #FORM.streetaddress# NEQ "">
    <cfqueryparam value="#FORM.streetaddress#" cfsqltype="cf_sql_clob" maxlength="41">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.city") AND #FORM.city# NEQ "">
    <cfqueryparam value="#FORM.city#" cfsqltype="cf_sql_clob" maxlength="31">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.state") AND #FORM.state# NEQ "">
    <cfqueryparam value="#FORM.state#" cfsqltype="cf_sql_clob" maxlength="21">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.zipcode") AND #FORM.zipcode# NEQ "">
    <cfqueryparam value="#FORM.zipcode#" cfsqltype="cf_sql_clob" maxlength="13">
    <cfelse>
    </cfif>
      </cfquery>
    <cfquery datasource="Access">
    INSERT INTO Logininfo (FirstName, LastName, Username, Password)
    VALUES (<cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
    <cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
    <cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.username") AND #FORM.username# NEQ "">
    <cfqueryparam value="#FORM.username#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    , <cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
    <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="25">
    <cfelse>
    </cfif>
    </cfquery>
      <cflocation url="thankyou.cfm">
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <h1>Welcome to our sign up Page!</h1>
    <p>Please fill out the form below to register with out site and gain access to our members account page.</p>
    <form name="customer" action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" id="customer"><table width="auto" border="1">
      <tr>
        <td><label for="firstname">
          <div align="right">First Name:</div>
          </label></td>
        <td><span id="sprytextfield1">
          <input type="text" name="firstname" id="firstname" accesskey="n" tabindex="05" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="lastname">
          <div align="right">Last Name:</div>
          </label></td>
        <td><span id="sprytextfield2">
          <input type="text" name="lastname" id="lastname" accesskey="n" tabindex="10" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="streetaddress">
          <div align="right">Street Address</div>
          </label></td>
        <td><span id="sprytextfield3">
          <input type="text" name="streetaddress" id="streetaddress" accesskey="n" tabindex="15" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="city">
          <div align="right">City:</div>
          </label></td>
        <td><span id="sprytextfield4">
          <input type="text" name="city" id="city" accesskey="n" tabindex="20" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="state">
          <div align="right">State:</div>
          </label></td>
        <td><span id="sprytextfield5">
          <input type="text" name="state" id="state" accesskey="n" tabindex="25" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="zipcode">
          <div align="right">Zipcode:</div>
          </label></td>
        <td><span id="sprytextfield6">
          <input type="text" name="zipcode" id="zipcode" accesskey="n" tabindex="30" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="username">
          <div align="right">Username:</div>
        </label></td>
        <td><span id="sprytextfield7">
          <input type="text" name="username" id="username" accesskey="n" tabindex="40" />
          <span class="textfieldRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td><label for="password">
          <div align="right">Password:</div>
        </label></td>
        <td><span id="sprypassword1">
          <input type="password" name="password" id="password" accesskey="n" tabindex="45" />
          <span class="passwordRequiredMsg">A value is required.</span></span></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
          <input type="submit" name="submit" id="submit" value="Register" accesskey="n" tabindex="50" />
        </div></td>
        </tr>
    </table>
      <input type="hidden" name="MM_InsertRecord" value="customer" />
    </form>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
    var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
    var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
    </script>
    </body>
    </html>

  • Join 2 fields into one to map to destination field

    Hi! Is it possible to join data in 2 fields into one to map to the destination field? I have image file name kept in one field and want to prefix with a URL which I hope to maintain in a manually added field. Alternatively, it will be great to be able to prefix the image filename with the URL to be mapped to the image destination field.
    Any help is very much appreciated.
    Thanks!
    SF

    Hi,
    Yes it is possible to combine values from two fields to map a single field of MDM repository using Import Manager. This feature of Import manager is called as Field Partitioning.
    You can do it by following below mentioned steps:
    1. Open import manager and connect to source file.
    2. Specify source and destination tables. expand Source Table under source Hierarchy in Import Manager. And click on first field to select it.
    3. Now Go to "Partition Field/Value" tab. In the Source Partition sub Pane  you will see your First Field under "partition by" (* because you select first field from source hierarchy).
    4. From source Partition sub pane under "Available Fields" select the second field and click on "Add". This will bring second field also under "partitioned By".
    5. Now select both Fields under "partition by" and right click and select "Combine" (*Combine option will be enabled only when more than 1 field is selected by "partition By"
    6. Once you select Combine, it will combine values from both Fields. Again right click and select "Set combine delimiter" and specify the required value delimiter.
    7. Now Go to "Map Field /Values" tab. You will see one more field (*starting with the name of your first field and ending with partition word. Map this field to the required destination field.
    8. Follow other normal steps for data import and import data. after data import check data in data manager. you will get combined values from 2 source field in the MDM field.
    Check Page no 203 of [import manager reference guide |http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8e7a42301bae10000000a42189b/MDMImportManager71.pdf]for more details.
    Please revert if you face any issue.
    Regards,
    Shiv
    Edited by: Shiv Prashant Dixit on Mar 11, 2010 9:53 AM

  • Get value of two fields into one field

    Hellou,
    i need little help with javascript again
    Currently i'm using code below to get value from one field to other:
    getField("Text35").value = getField("Text1").valueAsString;
    Now i'm wondering how to change this code, so i could get values from two fields into one. For example i have field "firstname" and field "lastname", now i want to show this in field "name".
    Example, if field firstname have value John and field lastname value is Doe, i want to show it in field name like "John Doe".
    I hope that u understood what i want
    Thanks for helping me!

    getField("Text35").value = getField("Text1").valueAsString + " " +
    getField("Text2").valueAsString;

  • SQL Loader combine fields into one.

    Hi i am using sql loader to convert a db from sql server to oracle.
    my SQL Server DB has a field for the date and another for the time, i want to convert this into on filed called date. I cannot seem to figure out how to do this.
    my ctl file looks like this.
    load data
    infile '[Cell_Phones].[dbo].[Account_Details].dat' "str '<EORD>'"
    into table MD_CELLPHONE.Account_Details
    fields terminated by '<EOFD>'
    trailing nullcols
    Account_Number ,
    Phone_Number ,
    Call_temp FILLER,
    Call_Date "TO_DATE(:Call_temp ||' ' ||':Call_Date', 'mm/dd/yyyy HH:miam')"
    BEGINDATA
    3817913.0<EOFD>1234567890.0<EOFD>2007-03-31 00:00:00<EOFD>4:25 PM<EOFD>3817913.0<EOFD>1234567890.0<EOFD>2007-03-24 00:00:00<EOFD>8:19 PM<EOFD>3817913.0<EOFD>1234567890.0<EOFD>2007-03-31 00:00:00<EOFD>4:25 PM<EOFD>
    But if i run this i get the following error
    SQL*Loader-291: Invalid bind variable CALL_TEMP in SQL string for column CALL_DATE.
    basically i cant find a way to do this to combine 2 columns into one and discard the one i am not using.
    Any help would be appreciated.
    Jeff

    Hello,
    You can load the data as in a stg table and the move from stg table to regular table concatenating both call_temp and call_date column together.
    load data
    infile 'Cell_Phones.dbo.Account_Details.dat' "str '<EORD>'"
    into table MD_CELLPHONE.Account_Details_stg
    fields terminated by '<EOFD>'
    trailing nullcols
    Account_Number ,
    Phone_Number ,
    Call_temp,
    Call_Date
    Convert  to right date format
    Insert into account_details (col1 , col2, col3, ...)  select  val1 , val2 , to_date ( val3 || ' ' || val4) ...
    from account_details_stg;
    Regards
    Edited by: OrionNet on Feb 2, 2009 5:11 PM

  • Concatinating two fields into one..

    Hi all,
    I have a query wherin i need to concatinate two fields and display it into one.
    Query: We have two fields one of subtype 0001 and d other of subtype 0014. I have to display these two fields together.
    The fields are Pernr   Wtf08   ZAllergy   AEDTM    Zlastillness Exdat.
    Where Pernr wtf08 and zallergy Aedtm are in subtype 0001 and the pernr Aedtm Zlastillness Exdat are from the subtype 0014. I took a workarea of the type a method containing all the above fields. And now i want to show all the fields together in one field while displaying.
    Can u please help me with any pointers or any sample code.
    Thanks,
    Anita

    You can create a new Data field with character 255 or more.
    Then you use the CONCATENATE Function to combine all the field you wanted to.
    e.g.
    CONCATENATE Pernr wtf08 and zallergy Aedtm INTO L_display SEPARATED BY SPACE.
    L_display is the field to concatinate two fields.

  • Putting 7 table fields into one field with line breakes included!

    Hi People
    I Need to assamble 7 fields from a view, into one field with some line brakes in Reports, how do I do that???
    E.g :
    Field names : Name, Collection1, StreetName, StreetNo, ExtraCity, ZipCode, City
    Should be put into one field called address and be displayed like this
    Name
    Collection1
    StreetName StreetNo
    ExtraCity
    ZipCode City
    I hope someone can help me *S
    /Stig :-)

    The following should give you some idea. It might depend if you run your report on Windows or Unix.
    select
    Name        || decode(Name, null, null, chr(13)||chr(10))||
    Collection1 || decode(Collection1, null, null, chr(13)||chr(10))||
    StreetName  || decode(StreetName, null, null, ' '||StreetNo||chr(13)||chr(10))||
    ExtraCity   || decode(ExtraCity, null, null, chr(13)||chr(10))||
    ZipCode     || decode(ZipCode, null, null, ' '||City )
    from MyView

  • Mapping question: n recordsets with m fields into one string

    Hi,
    My input message will look like
    <customer>
      <name>name</name>
    </customer>
    <row1>
      <customer>name</customer>
      <field11>111</field11>
      <field12>122</field12>
    </row1>
    <row2>
      <customer>name</customer>
      <field21>211</field21>
      <field22>222</field22>
    </row2>
    <rown>
      <customer>name</customer>
      <fieldn1>n11</fieldn1>
      <fieldn2>n22</fieldn2>
    </row1>
    and i need an output like
    <customer>
      <name>name</name>
    </customer>
    <rowx>
      <fieldx>111222211222.........n11n22</fieldx>
    </rowx>
    in short all fields from row1 to rowx need to be concatened in one big string.
    What is the best way to do this?
    Kr
    Robert

    Surely Using UDF/ Java Mapping it is easy .
    What version are u working on .
    IF 7.1 , try Using Global Variable (  Graphical variable ) on receiver side.
    Lets see if it worked.
    try Like this
    field11  ->                Concat ->      Graphical Variable
    Graphical Variable ->
    I am expecting every time value of field11 will be conactinated with previously store Graphical Variable .
    Similarly for all other fields .
    and in last Concate them all fields to One Output Final String.
    Check this link . If you want to know the working of Graphical variable .
    SAP PI 7.1 Mapping Enhancements Series: Graphical Variables.
    /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    Regards
    PS

  • Joining Two Fields Into One Field for a View

    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;

    832667 wrote:
    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;to concatenate two string together do not use "+", but "||"
    SELECT FIRST_NAME||'.'||LAST_NAME FROM EMP;

  • Need to Insert 2 Fields into one Destination Field

    I have a scenario in this way:
    Source Table  
    Inventory
    Alocation| Blocation
    ABC         DEF
    Destination Table
    LocationID
    Mapping Table  
    LocationID, Location
    1               ABC
    2               DEF
    Now I have to write a query wherey both the location codes should be inserted into LocationID in Destination table
    Normally If one Location was available I would have inserted, but I need to insert both the Records into Destination by mapping them to Mapping table
    if one Location Was Available:
    Insert Into DestinationTable
    (LocationID)
    Select M.LocationID From MappingTable M Join Sourcetable S Where M.location = S.ALocation
    This would Output
    Destination Table
    LocationID
    1
    But I want to see this as 
    Destination Table
    LocationID
    1
    2
    Please Help on this.
    Thanks
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

    Check out UNPIVOT:
    http://www.sqlusa.com/bestpractices/training/scripts/pivotunpivot/
    http://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Add Text From Multiple Fields Into One

    I'm creating a form in Acrobat 9 that lets you fill in information for four cars. For each of the four cars, there is a text box for Manufacturer, Model, and Year. I have the boxes labeled Manuf1, Mod1, Year1, Manuf2, Mod2, etc.
    Then I two other text boxes called Text1 and Text2. In Text1 I want all the manufacturers listed together( example: Ford, Chevy, BMW) and the same thing for the models in Text2. What would be even better would be if in Text1 and Text2 the names could be seperated with "or".
    Is there a javascript that can do this and not repeat a name (if, for example, the first two cars were both Ford, the third was BMW and the fourth was Chevy, I want Text1 to display: Ford or BMW or Chevy, not: Ford or Ford or BMW or Chevy)?
    Thank you for the help!

    The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.
    http://forums.adobe.com/message/2954517#2954517
    Paul

  • Import 2 source fields into one destination field (appending entries)

    Dear forum members,
    In MDM Import Manager, is it possible to take 2 fields from the source file structure and map the values to the same destination lookup field, so both values are appended to the table for the same record?
    If so, can you provide detaiuls and considerations?
    I have been looking at partitions, but all I can do is create a single record in the lookup table consisting of both values combined.
    Many thanks,
    Nick

    Hi Alon,
    Yes the field I am testing with is called 'Hyperlink' of type 'Lookup [Qualified Flat] (multi-valued)'
    The field shows as type 'F' in the destination field pane.
    I do acrtually want to load to a different field eventually, but am just testing with this as it seems to be the riight type.
    The table I want to load to is the Hyperlinks table in SRM-MDM. It has the following structure in the console:
    Field Name        Field Type       Non-Qualifier / Qualifier
    Type                 (Lookup[flat])    Non-qualifier
    Mime Type        (Lookup[flat])    Qualifier
    URL                  (Text)              Qualifier
    URL Description (Text)              Qualifier
    In import manager, the fields available are:
    Hyperlink                                F    Lookup [Qualified Flat] (multi-valued)
    Mime Type <Hyperlink>           Q   Lookup [Flat]
    URL <Hyperlink>                     Q  Text[250]
    URL Description <Hyperlink>    Q  Text[250]
    Ultimately I am trying to map:
    1. Hyperlink          - a null source value to a fixed dest value of 'Link'
    2. Mime Type        - a null source value to a null dest value
    3. URL                  - 2 values from 2 fields in the source file to 2 (appended) entries
    4. URL Description - same 2 source values in the source file to 2 (appended) entries
    Unfortunately we cannot modify the hyperlinks table or use a different one as the fields will not be displayed properly in the catalogue view SRM requisitioners will have so I HAVE to use this table and these fields.
    What do you think?
    Thanks a lot,
    Nick

Maybe you are looking for

  • Getting the name of the table of a column in a result

    I am connected via ODBC (3.52) to an Oracle 8i Db in a Windows 2000 application and want to get the name of the table a column of the result belongs to. I tried SQLColAttribute and SQLGetDescField with SQL_DESC_TABLE_NAME (that works fine with MsAcce

  • Preview autosaves images to desktop

    Images opened in preview are saved to desktop. How do I stop it?

  • Photoshop CS5 v12.0 using Mavricks Mac 10.9 - says I have updates required on Bridge

    Photoshop CS5 v12.0 using Mavricks Mac 10.9 - says I have updates required on Bridge & Photoshop, starts downloading gets to 98 p/cent then quits says there is an error " try again later ???? Any one have ideas what's happening ???

  • Ipod shuffle will not start.

    I just purchased an ipod shuffle but the computer does not recognize it. It does not show up in itunes. I am outside of North America and I cannot find a local number to call for apple support. The toll free numbers do not work from here. What to do?

  • New starter layouts flow and border

    Hi I am teaching my self Java so I expect this is a simple mistake set-up a class extending a JFrame set-up a JPanel with a flow layout added 5 checks boxes this worked as I expected with the check box's moving down to the next line I then changed th