Field name modification with update command

Hi Gurus
I have selected the customer list from sap with operating system mmsql , but I want to update or used the select statement in such a way that if there is street already in the list then relaced with postbox(pfach) and the field must replace or change the street field as in eg P.O.BOX:+pfach  
if the pobox is not there then address must not change or update
Can anyone send me the sql statement toupdate please
SELECT     KUNNR, NAME1, STRAS,PFACH, MCOD3, PSTL2,TELF1
FROM         wg4.KNA1

You probably want to do this via LSMW or some other SAP delivered solution and not a straight update to the database, but if you really need the SQL I included it below.
I dont know which field you are trying to update, but if would be something like:
update wg4.KNA1 set Field = case when Isnull(PFACH, '') = '' then Field else 'P.O.Box:' + PFACH end
The update will work if your PFACH is set to '' or null, if it can have other values that you don't want you would have to add those to the clause.
For a select (and to check if the update will work) it would be:
select case when PFACH = '' then Field else 'P.O.Box:' + PFACH end as NewPFACH from wg4.KNA1

Similar Messages

  • CFUPDATE problem with field name beginning with a number

    I have a form (actually several) that is gathering data for a survey. I tried to use cfupdate to update the data elements and got a string index out of range error. I tested again without the form fields that began with numbers and it worked just fine. I then tried to enclose the offending field names in () and []. Both times I got same error. Does anyone have a work around for this? The code and error are below.
    Changing the field names is not really an option. This survey has almost 400 data points and most of the fields begin with the question number.
    Thanks
    DW
    <cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', '2_a_fy12', '2_b_fy09', '2_b_fy10', '2_b_fy11', '2_b_fy12', '2_c_fy09', '2_c_fy10', '2_c_fy11', '2_c_fy12', '2_d_fy09', '2_d_fy10', '2_d_fy11', '2_d_fy12', '2_e_fy09', '2_e_fy10', '2_e_fy11', '2_e_fy12', '2_f_fy09', '2_f_fy10', '2_f_fy11', '2_f_fy12', '2_g_fy09', '2_g_fy10', '2_g_fy11', '2_g_fy12', '2_h_fy09', '2_h_fy10', '2_h_fy11', '2_h_fy12', '2_i_fy09', '2_i_fy10', '2_i_fy11', '2_i_fy12', '2_j_fy09', '2_j_fy10', '2_j_fy11', '2_j_fy12', '2_k_fy09', '2_k_fy10', '2_k_fy11', '2_k_fy12', '2_l_fy09', '2_l_fy10', '2_l_fy11', '2_l_fy12', central_office, dept_office, incl_other, 3_a_fy09, 3_a_fy10, 3_a_fy11, 3_a_fy12, 3_b_fy09, 3_b_fy10, 3_b_fy11, 3_b_fy12, 3_c_fy09, 3_c_fy10, 3_c_fy11, 3_c_fy12, 3_d_fy09, 3_d_fy10 3_d_fy11, 3_d_fy12, 3_e_fy09, 3_e_fy10, 3_e_fy11, 3_e_fy12, 3_f_fy09, 3_f_fy10, 3_f_fy11, 3_f_fy12, 3_g_fy09, 3_g_fy10, 3_g_fy11, 3_g_fy12, 3_h_fy09, 3_h_fy10, 3_h_fy11, 3_h_fy12, 3_i_fy09, 3_i_fy10, 3_i_fy11, 3_i_fy12, 3_j_fy09, 3_j_fy10, 3_j_fy11, 3_j_fy12, 3_k_fy09, 3_k_fy10, 3_k_fy11, 3_k_fy12, 3_l_fy09, 3_l_fy10, 3_l_fy11, 3_l_fy12">
    String index out of range: -2
    The error occurred in C:\Inetpub\wwwroot\directory\process_arra_suvey_2.cfm: line 12
    12 : <cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', ...

    I think you have run one of CFUPDATE's limitations.  I am not 100% certain, but I do not think cfupdate provides a way to escape invalid column names like yours.  In which case you may need to do a regular UPDATE within a  cfquery instead... or rename your columns.
    fields that began with numbers
    Most databases discourage creating column names that start with a number (or other restricted characters).  While many databases will allow you to escape invalid names, it is simpler all around to avoid them altogether.  Otherwise, you may have to escape the names in every single query. The recommendations vary, but usually object names that begin with a  letter, and contain only letters, numbers and underscores are considered  safe.
    This survey has almost 400 data points and most of the fields begin with the question number.
    Four-hundred (400) is a lot of columns for a single table.  The fact that they all them seem to contain the same type of information (ie response to a question) is an indication that data should probably be stored in a separate table, as rows, not columns.  For example questions could be stored in one table, possible answers in another, and the results of an individual test/survey stored in a third table.  A structure like that is much easier to query, can easily accommodate changes (add/remove questions, responses, etcetera) without having modify the table every time.

  • Update multiple records with Update Command Dreamweaver 8.0.2 - ASP VBScript

    Dreamweaver 8.0.2 - Language ASP – VBScript
    I’m trying to update more than one record at a time
    using checkboxes. I’ve successfully done this numerous times
    prior to Dreamweaver 8.0.2.
    Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form, checkbox and repeat region and pass the ID to
    another page containing an ‘Update Command’. The code
    on the Update page looked similar to the following:
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    set spMemberApproving = Server.CreateObject("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") + ")"
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    However, in Dreamweaver 8.0.2 when you fill out the Update
    Command dialog box, Dreamweaver asks you to provide the
    ‘Type’ and ‘Size’ for the variables (see:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    That being said and done, the code on the Update page looks
    like the following:
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    Set spMemberApproving = Server.CreateObject ("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (?) "
    spMemberApproving.Parameters.Append
    spMemberApproving.CreateParameter("MMColParam", 202, 1, 10,
    MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"), spMemberApproving__MMColParam
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    The Update Command works perfectly when only 1 record is
    being updated. However, when I try to update more than one record I
    get the following error:
    Error Type:
    ADODB.Command (0x800A0D5D)
    Application uses a value of the wrong type for the current
    operation.
    /issues_manager/admin/members_approving.asp, line 27
    Can anyone help me out?

    Yes, this is a bug in Dreamweaver 8.0.2. The only workaround
    is to stay with
    8.0.1 or to hand-code the query. Adobe removed most of the
    useful ways to
    use Commands and Recordsets in 8.0.2 and limited it to basic
    queries.
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    http://www.tom-muck.com/
    Cartweaver Development Team
    http://www.cartweaver.com
    Extending Knowledge Daily
    http://www.communitymx.com/
    "Button1" <[email protected]> wrote in message
    news:[email protected]...
    > Dreamweaver 8.0.2 - Language ASP ? VBScript
    >
    > I?m trying to update more than one record at a time
    using checkboxes.
    > I?ve
    > successfully done this numerous times prior to
    Dreamweaver 8.0.2.
    >
    > Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form,
    > checkbox and repeat region and pass the ID to another
    page containing an
    > ?Update Command?. The code on the Update page looked
    similar to the
    > following:
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    >
    > <%
    >
    > set spMemberApproving =
    Server.CreateObject("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") +
    > ")"
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    > However, in Dreamweaver 8.0.2 when you fill out the
    Update Command dialog
    > box,
    > Dreamweaver asks you to provide the ?Type? and ?Size?
    for the variables
    > (see:
    >
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    >
    >
    >
    > That being said and done, the code on the Update page
    looks like the
    > following:
    >
    > <%
    > ' IIf implementation
    > Function MM_IIf(condition, ifTrue, ifFalse)
    > If condition = "" Then
    > MM_IIf = ifFalse
    > Else
    > MM_IIf = ifTrue
    > End If
    > End Function
    > %>
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    > <%
    >
    > Set spMemberApproving = Server.CreateObject
    ("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (?) "
    > spMemberApproving.Parameters.Append
    > spMemberApproving.CreateParameter("MMColParam", 202, 1,
    10,
    > MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"),
    > spMemberApproving__MMColParam & ""))
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    >
    > The Update Command works perfectly when only 1 record is
    being updated.
    > However, when I try to update more than one record I get
    the following
    > error:
    >
    > Error Type:
    > ADODB.Command (0x800A0D5D)
    > Application uses a value of the wrong type for the
    current operation.
    > /issues_manager/admin/members_approving.asp, line 27
    >
    >
    > Can anyone help me out?
    >
    >

  • Issue with update command in writeback...

    I am not able to get an Update working as expected using the write back feature. Any help appreciated.
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="XXExample1">
    <XML>
         <writeBack connectionPool="ORA11_SH">
              <insert> </insert>
              <update>UPDATE sales SET update_col=@{c1} WHERE prod_id=@{c0}
              </update>
         </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    My error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27024] The EXECUTE PHYSICAL statement must specify a physical SQL statement to execute. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL ORA11_SH

    The template name should be same as Web message name...
    They are both XXExample1
    Make sure that the column position in criteria same as you mentioned...
    I have verified them to be as they show up in the "Results Page". I.e. co =prod_id and c1=update_col.
    Make sure that there are Update permissions for this user for that particular table..
    It is actually using a ODBC data source name, ORA11_SH and the user I am logging in is "Administrator". I think they are covered.
    Make sure that there exist * update_col* in your physical table...
    Of course.
    John:
    <update>UPDATE sales SET update_col='@{c1}' WHERE prod_id='@{c0}'</update>
    the quotes are needed only for char datatype columns in my case the columns are numeric.

  • Field names with spaces in target file using fcc

    Hello Friends,
    My target structure fields:
    MT_Target
    ItemNo, ItemName, ItemQuantity, AmountValue, TotalAmount
    My requirement here is - In the target file - these fields should be generated with space. Shown as below:
    Item No, Item Name, Item Quantity, Amount Value, Total Amount
    How can i achieve this.
    Thanx
    S.

    if i understood u correctly u want to have a header line in ut target file same as that ur field names but with a space in between??
    if yes  the use :
    NameA.addHeaderLine=3
    NameA.headerLine =Item No, Item Name, Item Quantity, Amount Value, Total Amount
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

  • Edit QBE Update Field Names

    I need to have the funtionality of a QBE report, but need to clean up the field names on the update form. I can't find a place to do this. How can I do this, or do I need to write my own QBE type report in SQL calling a custom form?
    Thanks,
    Brian

    Dear,
    Use transaction CMOD and go to Goto > Text Enhancements > Keywords > Change*, enter the data element and then change..
    Regards,
    Chintan Joshi

  • Get Table fields name for an SAP table

    hi,
    i need to pass SAP table name as a parameter to the selection screen of a Report program.
    This prog shud give me the table Fields name along with type and length.
    Is there any standard SAP report program for the same or i have to write my own logic?
    Please advise.
    regards,
    ags.

    Hi,
    For your requirement you have to write own program in dynamic manner by using field symbol concept.
    Use this FM DDIF_FIELDINFO_GET and get the field information of database table.
      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname        = <master>    u201C Table name
        Tables   
          DFIES_TAB      = <table_field> u201C here you will get field information of table
        exceptions
          not_found      = 1
          internal_error = 2
          others         = 3.
      if sy-subrc <> 0.
        message  text-005 type 'E' .
      endif.
    Loop <table_field> assignigng <field>
    *---here you have to collect the relevant information that you are going to display in your output.
    Endloop.
    Use any one of ALV or OOALV and display your records.
    Regards,
    Peranandam

  • I want to know the table name and field name of this description

    i want to know the table name and field names of this description
    supplieriddomain

    Hi SV,
    Try this:
    1) Go to SE15 (Repository info system)
    2) Expand ABAP Dictionary
    3) Expand Fields
    4) Click on Table Fields
    5) Enter the field name you want to search in field name or use wild cards with keywords in short decription field (like supplier ) and Execute.
    OR
    If it's a screen field, do a F1 on the field and click on Technical information on the help window popped up from Menu..this will tell you the field name along with structure or table name.
    Hope this helps you.
    Regards,
    Vivek

  • How to determine InfoCube name within the update rule start routine?

    We are attempting to delete all the records where all key figure values are zeroes. We have about 15% of such records and we really don't need them.
    We have yearly InfoCubes. We copy the InfoCube and update rules at the end of every year. So, we don't want to hard code any field names within the update rules.
    If I could determine the target InfoCube name within the update rule start routine, I can find out all the key figures dynamically. But, I don't see a way of finding out the InfoCube name.
    If you would share any ideas, I would really appreciate.
    Thanks.
    Sudhi Karkada.

    Hi Sudhi,
    I dont know if this is what you are looking for.
    if you want to delete a record from being inserted when all the Key figure values are ZERO then you can use a Update Routine for some characteristic in the below way
    If looking for the InfoCube:
    if COMM_STRUCTURE-KF1 = 0 and COMM_STRUCTURE-KF2 AND....
      RETURNCODE = 4.
    else
      RESULT = COMM_STRUCTURE-ChanracteristicObject.
    endif.
    If it is to an ODS / InfoCube in the start routine.
      DELETE DATAPACKAGE where KF1=0 and kf2=0 and .....
    Hope it helps.
    Regards,
    Praveen.
    ENDLOOP.
    Message was edited by: Praveen

  • Combing PDF forms with identical field names while retaining unique values.

    I have several PDF files of the same form that has been filled out by multiple users. I need to create a combined file of all the responses for reporting purposes. However, the forms (obviously) all have the same field names, and when I combine them the values of the first form autofill the values of the matched fields on the other forms. I need a way to combine the forms while retaining the unique field values. I thought I could write a js to rename the fields, but that isn't possible.
    *EDIT: The fields need to retain editability because some contain long, scrolling text. Flattening or read-only isn't an option, not that either fixes the above problem.
    Suggestions?

    UPDATE:
    I solved this problem, at least for my own needs. Following try67's advice in a related post, I had to delete the existing fields and create new ones with new names. Given my desired outcome, this meant collecting all of the field properties of the fields (with some variation by field type), storing it, erasing the existing fields, and using that stored information to create new, identical fields (again with some variation by field type). Since I didn't want to retain actions or javascript, this was a perfect solution. I also no longer needed the buttons to function (since I wasn't retaining their javascript), so I made them read-only. I'm listing my working code below, in case anyone else could benefit from some or all of it.
    My question to the community is this: Why doesn't Adobe allow for fields to be renamed via javascript? Is it a security issue? My life would have been a lot easier the last few days if I could simply rename existing fields.
    The following script is used in a Combine Files action via the Action Wizard. The PDF optimizer is also used to strip out or flatten additional items.
    //This script is used to rename all the fields in a document while also removing any javascript or actions associated with those fields. Makes buttons read only without renaming.
    //Function to create a random alphanumeric ID.
    function makeid(n) {
        var text = "";
        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        for( var i=1; i <=n; i++ )
            text += possible.charAt(Math.floor(Math.random() * possible.length));
        return text;
    //List variables for collecting arrays of field properties.
    var fieldNum = this.numFields;
    var fieldNameArray = new Array();
    var fieldTypeArray = new Array();
    var pageNumArray = new Array();
    var fieldRectArray = new Array();
    var fieldValueArray = new Array();
    var borderStyleArray = new Array();
    var borderColorArray = new Array();
    var borderThicknessArray = new Array();
    var fillColorArray = new Array();
    var textColorArray = new Array();
    var textFontArray = new Array();
    var textSizeArray = new Array();
    var textAlignmentArray = new Array();
    var textMultilineArray = new Array();
    var checkmarkStyleArray = new Array();
    var radiowidgetNumArray = new Array();
    var radiowidgetRectArray = new Array();
    var radiowidgetPageNumArray = new Array();
    //Get the properties of all the current fields, including widgets.
    for (var i = 0; i < fieldNum; i++) {
        var currentField = this.getNthFieldName(i);
        fieldNameArray[i] = makeid(5);
        fieldTypeArray[i] = this.getField(currentField).type;
        borderStyleArray[i] = this.getField(currentField).borderStyle;
        borderColorArray[i] = this.getField(currentField).strokeColor;
        borderThicknessArray[i] = this.getField(currentField).lineWidth;
        fillColorArray[i] = this.getField(currentField).fillColor;
        textColorArray[i] = this.getField(currentField).textColor;
        textFontArray[i] = this.getField(currentField).textFont;
        textSizeArray[i] = this.getField(currentField).textSize  
        if (this.getField(currentField).type == "text") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            textAlignmentArray[i] = this.getField(currentField).alignment;
            textMultilineArray[i] = this.getField(currentField).multiline;
        if (this.getField(currentField).type == "checkbox") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            checkmarkStyleArray[i] = this.getField(currentField).style;
        if (this.getField(currentField).type == "radiobutton") {
            checkmarkStyleArray[i] = this.getField(currentField).style;
            fieldValueArray[i] = this.getField(currentField).value;
            var n = 0;
            while (this.getField(currentField + "." + n) != null) {
                radiowidgetNumArray[n] = this.getField(currentField + "." + n).name;
                n++;
            for (x = 0; x < radiowidgetNumArray.length; x++) {
                radiowidgetRectArray[x] = this.getField(radiowidgetNumArray[x]).rect;
                radiowidgetPageNumArray[x] = this.getField(radiowidgetNumArray[x]).page;
    //Delete all the current fields, except for buttons, which become read-only.
    for (var i = (fieldNum - 1); i > -1; i--) {
        var currentField = this.getNthFieldName(i);
        if (this.getField(currentField).type != "button") {
            this.removeField(currentField);
        } else {
            this.getField(currentField).readonly = true;
    //Using the stored arrays of field properties, generate new, identical fields.
    for (var i = 0; i < fieldNum; i++) {
        if (fieldTypeArray[i] == "text") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]);
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.alignment = textAlignmentArray[i];
            newField.multiline = textMultilineArray[i];
            newField.doNotSpellCheck = true;
        if (fieldTypeArray[i] == "checkbox") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]); 
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.style = checkmarkStyleArray[i];
            newField.readonly = true;
        if (fieldTypeArray[i] == "radiobutton") {
            for (y = 0; y < radiowidgetNumArray.length; y++) {
                var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], radiowidgetPageNumArray[y], radiowidgetRectArray[y]);
                newField.value = fieldValueArray[i];
                newField.borderStyle = borderStyleArray[i];
                newField.strokeColor = borderColorArray[i];
                newField.lineWidth = borderThicknessArray[i];
                newField.fillColor = fillColorArray[i];
                newField.textColor = textColorArray[i];
                newField.textFont = textFontArray[i];
                newField.textSize = textSizeArray[i];
                newField.style = checkmarkStyleArray[i];
                newField.readonly = true;           
    //End script.

  • Please help with dynamic form field names in cfloop

    Hi,
    I need to create a form with day, date, month, year and time for 12 months
    Instead of coding them 12 times, I create day,date,month,year and time fileds in my form 1 time and then I use cfloop from="1" to="12" index="i" to loop these form fields 12 times.
    I gave each form field name such as: <input type="text" name="ScheduleDate_# i #" value=" "> this way each of those field will be named differently such as:
    ScheduleDate_1, ScheduleDate_2,ScheduleDate_3, ScheduleTime_1,ScheduleTime_2, etc
    I'm facing problem when this form is submitted, I think the error has something to do with the pound sign (##) when it comes to updating the back end
    I use MS SQL
    It doesn like this:
    <CFLOOP From="1" To="12" index="k">
    <CFIF Len(Trim(Form.MeetYear_#k#)) NEQ 0 AND Len(Trim(Form.MeetTime_#k#)) NEQ 0>
    <cfquery name="CreateSchedule" datasource="#DSN#">
    UPDATE TableSchedule 
    SET SchedDay = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedDay_#k##">,SchedMonth =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedMonth_#k##">,SchedDate =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedDate_#k##">,SchedYear =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedYear_#k##">,SchedTime =
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.SchedTime_#k##">
    Where SchedId = <cfqueryparam cfsqltype="cf_sql_numeric" value="#k#">  
    </cfquery>
    </CFIF>
    </CFLOOP>
    Can anyone help please?

    You can't nest hash marks. Do this instead:
    SET SchedDay = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form["SchedDay_" & k]#">
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • In Mail, the "From" line shows the wrong name associated with the email id. How do I update it?

    In Mail, the "From" line shows the wrong name associated with my email ID. I've looked over preferences and account information but have not found where I can update it.

    There isn't an email address associated with the contact name who appears as the "from" in Mail. It used to be a shared email address and I already had updated the contact to list only the phone number in case that was causing the problem. 

  • Can field names not start with a single letter camel case?

    I am using Hibernate 3.6, JPA 2.0, and Spring 3.0.6. I have fields in my objects like the following:
    class PersonContact {
    Long eAddressCpId;
    ElectronicAddress eAddress;
    I use field access (in my orm files) and queries/inserts/etc work without an issue. The fields are both in the class as well as in the orm files. But on startup of the application, the JPA configuration load spits out warnings:
    2011-02-22 15:38:10,785 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.contactpoint.ElectronicAddress.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    If I change my field names to be from eAddress to electronicAddress and eAddressCpId to electronicAddressCpId , then I don't get these warnings.
    Is there requirements around the field names?
    Thanks..jay

    Hi,
    If you have this PersonContact.eAddress in your mapping file, Hibernate will look in PersonContact for
    1 a public field called eAddress
    2 a public member method called getEAddress (Or geteAddress).
    3 a public member method called isEAddress(Or isAddress)
    Your fields aren't public, so my guess is that getEAddress is found. From this "get" is stripped away and the rest is "decapitalized".
    This decapitalize method has these lines:
    if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
          Character.isUpperCase(name.charAt(0))){
                 return name;
    }So yes, I think there is a requirement with fields names. (Or rather getter names, since fields aren't decapitalized)
    You could try and change your mapping file into PersonContact.EAddress to see if I'm right.
    Btw, I am not a Java programmer, so this is what I could manage from a poor mans view at this (Open) source of Hibernate's.
    Regards
    Peter

  • Is there a way to rename multiple form field names with a "b" at the end?

    I have a two page form, both are identical.  I need to rename all the field names on page 2 with a "b" at the end of the file name so they dont conflict with that of the first page.  Is there any fast way of doing this without renaming each individual one at at time?  I have a LOT to do!

    It's not possible with JavaScript. The name property of a field is read-only.
    I would suggest making a template from the first page and then spawn a new page from it.
    If you do it from a script make sure you set the bRename property to true and the form fields will be automatically renamed, but you can't specify the name, it will be in following pattern:
    P<Page Number>.<Template Name>.<Original Field Name>

  • Hi All, I am using iphone in UAE and ipad in India usinging same apple id. Earlier I could do imessage  to my Ipad with different name but with  software update,I am unable to do, as signing id for the iphone and ipad is same.How to restore back

    Hi All, I am using iphone in UAE and ipad in India usinging same apple id. Earlier I could do imessage  to my Ipad with different name but with  software update,I am unable to do, as signing id for the iphone and ipad is same.How to restore back

    I believe because you migrated from a Nokia to an iPhone you need to register the Bn phone number with your Apple ID so it can be used for iMessage. The Pn number seems to be the only one registered
    Go here > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Manage your Apple ID and see if that does the trick
    Hope that helps

Maybe you are looking for