Update two DataSources one Query?

I am building a dynamic site using Dreamweaver CS5 and Coldfusion 9.
Ok after messing with this particular page for almost five hours now and still have not figured this out I thought I would ask someone (anyone that reads this) who has a better clue than me at this.
I made a registration page which gets data put into two separate databases "QBs" table-Customer gets contact info "Access" table-Logininfo gets some contact info and username + password +access level. Now I wanted to create a contact update page to allow the user to change any of the information he/she typed in on the registration page. I wanted both sources to be updated in one submit button because the two sources reference each other on different pages so they both need to be updated with the same info. For instance both sources-tables have a column FullName and it gets used as a session variable throughout the site so if the customer changes either first or last name it needs to be updated in both sources at one instant for the site to maintain operation.
The error I keep getting is this:
Error  Executing Database Query.
[Macromedia][SequeLink JDBC  Driver][ODBC Socket][QODBC] Expected lexical element not found:
The  error occurred in C:\inetpub\wwwroot\CFIDE\testsite\Pages\User  Pages\user_contact_info.cfm: line 97
95 : Email=<cfqueryparam value="#Email#" cfsqltype="cf_sql_carchar" maxlength="75"/>
96 : )
97 : WHERE ListID=<cfoutput>'#Session.ListID#'</cfoutput>
98 :   </cfquery>
99 :   <cfquery datasource="Access">
VENDORERRORCODE
  11015
SQLSTATE
  42000
SQL
   UPDATE Customer SET  VALUES ( Salutation= (param 1) , FirstName= (param 2) , LastName= (param 3) ,  Name= (param 4) , BillAdressAddr1= (param 5) , BillAddressAddr2= (param 6) ,  BillAddressCity= (param 7) , BillAddressState= (param 8) ,  BillAddressPostalCode= (param 9) , Contact= (param 10) , Phone= (param 11) ,  AltPhone= (param 12) , Email= (param 13) ) WHERE ListID='80000025-1246408045'
DATASOURCE
  QBs
Now this is my code for the Query and I will also list my table because maybe there is something I am missing from that. I have a feeling what I am trying to do is not possible??? thus the lack of success in fiddling with the code for hours. Any help is very much appreciated!!!!!!
HEAD:
<cflock scope="Session" type="ReadOnly" timeout="30" throwontimeout="no">
  <cfset MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
  <cfset MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthor ization",DE(""))>
</cflock>
<cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR ListFind("User,Admin",MM_UserAuthorization) EQ 0>
  <cfset MM_referer=CGI.SCRIPT_NAME>
  <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_referer=MM_referer & "?" & CGI.QUERY_STRING>
  </cfif>
  <cfset MM_failureURL="unauthorized.cfm?accessdenied=" & URLEncodedFormat(MM_referer)>
  <cflocation url="#MM_failureURL#" addtoken="no">
</cfif>
<cfquery name="Update_info" datasource="Access">
SELECT ID, FullName, FirstName, LastName, Username, Password
FROM Logininfo
WHERE ID=<cfoutput>#Session.ID#</cfoutput>
</cfquery>
<cfquery name="update_contactinfo" datasource="QBs">
SELECT ListID, Name, FullName, CompanyName, Salutation, FirstName, LastName, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode, Phone, AltPhone, Email
FROM Customer
WHERE ListID=<cfoutput>'#Session.ListID#'</cfoutput>
</cfquery>
<cfquery name="listvariables" Datasource="Access">
SELECT Salutation FROM ListVariables
</cfquery>
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "UpdateContactInformation">
<cfquery datasource="QBs">  
   UPDATE Customer SET
  <cfif IsDefined('form.salutation') and len(form.salutation) NEQ 0>
  <cfset #Salutation#=form.salutation/>
  </cfif>
  <cfif IsDefined('form.firstname') and len(form.firstname) NEQ 0>
