Mapping is inserting multiple records from a single source to Dimension.

Hi All,
I am very new to OWB. Please help me out. I've created Dimension with the help of the wizard and then a mapping which consist of single source and single dimension. The mapping is populating nearly 500 times of the actual records. Following are some details to give you a better understanding of mapping: I created a dimension with four levels and two hierarchy. Levels are L1, L2, L3 and L4 and hierarchies are H1-> L1, L2 and L4
and H2-> L3 and L4. L4 is lowest level of hierarchy. L1 and L3 are parent levels in the respective hierarchies. I assigned an attribute of each level as Business identifier that means business identifier attribute is different in each level. In mapping I mapped the parent natural key(Key for parent Level in a hierarchy) as the value which has been mapped for parent level. The result is coming 500 times of the record that exist in source table. I've tried even single common business identifier for each level but again the result is 5 times of the records. Please let me know the solution.
Thanks is advance.
Amit

Hi ,
You may not be having multiple records in your dimension.
To understand better the records insertion, try a snow flake version of the dimension and see how the records are inserted as per the levels in the respective tables.
Thanks

Similar Messages

  • How to insert multiple records in a single query

    Dear all,
    Can you please tell
    how to insert multiple records in a single query ??

    INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
    INSERT INTO table_name
    (column_1, column_2)
    SELECT 'value_A', 'value_B' FROM DUAL
    UNION ALL
    SELECT 'value_C', 'value_D' FROM DUAL
    ;Edited by: Benton on Nov 9, 2010 1:59 PM

  • How do I insert multiple rows from a single form ...

    How do I insert multiple rows from a single form?
    This form is organised by a table. (just as in an excel format)
    I have 20 items on a form each row item has five field
    +++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
    +Product| qty In | Qty Out | Balance | Date +
    +------------------------------------------------------------------------+
    +Item1 | textbox1 | textbox2 | textbox3 | date +
    + |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
    +------------------------------------------------------------------------+
    +Item 2 | textbox1 | textbox2 | textbox4 | date +
    + |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
    +------------------------------------------------------------------------+
    + Item3 | textbox1 | textbox2 | textbox3 | date +
    +------------------------------------------------------------------------+
    + contd | | | +
    +------------------------------------------------------------------------+
    + item20| | | | +
    +------------------------------------------------------------------------+
    + + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Database Structure
    +++++++++++++++++
    + Stock_tabe +
    +---------------+
    + refid +
    +---------------+
    + item +
    +---------------+
    + Qty In +
    +---------------+
    + Qty Out +
    +---------------+
    + Balance +
    +---------------+
    + Date +
    +++++++++++++++++
    Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
    Please anyone help me out, on how to get this concept started.

    Hello,
    I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
    Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
    Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
    I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
    Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
    In your code view, the Custom Trigger will look something like this:
    function Trigger_Custom(&$tNG) {
    if($tNG->getColumnValue("Item_1")) {
    $item1 = $tNG->getColumnValue("Item_1");
    $textbox1_1 = $tNG->getColumnValue("Textbox_1");
    $textbox1_2 = $tNG->getColumnValue("Textbox_2");
    $textbox1_3 = $tNG->getColumnValue("Textbox_3");
    $date1 = $tNG->getColumnValue("Textbox_3");
    $queryAdd = "INSERT INTO Stock_table
    (item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
    $result = mysql_query($queryAdd) or die(mysql_error());
    This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
    $tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
    // Add columns
    $customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
    There will be one for each field you created with the Custom Form Wizard.
    Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
    Hope this helps.
    Shane

  • Insert multiple records from web dynpro

    Hi,
    How to insert multiple records from web dynpro applications to SAP backend system ?
    Thanks,
    sowmya

    Hi soumya..
       if want to multiple row selected  then save into the Sap back End..
       value node--table.
    Backend value node=table_bapi_input;
       back end internal table --tableback.
    int size=wdcontext.nodeTable().size();
    int lead=wdcontext.nodeTable().getLeadSelection();
    table_bapi_input in=new table_bapi_input();
    wdcontext.nodetable_bapi_input().bind(in);
       for(int i=size-1;i>0;i--){
    tableback set=new tableback()
    if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){
    set.setName(wdContext.nodeTable().getTableElementAt(i).getName();
    in.addZc_input(set);
    wdContext.currenttable_bapi_inputElement().modelobject().excute();
    wdContext.nodeOutput().invalidate();
    thanks
    jati

  • Inserting multiple records from a QofQ?

    I'm doing (still!) an app for parents to sign up for
    information from their child's school, and giving them the option
    to choose more than one grade using checkboxes. I'm passing the
    grades as a string, then parsing them into individual searchable
    grades, and then querying the db to see if that email/school/grade
    subscription already exists. If it doesn't exist, I want to add it
    to the db. Using CFDUMP, I've verfied that I'm extracting the
    correct records to add.
    I've attached the query that selects the records to be added,
    and then my current INSERT query (which chokes on "INSERT") -- I've
    tried putting brackets around INSERT per the CFWACK, but that
    didn't work either. The error is "Query of Queries syntax error;
    Encountered INSERT".

    I can see a couple things wrong with your code -
    1) You shouldn't need to apply the following restrictions to
    your subsToAdd query as you already apply them to your Ignatz
    query:
    (Email = '#Form.Email#') AND (LocationCode =
    #Form.LocationCode#)
    2) For your insert statement, you want to surround the entire
    SQL statement with the <cfloop> block:
    <cfquery name="saveSubs" dbtype="query">
    <CFLOOP query="subsToAdd">
    INSERT INTO ...
    </CFLOOP>
    </cfquery>
    3) You're probably also recieving an error because you aren't
    qualifying your text fields (like Email) with single quotes. A
    better solution would be to use the <cfqueryparam> tags with
    your query - plus it will make your SQL run faster as well!
    INSERT INTO Subscriptions (Email,LocationCode,GradeID)
    VALUES (<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
    value="#Email#" maxlength="50">,
    <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
    value="#locationCode#" maxlength="30">,
    <cfqueryparam cfsqltype="CF_SQL_INTEGER"
    value="#gradeID#">)
    (I took a guess as to the datatypes of your fields, you'll
    have to adjust them accordingly).

  • How to insert multiple values from a single LOV box...?(cont)

    Hi..I have a medical form and under the conclusions box, I have set up a LOV with various values. That part works fine.
    The thing is I do not want to pick a single value. The format which I write in the conclusions in that box is
    1. "............"
    2. " "
    3...etc...
    But when I go to choose the 2nd value, it replaces the first one I had inserted. Any tips please??

    "My way", should have done exactly that. Every time you open the lov and choose a value it should be aapended to the already existing value in the textfield (assuming taht the length of the textfield is long enough)."
    -Well thats the thing, If I try to add more than one value into ONE text field when I open up the LOV..it just replaces the first value with teh second value. Right now wihtout the LOV this is the format it gets stored into the database. The conclusions are typed in manually and when i query from sql plus it comes the way I typed it in. For example:
    1. Mild concentric LVH
    2. Normal LV systolic function ; EF 75 %
    3. Diastolic dysfunction
    I just copy/pasted that from sql. This is saved in a column in a table named ProcedureSummary. I want to insert values exactly this way into one field. Except when i do that currently with the LOV, it replaces the old value with a new value.
    I hope i make sense, sorry for the bother!

  • Insert multiple files from a single form

    i'm trying to create a form to allow users to upload and attribute 10 image files at once to a single table. i followed the howto document:
    http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.html#MANUAL
    and was able to create a form w/ten blank rows for insertion. however, the htmldb_item package that is used to write out the form controls does not provide an api to write out a file browse form control. is there another api i can use? if not is there a known kludge?

    Scott,
    i modified your suggestion and came up w/a more straight forward solution. here's the complete solution...
    1. create a report based on a sql query:
    select
    x.IMG_SKEY
    ,x.IMG_TITLE_TX
    ,x.IMG_SRCH_KEYWORDS_TX
    ,x.file_browse
    ,x.CATEGORY_CD
    from
    (select
    htmldb_item.hidden(1,IMG_SKEY) img_skey
    ,htmldb_item.text(2,IMG_TITLE_TX,12) img_title_tx
    ,htmldb_item.text(3,IMG_SRCH_KEYWORDS_TX,12) img_srch_keywords_tx
    ,'<input type="file" name="f50" size="30">' file_browse
    ,htmldb_item.select_list_from_query(4,null,'select category_name_tx , category_cd from image_categories order by 1',null,'NO',null,null,null,null,'NO') CATEGORY_CD
    from "#OWNER#"."IMAGES"
    where rownum < 0
    union all
    select
    htmldb_item.hidden(1,null) img_skey
    ,htmldb_item.text(2,null,12) img_title_tx
    ,htmldb_item.text(3,null,12) img_srch_keywords_tx
    ,'<input type="file" name="f50" size="30">' file_browse
    ,htmldb_item.select_list_from_query(4,null,'select category_name_tx, category_cd code_value from image_categories order by 1',null,'NO',null,null,null,null,'NO') CATEGORY_CD
    from dual
    union all
    select
    htmldb_item.hidden(1,null) img_skey
    ,htmldb_item.text(2,null,12) img_title_tx
    ,htmldb_item.text(3,null,12) img_srch_keywords_tx
    ,'<input type="file" name="f50" size="30">' file_browse
    ,htmldb_item.select_list_from_query(4,null,'select category_name_tx, category_cd code_value from image_categories order by 1',null,'NO',null,null,null,null,'NO') CATEGORY_CD
    from dual
    note: union the null selects to get as many null rows as you want. i named the file control f50 to avoid conflicts. this control name is an array parameter in the wwv_flow.accept procedure that the form submits to. also, i unioned the null selects to the original table query which fetches no rows. this probably isn't necessary, but i left it in from the original example and had it select nothing because i wasn't sure if htmldb refrenced the column datatypes at all.
    2. create a page item with the same name as your file control(f50) and change the display = never.
    question: Scott, can you give me some insight into why you need this page item for the files to be uploaded. the files won't upload w/o the page item.
    3. create a submit button which submits the page to itself. *make sure the button "database action = SQL INSERT action" or your files will not be uploaded to the wwv_flow_file_objects$ table
    4. create a process to handle the processing of the form:
    process point - after computations and validations
    run process - once per page visit(default)
    process:
    declare
    v_img_skey number;
    begin
    for i in 1..htmldb_application.g_f50.count
    loop
    if htmldb_application.g_f50(i) is not null then
    begin
         select universal_seq.nextval
         into v_img_skey
         from dual;
    insert into images(
    img_skey
    ,img_title_tx
    ,img_srch_keywords_tx
    ,icat_category_Cd
    ,img_owner_name_tx
    ,img_last_updated_dt
    values(
    v_img_skey
    ,htmldb_application.g_f02(i)
    ,htmldb_application.g_f03(i)
    ,htmldb_application.g_f04(i)
    ,:APP_USER
    ,sysdate
    end;
    end if;
    end loop;
    end;
    note: the value returned from the array htmldb_application.g_f50(i) will be the internal name of the file uploaded. i stripped down my code and removed the sections that move the file from flows_files.wwv_flow_file_objects$ into an image object and inserts it into my custom table, but anyone can use the technical notes on otn and metalink to figure it out.

  • Inserting multiple records into a single mysql entry

    I am creating a glossary for a website. The main database table for this glossary includes fields such as the term, alternative names (for the term- synonyms), and the definition. Some terms have multiple alternative terms. For example,
    term=x
    alternative names= a, b, and c
    definition= whatever
    I want to create a search query that will bring up term x whether the user searches for x, a, b, or c.
    The problem is that all a, b, and c are entered into the same mysql field (alternative names) and should the user search for just 'a' or just 'b', the search will come up blank. This is because that field has all three alternative names and the search will only show term x if the user searches for either 'x' or 'a,b, and c' together. How can I get the database to realize that there are multiple independant records in that field?
    p.s. I would rather not have to create three seperate fields for alternative terms as there can potentially be much more.

    figured it out. I changed the ...OR (alternative names = colname) in the recordset to ...OR (alternative names LIKE %colname%). Works like a charm now- the result of a good night's sleep.

  • How to insert multiple records with a single query?

    Hi,
    I've to save a huge number of installments with their other information such as due on blah blah. Now, I want to add the all of these information at once with a single insert query.
    How can I do that?

    Hi
    What is your source data?
    If the source is external to the SQL Server (like a log file, Excel, CSV, JSON, XML, external application...) you can and should insert it all using Bulk Insert operation.
    Pls clarify what is your source data, and if you need more help using Bulk Insert.
    https://www.simple-talk.com/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/
    http://msdn.microsoft.com/en-us/library/ms188365.aspx
    [Personal Site] [Blog] [Facebook]

  • Inserting multiple records into a database from a table

    I have a dynamic table with rows upto 10. i am trying to insert all the records in these rows into a database ( msaccess)
    table name: Table1 ( in my form )
    Database table : movies_comments ( as posted in stefan's forums ).
    table columns: username, movieid, comments
    i am using the following code.
    Database.ExecSQL() function is as posted in stefcamerons forums.
    var tlength = xfa.resolveNode("form1.#subform[0].Table1.Row1[*]").length;
    xfa.host.messageBox("tlength is :" +tlength);
    for ( var i = 1; i <= tlength; i++)
    var username = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].user_name").rawValue;
    var movieID = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].movie_id").rawValue;
    var commentS = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].comment_").rawValue;
    Database.ExecSQL("INSERT INTO movie_comments (username, movieId, comment) VALUES ('username','movieID', 'commentS');");
    i am trying to insert multiple records using the code above. But i am getting error
    GeneralError: Operation failed.
    XFAObject.resolveNode:1:XFA:form1[0]:#subform[0]:Button1[0]:click
    SOM expression returned list when single result was expected
    suggest me an alternate way to insert multiple records from a table into a database.
    thank Q

    figured it out. I changed the ...OR (alternative names = colname) in the recordset to ...OR (alternative names LIKE %colname%). Works like a charm now- the result of a good night's sleep.

  • MessageTransformBean - SimplePlain2XML - Multiple records on a single line

    Hi,
    I am trying to convert multiple record from a single line to multipe rows in an XML message with the MessageTransformBean.
    If the record look like this it's working:
    RECORD1textETC
    RECORD2textETC
    But the incoming message are all on a single line:
    RECORD1textETCRECORD2textETC
    Is there a way to add a linefeed to my incoming message after X characters, or to tell the adapter to split by length instead of spliting on the end of line?
    Thanks,
    Martin

    I had to code a custom Module Adapter to do it.
    Here's the main part of the module adapter EOLConvertBean...
    Message msg = (Message) inputModuleData.getPrincipalData();
    XMLPayload xmlpayload = msg.getDocument();
    byte[] content = xmlpayload.getContent();
    byte crlf = 0x0A; // end of line char
    int current = 0;  // current bytes read     
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int lines = content.length / recordLen; // record len = insert EOL after X recordLen
    // TODO change for do while for 1x line record
    for (int i = 0; i <= lines; i++) {
         baos.write(content, current, recordLen);
         baos.write(crlf);
         current += recordLen;
    xmlpayload.setContent(baos.toByteArray());
    inputModuleData.setPrincipalData(msg);
    Edited by: Martin Lavoie Rousseau on Oct 6, 2010 9:08 PM

  • Inserting multiple records in to database table using webdynpro abap

    Hi all,
    I have created a username inputfield,a button and a table
    with one coloumn.
    If i enter  names in the input field then the values should be
    displayed in that table.
    Even i have got the answer i am not able to insert
    the values in to database(ztable) table.
    i.e. only one value(1st) was inserted the second value was
    not inserted ....
    so kindly send me the coding to insert multiple records
    into the database table......
    by,
    ranjith

    hi Ranjith,
    If you want to insert multiple records from the webdynpro view table to database table then try the following code.
    DATA lo_nd_tablenode TYPE REF TO if_wd_context_node.
      DATA lo_el_tablenode TYPE REF TO if_wd_context_element.
      DATA ls_tablenode TYPE wd_this->element_tablenode.
      DATA it_tablenode LIKE STANDARD TABLE OF ls_tablenode.
      navigate from <CONTEXT> to <tablenode> via lead selection
      lo_nd_tablenode = wd_context->get_child_node( name = wd_this->wdctx_tablenode ).
      get element via lead selection
      lo_el_tablenode = lo_nd_tablenode->get_element(  ).
      get all declared attributes
      lo_nd_tablenode->get_static_attributes_table(
      IMPORTING
        table = it_tablenode ).
    MODIFY databasetablename FROM TABLE  it_tablenode.
    here it_tablenode is the internal table which holds the value from webdynpro view..
    Regards,
    Shamila.

  • Creating multiple records from 1 record in the source file for Import DM

    Hi Experts,
    Today I am working on an interface/import where I want to get the following result:
    Source file contains a records like:
    Account, Entity, DriverX
    Sales,EntityA,ZZ
    The BPC appset contains the 2 dimensions Account and Entity next to CostCenter dimension. The DriverX field in the source file is just additional information in the source file. However based on this DriverX we need to determine what CostCenter to choose but we also need to have the same record assigned to a second record in BPC.
    Following my example, based on DriverX value I need to create 2 records:
    Account, Entity, CostCenter,
    Sales,EntityA,CC1
    Sales,EntityA,CC2
    I don't have a problem assigning the record to 1 CostCenter based on DriverX value but I have a problem creating my second record. Does any of you have had the same "challenge" and if so would you like to share the solution for this?
    Best regards,
    Johan
    PS: I am working on SAP BPC, version 7.0 Microsoft version.

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

  • Insert Multiple Records and newest record id

    The problem I have is I am using a somewhat normalized
    database and I am trying to enter multiple records from a form into
    a table called catfit. It also needs to add information to another
    table called prodmat and pull the id of the record I just added to
    the prodmat table and insert it into the catfit table in one shot.
    Promat - Holds all of the products
    columns in this table
    prodid
    mold
    desc
    features
    pic
    Catfit - Table that links Prodmat and Modcats
    columns in this table
    prodid
    catid
    modlid
    Now the form I have
    <form method="post" action="action.cfm">
    <select name="modlid">
    <option value ="#modlid#"
    selected="selected">#modlid#</option>
    <option value="1">Sewing Machines</option>
    <option value="9">Vacuums</option>
    <option value="12">Air Purifiers</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <select name="catid">
    <option value ="#catid#"
    selected="selected">#catid#</option>
    <option value="None">None</option>
    <option value="1">Sewing
    Machines-Embroidery</option>
    <option value="2">Sewing
    Machines-Computerized</option>
    <option value="3">Sewing
    Machines-Professional</option>
    <option value="4">Sewing
    Machines-Quilting</option>
    <option value="5">Sewing
    Machines-Electronic</option>
    <option value="6">Sewing Machines-Value
    Machines</option>
    <option value="7">Sewing
    Machines-Sergers</option>
    <option value="8">Sewing
    Machines-Specialty</option>
    <option value="9">Air Purifier</option>
    <option value="10">Vacuums-Upright</option>
    <option value="11">Vacuums-Canister</option>
    <option value="12">Vacuums-Central</option>
    </select>
    <input type="text" name="modl" value="#modl#"
    style="form">
    <input type="text" name="pic" value="#pic#"
    style="form">
    <textarea name="desc" rows="25" cols="60" wrap="virtual"
    value="#desc#">#desc#</textarea>
    <textarea name="features" rows="25" cols="60"
    wrap="virtual" value="#features#">#features#</textarea>
    <input type="submit" value="Submit" style="form"
    name="submit">
    </form>
    I have worked with the action.cfm page to no avail what so
    ever so I won't even post it. Now the prodmat table is the table
    where I need to get the prodid (Autonumber column) for the record
    that was just inserted so I can insert that number into the catfit
    table under the prodid column (number column). So this what I
    hoping to get in the end.
    When someone submits this form it will add the data to the
    prodmat table and grab the prodid generated from the new record.
    Then instert a new record for each of the catid select boxes into
    the catfit table. so something like this.
    If they select all three categories upon the submit it would
    add to the catfit table for each record:
    molid = 1
    catid = 2
    prodid = 16 (for instance this would be the newest record
    added to the prodmat table)
    molid = 1
    catid = 6
    prodid = 16
    molid = 1
    catid = 8
    prodid = 16
    Please help I am loosing my hair over this!

    Azadi Saryev wrote:
    > instead of
    > AND CID=#form.CDI#
    > you have to use something like
    > AND CID IN (<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.CDI#"
    > list="yes">)
    > since #form.CDI# contains a list of values, not a single
    value
    No. Don't do that. It would produce the same results you were
    getting before ie. the values for all three records would be the
    same.
    Number the CDI fields just like you're doing with form.catID.
    So each set of values is grouped by number
    form.catId1, form.CDI1
    form.catId2, form.CDI2
    form.catId3, form.CDI3
    Then extract the values inside your loop and use them in your
    UPDATE
    <cfloop index="LoopCount" from=1
    to=#Val(form.locCount)#>
    <cfset variables.locID= form["locID"& LoopCount] >
    <cfset variables.catid = form["catid" &
    LoopCount]>
    <cfset variables.CDI = form["CDI" & LoopCount]>
    </cfloop>
    Though you may not actually need an UPDATE here. Another
    option might be to do a DELETE of all existing records for a
    product, followed by an INSERT.

Maybe you are looking for