<cfset #FirstName#=form.firstname/>
  </cfif>
  <cfif IsDefined('form.lastname') and len(form.lastname) NEQ 0>
    <cfset #LastName#=form.lastname/>
    </cfif>
  <cfset Name=#FirstName#&' '&#LastName#/>
  <cfset BillAddressAddr1=#Salutation#&' '&#FirstName#&' '&#LastName#/>
    <cfif IsDefined('form.streetaddress') and len(form.streetaddress) NEQ 0>
    <cfset #BillAddressAddr2#=form.streetaddress/>
  </cfif>
    <cfif IsDefined('form.city') and len(form.city) NEQ 0>
    <cfset #BillAddressCity#=form.city/>
    </cfif>
    <cfif IsDefined('form.state') and len(form.state) NEQ 0>
    <cfset #BillAddressState#=form.state/>
    </cfif>
  <cfif IsDefined('form.zipcode') and len(form.zipcode) NEQ 0>
    <cfset #BillAddressPostalCode#=form.zipcode/>
    </cfif>
<cfset Contact=#FirstName#&' '&#LastName#/>
  <cfif IsDefined('form.dayphone') and len(form.dayphone) NEQ 0>
    <cfset #Phone#=form.dayphone/>
  </cfif>
  <cfif IsDefined('form.eveningphone') and len(form.eveningphone) NEQ "">
    <cfset #AltPhone#=form.eveningphone/>
  </cfif>
  <cfif IsDefined('form.email') and len(form.email) NEQ "">
    <cfset #Email#=form.email/>
  </cfif>
VALUES (
Salutation=<cfqueryparam value="#Salutation#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
FirstName=<cfqueryparam value="#FirstName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
LastName=<cfqueryparam value="#LastName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
Name=<cfqueryparam value="#Name#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
BillAdressAddr1=<cfqueryparam value="#BillAddressAddr1#" cfsqltype="cf_sql_varchar" maxlength="80"/>,
BillAddressAddr2=<cfqueryparam value="#BillAddressAddr2#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
BillAddressCity=<cfqueryparam value="#BillAddressCity#" cfsqltype="cf_sql_varchar" maxlength="50"/>,
BillAddressState=<cfqueryparam value="#BillAddressState#" cfsqltype="cf_sql_varchar" maxlength="25"/>,
BillAddressPostalCode=<cfqueryparam value="#BillAddressPostalCode#" cfsqltype="cf_sql_varchar" maxlength="13"/>,
Contact=<cfqueryparam value="#Contact#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
Phone=<cfqueryparam value="#Phone#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
AltPhone=<cfqueryparam value="#AltPhone#" cfsqltype="cf_sql_varchar" maxlength="15"/>,
Email=<cfqueryparam value="#Email#" cfsqltype="cf_sql_carchar" maxlength="75"/>
WHERE ListID=<cfoutput>'#Session.ListID#'</cfoutput>
  </cfquery>
  <cfquery datasource="Access">
UPDATE Logininfo SET
<cfif IsDefined('form.firstname') and len(form.firstname) NEQ 0>
<cfset #FirstName#=form.firstname/>
</cfif>
<cfif IsDefined('form.lastname') and len(form.lastname) NEQ 0>
<cfset #LastName#=form.lastname/>
</cfif>
<cfset FullName=#form.firstname#&' '&#form.lastname#/>
<cfif IsDefined('form.username') and len(form.username) NEQ 0>
<cfset #Username#=form.username/>
</cfif>
<cfif IsDefined('form.password') and len(form.password) NEQ 0>
<cfset #Password#=form.password/>
</cfif>
VALUES (
FullName=<cfqueryparam value="#FullName#" cfsqltype="cf_sql_varchar" maxlength="80"/>,
FirstName=<cfqueryparam value="#FirstName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
LastName=<cfqueryparam value="#LastName#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
UserName<cfqueryparam value="#Username#" cfsqltype="cf_sql_varchar" maxlength="41"/>,
Password=<cfqueryparam value="#Password#" cfsqltype="cf_sql_varchar" maxlength="41"/>
WHERE ID=<cfoutput>'#Session.ID#'</cfoutput>
</cfquery>
<cflocation url="updated_contactinfo.cfm">
</cfif>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/customer_template.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="title" --><title>Update Contact Information</title><!-- InstanceEndEditable -->
<link href="../../styles/Main.css" rel="stylesheet" type="text/css">
<script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->
<script src="../../SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script><script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />
<link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css"><!-- InstanceEndEditable --></head>
BODY:
<body>
<div id="Container">
  <div id="header"><img src="../../Images/Website-Image.gif" width="393" height="217" alt="TS Landscaping Logo and Name of company"></div>
  <div id="menu_bar1">
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a class="MenuBarItemSubmenu" href="../../index.cfm">Home</a>
        <ul>
          <li><a href="#">Item 1.1</a></li>
          <li><a href="#">Item 1.2</a></li>
          <li><a href="#">Item 1.3</a></li>
        </ul>
      </li>
      <li><a href="#">About Us</a></li>
      <li><a href="#">Services</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">User Account</a>
        <ul>
          <li><a href="../../login.cfm">Login</a></li>
          <li><a href="../../registration_page_contact.cfm">Register</a></li>
          <li><a href="../../members_page.cfm">Customer Page</a></li>
        </ul>
      </li>
      <li><a href="#">Contact Us</a></li>
    </ul>
  </div>
  <div id="Main">
    <div id="side_bar"><!-- InstanceBeginEditable name="sidebar" -->Content for  id "side_bar" Goes Here<!-- InstanceEndEditable --></div>
    <div id="main_body">
<p align="left"><a href="../../invoice_page.cfm">Customer Invoices</a> | <a href="../../service_request_page.cfm">Request Services</a> | <a href="user_contact_info.cfm">Change Contact Info</a></p>
      <hr>
<!-- InstanceBeginEditable name="mainbody" -->
<h1><cfoutput>#Session.FullName#</cfoutput> Contact Information</h1>
<table width="auto" border="1">
  <tr>
    <td><div align="center">Update Your Contact Information</div></td>
    </tr>
  <tr>
    <td> 
      <form method="post" name="UpdateContactInformation" action="<cfoutput>#CurrentPage#</cfoutput>">
        <table align="center" >
          <tr valign="baseline">
            <td nowrap align="right"><div align="right"><label for="salutation">Salutation</label></div></td>
            <td><select name="salutation" id="salutation" accesskey="n" tabindex="15">
              <cfoutput query="listvariables">
                <option value="#listvariables.Salutation#" <cfif (isDefined("Session.Salutation") AND listvariables.Salutation EQ Session.Salutation)>selected="selected"</cfif>>#listvariables.Salutation#</option>
              </cfoutput>
            </select>
              <tr valign="baseline">
                <td nowrap align="right"><div align="right">FirstName:</div></td>
                <td><input type="text" name="FirstName" id="firstname" value="<cfoutput>#update_contactinfo.FirstName#</cfoutput>"  size="32"></td>
                </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">LastName:</div></td>
            <td><input type="text" name="LastName" id="lastname" size="32" value="<cfoutput>#update_contactinfo.LastName#</cfoutput>"></td>
            </tr>
          <tr valign="baseline" >
            <td nowrap align="right"><div align="right">Street Address:</div></td>
            <td><input type="text" name="streetaddress" id="streetaddress"  size="32" value="<cfoutput>#update_contactinfo.BillAddressAddr2#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">City:</div></td>
            <td><input type="text" name="city" id="city"  size="32"value="<cfoutput>#update_contactinfo.BillAddressCity#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">State:</div></td>
            <td><input type="text" name="state" id="state" size="32" value="<cfoutput>#update_contactinfo.BillAddressState#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">Zip Code:</div></td>
            <td><input type="text" name="zipcode" id="zipcode" size="32"value="<cfoutput>#update_contactinfo.BillAddressPostalCode#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">Day Phone:</div></td>
            <td><input type="text" name="dayphone" id="dayphone" size="32" value="<cfoutput>#update_contactinfo.Phone#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">Evening Phone:</div></td>
            <td><input type="text" name="eveningphone" id="eveningphone"  size="32" value="<cfoutput>#update_contactinfo.AltPhone#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">Email:</div></td>
            <td><input type="text" name="email" id="email" size="32" value="<cfoutput>#update_contactinfo.Email#</cfoutput>"></td>
            </tr>
          <td nowrap align="right"><div align="right">Username:</div></td>
            <td><input type="text" name="username" id="username" size="32" value="<cfoutput>#update_info.Username#</cfoutput>"></td>
            </tr>
          <tr valign="baseline">
            <td nowrap align="right"><div align="right">Password:</div></td>
            <td><input type="password" name="password" id="password" accesskey="n" tabindex="45" size="32" value="<cfoutput>#update_info.Password#</cfoutput>"></td>
            </tr>
          <td nowrap align="right"><div align="right"><label for="confirmpassword">Confirm Password:</label></div></td>
            <td><span id="spryconfirm1">
              <input type="password" name="confirmpassword" id="confirmpassword" accesskey="n" tabindex="50" size="32">
              <span class="confirmRequiredMsg">A value is required.</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
            </tr>
          <tr valign="baseline">
            <td colspan="2" align="right" nowrap><div align="center">
              <input type="submit" value="Update Contact Info">
              </div></td>
            </tr>
          </table>
        <input type="hidden" name="MM_UpdateRecord" value="UpdateContactInformation">
        </form>
      <p> </p></td>
    </tr>
</table>
<p> </p>
<script type="text/javascript">
var spryconfirm1 = new Spry.Widget.ValidationConfirm("spryconfirm1","password");
</script>
    <!-- InstanceEndEditable -->
    </div>
  </div>
  <div id="footer">
    <p>Home | About Us | Site Map </p>
    <p>&copy; TS Landscaping LLC 2010</p>
  </div>
</div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
</body>
<!-- InstanceEnd --></html>

Meensi just wanted to update you so you didn't put to much time into my problem I have discovered this line of code to work. Obviously it does not include all that I want to update but tomorrow I will add in each line and test as I go to see where I get the error. So far now I think I am at a point where I can figure this out. I am sure there is some value in the database that can't be updated although I looked at the charts for the databases and they all said UPDATABLE I am thinking maybe a typo but I'll find out tomorrow. Thanks again for you help!
<cflock scope="Session" type="ReadOnly" timeout="30" throwontimeout="no">
  <cfset MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
  <cfset MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthor ization",DE(""))>
</cflock>
<cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR ListFind("User,Admin",MM_UserAuthorization) EQ 0>
  <cfset MM_referer=CGI.SCRIPT_NAME>
  <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_referer=MM_referer & "?" & CGI.QUERY_STRING>
  </cfif>
  <cfset MM_failureURL="unauthorized.cfm?accessdenied=" & URLEncodedFormat(MM_referer)>
  <cflocation url="#MM_failureURL#" addtoken="no">
</cfif>
<cfquery name="Update_info" datasource="Access">
SELECT ID, FullName, FirstName, LastName, Username, Password
FROM Logininfo
WHERE ID=<cfoutput>#Session.ID#</cfoutput>
</cfquery>
<cfquery name="update_contactinfo" datasource="QBs">
SELECT ListID, Name, FullName, CompanyName, Salutation, FirstName, LastName, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode, Phone, AltPhone, Email
FROM Customer
WHERE ListID=<cfoutput>'#Session.ListID#'</cfoutput>
</cfquery>
<cfquery name="listvariables" Datasource="Access">
SELECT Salutation FROM ListVariables
</cfquery>
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "UpdateContactInformation">
<cfset #FistName#=Form.FirstName/>
<cfquery datasource="QBs">
UPDATE Customer Set
FirstName=<cfqueryparam value='#FirstName#' cfsqltype="cf_sql_varchar" maxlength="41"/>
WHERE ListID=<cfoutput>'#Session.ListID#'</cfoutput>
</cfquery>
<cfset #FirstName#=Form.FirstName/>
<cfquery datasource="Access">
UPDATE Logininfo Set
FirstName=<cfqueryparam value='#FirstName#' cfsqltype="cf_sql_varchar" maxlength="41"/>
WHERE ID=<cfoutput>#Session.ID#</cfoutput>
</cfquery>
<cflocation url="updated_contactinfo.cfm">
</cfif>

Similar Messages

  • 152 MB update, TWO iphones, one download?

    Do I need to do anything special so I can update two iPhones without needing to download the large update a second time. I have DSL but it is still a decent amount of time...any thoughts?
    Thanks,
    FatherTime

    If you are using the same computer and same user on that computer for both phones, a single download should be all that is required.

  • One infosource two datasources

    Hi Friends,
    I have the following task.
    I have two data sources, one with actual data and one with planning data.
    Now I want to create an infocube with both the actual and the planning data and one or two aditional fields for the difference
    between actual and planning data.
    I have created the data sources, I have created on infocube with all the fileds from the two datasources.
    When I have created two transformation from datasouces to infosource and one from infosource to the infocube.
    But when I want to create the DTP for the infocube, it asks me to choose between the two datasources.
    How can I go on with it.
    Is there a docu how to handle two datasources, one infosource and one infocube or how else can I do it?
    Thanks in advance.
    RG. Jimbob

    Hi Jim,
    If i am getting you correctly , you need to create one cube with Actual key Figure and Planned Key Figure so that you can calculate the variance.
    In this case, i would suggest you to not add value type in the cube. ( Just have it till the info source).Then write a routine for Actua Key Figure and Planned Key Figure.
    i.e IF VTYPE = 10 populate actuals else populate planned key figure.
    As in any situation if u have value type info object in cube, you will always get tw records in the cube based on value type, even if all other characteristics are same.
    In the scenario where 2 records are generated, if u run a report without dragging value type , it will aggregate both the records as you are expecting.
    Hope this solves your problem.
    Thanks,
    Vikram

  • Grouped and non-grouped SELECT in one query: help!

    look first at: Wrong result when I use CASE on this forum. Here I wanted to get the user who created and the user who solved a problem (Lets call it Validation Error from now on (VE)).
    The thing is: I already have a query who returns me lots of information about a VE.
    The query in the previous thread returned me additional info about that VE (that is the creating_user and the solving_user). The 1st query is no group select, but the second is! Still, I need to combine those two in one query.
    1st query:
    select ve.seq,
         max((case vah.action when 'C' then vah.ur_code else null end)) created,
         max((case vah.action when 'S' then vah.ur_code else null end)) solved
    from validation_errors ve
    left outer join ver_action_histories vah
    on (ve.seq = vah.ver_seq AND ve.log_date = vah.ver_log_date)
    where ve.seq = 12860687
    group by ve.seq;Result:
    seq       | created | solved
    12860687    Bob       Bobdont mind the "where"-clause, it is just to make the query go faster
    what I do is: I join the VE with the ver_action_histories table which contains the users and what action they performed on a VE.
    Now I just want to add that information to the results of an other query which also returns lots of information about a VE.
    2nd query:
    select ve.seq "VE seq", mh.seq "Counter seq",
              ve.log_date, ve.solve_date, ve.solved Status, ve.failure_code, ve.mde_code,
              mh.meter_type,
              iv.mr_type, iv.mr_reason,
              ih.mmr_seq
    from validation_errors ve
    inner join meter_histories mh
    on (ve.mhy_seq = mh.seq)
    left outer join index_values iv
    on (ve.mhy_seq = iv.mhy_seq AND ve.log_date =iv.timestamp)
    left outer join index_histories ih
    on (ve.mhy_seq = ih.ive_mhy_seq)
    where ve.seq = 8653936
    and sysdate >= mh.start_date
    and sysdate < mh.end_date;dont mind the "where" and "and"-clauses ... I hope the result of this query will simplify things ...
    Result:
    seq        |   counter seq | log_date | solved_date | status    | failure_code | ...
    12860687       4568          1-jan-06   2-jan-06      Solved      ABCNow the actual question: Is it possible to combine those queries in one query? I just want the results of the first query (creating_user and solving_user) to be added as columns to the second result. Performance is very important. Please tell me that its possible?
    Wanted Result:
    seq        |   counter seq | log_date | solved_date | status    | failure_code | created  | solved  | ...
    12860687       4568          1-jan-06   2-jan-06      Solved      ABC            Bob        BobIf anything I explained is unclear, please tell so I can try to explain it in an easier way.

    Try an in line view:
    select *
    from
    ( <your first query goes here > ) a
    , ( <your second query goes here > ) b
    where a.seq = b.seq

  • Update SAME column name in two tables from ONE query

    Dear All Seniors
    Please tell me is it possible to update a same column name in two tables.
    I have two tables in same schema
    (1)table name
    pem.igp_parent
    column name
    igp_no.
    igp_type
    (2)table name
    pem.igp_child
    column name
    igp_no.
    igp_type
    i want to update igp_no column in one query please tell me how it would be possible.
    thanks
    yassen

    You want to update the data from what to what? Where is the new data coming from?
    If you are trying to put the same data in two different tables, that strongly implies that you have a normalization problem that needs to be addressed.
    Why do you want a single query rather than updating each table in turn? Can you join the two target tables to produce a key-preserved view?
    Justin

  • One Query, Two Datasources

    Is there a way to run a query on two separate datasources? I
    would like to compare the data in two separate MS Access databases.
    Thanks.

    You won't be able to combine two datasources in one cfquery,
    so one way might be for you to query each datasource, then compare
    the two results using a Q-of-Q.
    Phil

  • How can update two rows in one query?

    How can update two rows in one query?
    Edited by: OracleM on May 4, 2009 12:16 AM

    What do you mean with "two rows"? May be two columns??
    If the where clause of UPDATE query matches two rows, then it will update two rows. If you want to update two columns, then add column names to your query
    UPDATE your_table SET col1=value1, col2=value2 WHERE your_where_clause- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to update two different tables by ony one sql query???

    Hi All,
    i need to update two different talbes in a single sql query..
    i m using the following query
    UPDATE FT_User_Alert SET Subscription = 'W' where product_key=1 and measure_key = 12
    AND
    UPDATE LU_Monthly_Alert_Budget_Sheet SET Min_Red_Range ='16.0' AND Max_Green_Range ='24.0'AND Max_Red_Range ='27.0'AND Min_Green_Range ='16.0' where product_key='1' and measure_key = 12
    i m getting the following error:
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement. [nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute: UPDATE FT_User_Alert SET Subscription = 'W' where product_key=1 and measure_key = 12 AND UPDATE LU_Monthly_Alert_Budget_Sheet SET Min_Red_Range ='16.0' AND Max_Green_Range ='24.0'AND Max_Red_Range ='27.0'AND Min_Green_Range ='16.0' where product_key='1' and measure_key = 12 . [nQSError: 17011] SQL statement execution failed. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL writeback UPDATE FT_User_Alert SET Subscription = 'W' where product_key=1 and measure_key = 12 AND UPDATE LU_Monthly_Alert_Budget_Sheet SET Min_Red_Range ='16.0' AND Max_Green_Range ='24.0'AND Max_Red_Range ='27.0'AND Min_Green_Range ='16.0' where product_key='1' and measure_key = 12
    but when i m ushin the same query in Microsoft SQL Server it executes properly:
    please help me out...

    There's no valid syntax for this, but there are some tricks you could do to achieve it.
    i) You could place an update trigger on TABLE1 to update TABLE2 automatically.
    ii) You could define a view across both tables and add an INSTEAD OF UPDATE trigger to it to maintain them.
    If I had to do this I'd choose option2, but frankly I'd just be running two updates if it really was me.

  • I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    You can't merge accounts or copy content to a different account, so anything that you bought or downloaded via the old account is tied to that account - so any updates that those apps get you will only be able to download via that account. You can change which account is logged in on the iPad via Settings > Store

  • How to use one form to update two tables

    How can I do that? HTMLDB wizard or form on table doesn't give me an option to use more than one table in a form or I don't know about it. I created new process which redirects the form to another page after submitting the form. On the second page I created new process which uses the same variables from the previous form page. This process runs on page load before header but it is just not working right.
    So, what is the proper way to update two tables with the same form fields?

    Hello Vikas,
    "The Automatic Row Fetch and Automatic DML processes are a pair, you can't have one without the other."
    Are you sure about that? I have a page, which populate some of the items from TableA, using manual select statement, and after the user input, save some of it in TableB, using Automatic DML. No ARF in this process and it seems to work just fine. Come to think of it, what about a simple form, populated entirely by the user input, and then being saved to the db, using Automatic DML? No ARF here also.
    For the problem in hand, if you can't have more then one Automatic DML per page, I think that the simplest solution will be to define a pl/sql process, with two INSERT statement to the two different tables.
    Regards,
    Arie.

  • I have two computers one 10.5.8 one 10.6.8.  Updated the 10.6.8 and now my mail has disappeared on one computer - do I sync account to get all my mail content back?

    I have two computers one IMac 10.5.8 one MacBookPro 10.6.8.  Updated the MacBookPro 10.6.8 and now my mail has disappeared on that computer - do I sync account to get all my mail content back onto the MacBookPro?

    You can do it. This article from Macworld will be helpful to you:
    http://www.macworld.com/article/161087/2011/07/install_lion_over_leopard.html
    I recommend the "brute-force" method.
    Just make sure you have your data backed up properly!

  • [svn:bz-trunk] 10059: update two package-info.java files, and add one new one.

    Revision: 10059
    Author:   [email protected]
    Date:     2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
    Log Message:
    update two package-info.java files, and add one new one.
    Modified Paths:
        blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
    Added Paths:
        blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
        blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.java

    Revision: 10059
    Author:   [email protected]
    Date:     2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
    Log Message:
    update two package-info.java files, and add one new one.
    Modified Paths:
        blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
    Added Paths:
        blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
        blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.java

  • HAVE BEEN UNABLE TO RETRIEVE MY OLD LIBRARY OF PHOTOS, ALBUMS AND PROJECTS SINCE DOWNLOADING AN APERTURE 3 SOFTWARE UPDATE TWO DAYS AGO.  THE NEW LIBRARY ONLY HAS A FEW NEW PHOTOS IN ONE FOLDER  PLEASE ADVISE AS HOW TO RETRIEVE OLD APERTURE LIBRARY WITH

    HAVE BEEN UNABLE TO RETRIEVE MY OLD LIBRARY OF PHOTOS, ALBUMS AND PROJECTS SINCE DOWNLOADING AN APERTURE 3 SOFTWARE UPDATE TWO DAYS AGO.  THE NEW LIBRARY ONLY HAS A FEW NEW PHOTOS IN ONE FOLDER
    PLEASE ADVISE AS HOW TO RETRIEVE OLD APERTURE LIBRARY WITH ALL MY PHOTOS, ALBUMS AND PROJECTS

    Find the old Aperture library in the Finder and double click it to launch Aperture with that library set to the default.
    And check your caps look key.  It appears to be stuck.

  • One query two different Group By

    In My parameter two option one and two.
    if i select one, need to come this group by:-
    GROUP BY
    Name1,
    Name2,
    Country,
    MCC || '/' | MNC
    One Output:
    Name1 -  Name2 - Country  - PNR
    if i select two, need to come this group by
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    two output :
    Name1 - Country - PNR
    I have only one sql query But i have two different group by
    Please advise me, m not using subreport option.
    whether any formulas or any other options for group by.

    Try inserting the groups statically that are common for both the parameaters like this
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    and now create a formula like this
    whilereadingrecords;
    if =1 then
    {Name2 field}
    else
    Now insert one more group using this formula and move the group to second level by using group options.
    Hope this helps!
    Raghavendra

  • How can i write two ?DDL in one query

    how can i write two ?DDL statment in one query?

    Issuing two DDL statements requires two edxecutions. Getting around it is possible by creating a procedure that issues the two DDL statements. But they would still have to be issues one at a time, but you would only have to write one statement to invoke it.

Maybe you are looking for