Insert and update when locking tables
Update and its grid
Is it possible for me to insert a record and update of 2 fields in another folder, whil the table locking of data base for the process unfold?
If so, how?
Thank you
Pete
The LOCKING command works with the client session (MySQL client).
You can read this link
http://www.brainbell.com/tutors/PHP/php_mysql/When_and_how_to_lock_tables.html
Or this link
http://dev.MySQL.com/doc/refman/5.1/en/lock-tables.html
Is impossible to change the field of PK and AUTO_INCREMENT? You will need special permits to use LOCK. So, maybe you can change the structure of field too.
Tags: Dreamweaver
Similar Questions
-
Insert and update the nested table
Hello
I created a nested table containing the following columns. I need to insert records into the nested table. And also I have to update the nested table. Please find below my table and get error message.
Please advose...!
Can I use '&' while inserting records in the nested table? Yes / No?SQL> create type details as object( 2 basic number(7,2), 3 da number(6,2), 4 hra number(6,2), 5 pf number(6,2), 6 it number(6,2), 7 gross number(7,2), 8 ded number(6,2), 9 net number(8,2)); 10 / Type created. SQL> create type details_t is table of details; 2 / Type created. SQL> ed Wrote file afiedt.buf 1 create table emp_tab(empno number(4),name varchar2(10),details_tab details_t) 2* nested table details_tab store as empl_details SQL> / Table created. SQL> ed Wrote file afiedt.buf 1* insert into emp_tab values(&empno,'&name',details_t(details(&da,&hra,&pf,&it,null,null,null))) SQL> / Enter value for empno: 1 Enter value for name: asdf Enter value for da: 120 Enter value for hra: 130 Enter value for pf: 120 Enter value for it: 120 old 1: insert into emp_tab values(&empno,'&name',details_t(details(&da,&hra,&pf,&it,null,null,null new 1: insert into emp_tab values(1,'asdf',details_t(details(120,130,120,120,null,null,null))) insert into emp_tab values(1,'asdf',details_t(details(120,130,120,120,null,null,null))) * ERROR at line 1: ORA-02315: incorrect number of arguments for default constructor
I do need to update also net gross, ded, columns... !!
Please help me... !!
Concerning
A$ sqlplus scott/tiger SQL*Plus: Release 10.2.0.2.0 - Production on Thu Apr 21 16:18:16 2011 Copyright (c) 1982, 2005, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options SQL> CREATE TYPE details AS OBJECT( basic NUMBER(7,2), da NUMBER(6,2), hra NUMBER(6,2), pf NUMBER(6,2), it NUMBER(6,2), gross NUMBER(7,2), ded NUMBER(6,2), net NUMBER(8,2)); 2 3 4 5 6 7 8 9 10 / Type created. SQL> CREATE TYPE details_t IS TABLE OF details; 2 / Type created. SQL> CREATE TABLE emp_tab(empno NUMBER(4),name VARCHAR2(10),details_tab details_t) NESTED TABLE details_tab store as empl_details 2 3 / Table created. SQL> INSERT INTO emp_tab VALUES(7001,'Saubhik',details_t(details(100,100,50,10,10,null,null,null))); 1 row created. SQL> SELECT * FROM TABLE (SELECT details_tab FROM emp_tab WHERE empno=7001); BASIC DA HRA PF IT GROSS DED ---------- ---------- ---------- ---------- ---------- ---------- ---------- NET ---------- 100 100 50 10 10 SQL> ^C SQL> ed Wrote file afiedt.buf 1 UPDATE TABLE (SELECT details_tab FROM emp_tab WHERE empno=7001) 2 emp_sal 3* SET emp_sal.net=emp_sal.basic+emp_sal.da+emp_sal.hra SQL> / 1 row updated. SQL> SELECT * FRM emp_tab; SELECT * FRM emp_tab * ERROR at line 1: ORA-00923: FROM keyword not found where expected SQL> SELECT * FROM emp_tab; EMPNO NAME ---------- ---------- DETAILS_TAB(BASIC, DA, HRA, PF, IT, GROSS, DED, NET) -------------------------------------------------------------------------------- 7001 Saubhik DETAILS_T(DETAILS(100, 100, 50, 10, 10, NULL, NULL, 250)) SQL>
-
Insert and update by the select statement
Hi all
How can I insert and update in an oracle 10g database table
by a select statement. do not merge.Florian wrote:
Hi all
How can I insert and update in an oracle 10g database table
by a select statement. do not merge.
>How can I insert and update in a table of database oracle 10g via a select statement. do not merge.
Do you mean by using subqueries?
Something like
insert into whatever ...select statement update whatever set (column, column) = (select column, column ...)
There is a lot of information on this topic in the online documentation
-
Add error causing senior in 4.2.1 when inserting and updating same time
Hi all
I have problems with the top to add a line in a table.
There is already a thread here on how to add the line above in table form in version 4.0.
We have recently upgraded to version 4.2.1 Apex.
Since then we have question while inserting a new line and update an existing line at the same time, and then click Save button causing the error below:
Current version of the data in the database has changed since the user initiated the update process. version of current line identifier = "xxxxxx" line application version identifier = "xxxxxx".
But insert a new record and update an existing record works well separately with an error.
Here's the code to add the line at the top of page header HTML<script language="javascript" type="text/javascript"> function addRowTop() { apex.widget.tabular.addRow(); apex.jQuery(apex.widget.tabular.gTabForm).find(".highlight-row").last() .insertBefore(apex.jQuery(apex.widget.tabular.gTabForm). find(".highlight-row").first()); } </script>
If I use by default addRow so absolutely no problem to insert and update at the same time.
Here is the example of work in the workspace apex.
Looks like a bug to me.
Can any of the Oracle team please see this and let us know if it needs a patch.
Thank you
REDA
Not sure that I consider this a bug since you are somehow hacking the default functionality of the APEX. Maybe you could add a feature request 'Add Top line' to https://apex.oracle.com/vote
It seems that you hit some enhancments to safety that have been made to the tabular forms. You should be able to work around it by putting the new lines to the bottom of the form before submitting the page.
Create a dynamic action based on the click of the submit button.
Event: click on
Selection type: button
Button: SUBMIT (Submit)
Condition: - no requirement.
Add real action to run the JavaScript Code:
Action: run the JavaScript Code
Fire when the result of the event is: true
Fire on Page load: [disabled]
Code:
apex.jQuery(apex.widget.tabular.gTabForm).find("input[value=''][name='frowid']").closest(".highlight-row") .insertAfter(apex.jQuery(apex.widget.tabular.gTabForm).find(".highlight-row").last());
Add a real action to send the page:
Action: send the Page
E: Nam request/buttonSUBMIT
-Jeff
-
Create triggers in the table, sequence, insert and update with "model"?
It must be of rtfm, trial and error thing but you wanted to ask, is it possible to have models or similar automation for the following scenario:
1.), I add the table to the logic model
2.) Using glossary I transform a relational model that was recovered / synchronized with the data dictionary
3.) then I have the new table to add
-but
I would then have auto-DDL of to be synchronized to database:
-create sequence for the id column
-create table
-create indexes for the id column pk
-Create triggers for insert and update
-l' idea is to have db_created_dt and db_modified_dt defined in the table, so that each table has them to the fields of record etc.
-activate the triggers
Each of them following the same naming convention.
Similarity with approx. generator Apex workshop utils sql create table of the copy paste "excel" that creates 'id' - column + sequence and insert the trigger.
rgrds Paavo
Hi Paavo,
most of the steps can be made in one or other way
-create sequence for the id column
-create table
-create indexes for the id column pk
If you want to start in the logic model and you don't want to have the ID column in the logic model and select 'Create the surrogate key' checkbox in the dialog entity - you will get an identity column in the relational model and the version of database and settings in ' preferences > Data Modeler > model > physics > Oracle "you can set the sequence generation and the trigger for taking in load.
fields of record defined in the table, so that each table has them
You can add the same set of columns in all tables with the transformation script 'model of Table... ».
You can also look here Oracle SQL Developer Data Modeler 4.1 user - defined DDL generation using transformation scripts
to see how to grant your DDL generation using the transformation script. DM comes with example to generate separate tables of logging and triggers. You can create your build script of triggers that support logging in these common columns.
Philippe
-
Mr President
Jdev worm is 12.2.1
How to modify and update a line later was inserted and updated in the doDML() method?
I added two rows in my table a method of action-listener in bean managed and secondly with operation doDML() as below.
Method 1-first row in managed bean
public void addNewPurchaseVoucher(ActionEvent actionEvent) { // Add event code here... BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator"); RowSetIterator rsi = dciter.getRowSetIterator(); Row lastRow = rsi.last(); int lastRowIndex = rsi.getRangeIndexOf(lastRow); Row newRow = rsi.createRow(); newRow.setNewRowState(Row.STATUS_NEW); rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow); rsi.setCurrentRow(newRow); BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator"); RowSetIterator rsi1 = dciter1.getRowSetIterator(); Row lastRow1 = rsi1.last(); int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1); Row newRow1 = rsi1.createRow(); newRow1.setNewRowState(Row.STATUS_NEW); rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1); rsi1.setCurrentRow(newRow1); }
Method of doDML() of line 2 seconds in the entityImpl class
protected void doDML(int operation, TransactionEvent e) { setAmount(getPurqty().multiply(getUnitpurprice())); if (operation == DML_INSERT) { insertSecondRowInDatabase(getVid(),getLineitem(),getDebitst(), (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } if(operation == DML_UPDATE) { updateSecondRowInDatabase(getVid(),getLineitem(),getDebitst(), (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } super.doDML(operation, e); } private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "Insert into vdet (VID,LINEITEM,DEBITST,AMOUNT) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "')"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } } private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "update vdet set vid='"+ value1+"',lineitem='"+ value2+"',DEBITST='" + value3 + "', AMOUNT='" + value4 + "' where VID='" + VID + "'"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
Now the problem is that when later I change the quantity and price of the first line isn't updated but second row, because I used the command
<af:button actionListener="#{bindings.Commit.execute}" text="Commit"
This button update the first line added by bean managed, but the second row remains unchanged.
Please help how to update the two lines with the same button or something else.
Concerning
DML_UPDATE will call only if there is some change data attributes.
I guess that the update statement is false because vid looks like a primary key for the table, then, how update you the primary key of the update statement and how the update condition statement where the vid = '0'
I assume the update statement should look like:
private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "update vdet set lineitem='" + value2 + "',DEBITST='" + value3 + "', AMOUNT='" + value4 + "' where VID='" + value1 + "'"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
-
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE Production 11.2.0.4.0
AMT for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
I create the structure of the table like that.
create table test1 (a primary key, b (2) char number, date c, d varchar2 (10), date of e);
create table test2 (number of ab, cd (2) tank, date of the ef, gh varchar2 (10), date of the ij, kl varchar2 (100));
Create materialized view log on test1;
create materialized view fast refresh test1_v on commit in select * from test1;
I have create a trigger of the sample
CREATE OR REPLACE TRIGGER test1_trig
AFTER INSERT OR UPDATE OR DELETE
ON test1_v
FOR EACH LINE
DECLARE
lr_test2 test2% ROWTYPE;
lv_error VARCHAR2 (4000);
BEGIN
lr_test2. AB: =: NEW.a;
lr_test2. CD: =: NEW.b;
lr_test2. GH: =: NEW.d;
IF THE INSERTION
THEN
lr_test2. EF: = SYSDATE;
lr_test2.IJ: = SYSDATE;
lr_test2.KL: = 'INSERT ';
INSERT INTO test2
VALUES lr_test2;
ELSIF UPDATE
THEN
lr_test2.IJ: = SYSDATE;
lr_test2.KL: = 'UPDATE ';
UPDATE test2 = lr_test2 ab WHERE = LINE: OLD.a;
ELSIF REMOVAL
THEN
DELETE FROM test2
AB = WHERE: old.a;
END IF;
EXCEPTION
WHILE OTHERS
THEN
lv_error: = SQLERRM;
INSERT INTO XXDOMINO_FG_DATA_LOAD_ERROR
VALUES ('test1_trig',
: OLD.a,.
"test1_trig,"
LV_ERROR,
SYSDATE);
COMMIT;
END test1_trig;
/
So, if check you my code,.
When I insert EF = SYSDATE, IJ = SYSDATE.
Update EF is not changed, IJ = SYSDATE.
So I like to capture their insertion and update dates.
But if updates or insert arrives on the materialized table. The trigger themselves as an INSERT only.
So how do you capture the updates?
I use the statemnet with out merger with performance and also able to capture the update dates.
CREATE OR REPLACE TRIGGER test1_trig_merge
AFTER INSERT OR UPDATE OR DELETE
ON test1_v
FOR EACH LINE
DECLARE
lr_test2 test2% ROWTYPE;
lv_error VARCHAR2 (4000);
BEGIN
IF THE REMOVAL
THEN
DELETE FROM test2
AB = WHERE: old.a;
ELSIF INSERTION
THEN
MERGE INTO test2 one
B using (SELECT 1 FROM DUAL)
WE (ab =: new.a)
WHEN MATCHED
THEN
UPDATE the VALUE ab =: NEW.a.
CD =: NEW.b,
GH =: NEW.c
IJ = SYSDATE,
KL = "Update"
AB WHERE =: old.a
WHEN NOT MATCHED
THEN
INSERTING VALUES (: NEW.a,)
: NEW.b,.
: NEW.c.
: NEW.d,.
: NEW.e,.
"INSERT");
END IF;
EXCEPTION
WHILE OTHERS
THEN
lv_error: = SQLERRM;
INSERT INTO XXDOMINO_FG_DATA_LOAD_ERROR
VALUES ('test1_trig',
: OLD.a,.
"test1_trig,"
LV_ERROR,
SYSDATE);
END test1_trig_merge;
/
DISPLAY ERRORS;
-
INSERT and UPDATE audit generating more lines expected in $ AUD
Environment:
Oracle 11.2.0.3 EE on Solaris
I had a request for verification of the INSERT and UPDATE on the activities of all the tables in a particular schema. It was in anticipation of a request that will live and the owner wanted to see a 'typical' of some test users activity.
Here are the steps I took:
I also "audit_sys_operations = TRUE' so I know I'll take some SYS audit data in $ AUD as well, but I can ask around those."alter system set audit_trail=DB_EXTENDED scope=spfile; Bounce the instance audit INSERT table, UPDATE table by USERX;
My question is that I see several connections from the application server with "LOGIN" and "LOGOUT" actions and I don't know why they are appearing in the table of AUD $.
Is it because I have auditing enabled for inserts and updates on all THE tables for USERX and opening operations and logoff do I/O in tables that are not owned by USERX under logon logoff procedure?
I'm a newbie audit and the docs I read not answered this question.
I just found an article on the value of 'SESSION_REC' of ACTION_NAME and I need to change my check to "by access. I'll change that and see what happens, but it shouldn't change my question.
Thanks much for any help!
-garyHello
I have the SYS activities audited but I never said anything about the session auditing for this particular user.
"audit session;" check all successful and failed connections to and disconnections of the database, regardless of the user, by session
Is there a way to confirm what has been turned on for auditing?
You can check with the following query
Select * from dba_stmt_audit_opts;
Select * from dba_priv_audit_opts;You can also check out the link below for more deatails
http://psoug.org/reference/auditing.html -
FORALL using insert and update
Hello
I want to use FORALL for insert and update at the same time in a single FORALL...
It's like...
FORALL INDX IN 1... record. Count
insert into Table values (record (i)); - Table is updated with some values in the column
Update Table
Set table.col10 = (select val table11 where table11.column = record.count (i))
-update the Table by taking the value of some other column table... passing the parameter each time...
Help, please...Refer to this
http://docs.Oracle.com/CD/B19306_01/AppDev.102/b14261/forall_statement.htm
But why PL SQL?
You can do this with the Merge statement
http://docs.Oracle.com/CD/B19306_01/server.102/b14200/statements_9016.htm
Mezaber
-
Insert and update server behaviors in the same form
I have a php form that is inserted into a table and then update another table. I have the form of inserting the record first and then I want to update the other table. I'm starting to learn and understand PHP, but I don't know how to have the update function to run after that it inserts the records. I guess that's something like if you insert this disc, then update this record and then go to the redirect page. I know this goes to redirect page after it inserts the record, but I don't know how to tell him not to go to the $insertGoTo. I want him to run the following update function and then go to the $insertGoTo and not the $updateGoTo. Thanks in advance for any help.
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO employee (CompId, empfirstname, empmiddleint, emplastname, EmpType, EmpStatus) VALUES (%s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['CompId'], "int"), GetSQLValueString($_POST['empfirstname'], "text"), GetSQLValueString($_POST['empmiddleint'], "text"), GetSQLValueString($_POST['emplastname'], "text"), GetSQLValueString($_POST['EmpType'], "text"), GetSQLValueString($_POST['EmpStatus'], "text")); mysql_select_db($database_dotweb, $dotweb); $Result1 = mysql_query($insertSQL, $dotweb) or die(mysql_error()); $insertGoTo = "Roster.php?CompId=" . $_POST['CompId'] . ""; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $updateSQL = sprintf("UPDATE company SET CompanyType=%s WHERE CompId=%s", GetSQLValueString($_POST['CompanyType'], "text"), GetSQLValueString($_POST['CompId'], "int")); mysql_select_db($database_dotweb, $dotweb); $Result1 = mysql_query($updateSQL, $dotweb) or die(mysql_error()); $updateGoTo = "purchases.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); }
PHP code is executed from top down and is controlled by the conditional statements ('if' blocks). To achieve what you want, you need to combine the conditional statements that control the insert and update server behaviors and to move the redirect to the end of the code. Amend as follows:
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO employee (CompId, empfirstname, empmiddleint, emplastname, EmpType, EmpStatus) VALUES (%s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['CompId'], "int"), GetSQLValueString($_POST['empfirstname'], "text"), GetSQLValueString($_POST['empmiddleint'], "text"), GetSQLValueString($_POST['emplastname'], "text"), GetSQLValueString($_POST['EmpType'], "text"), GetSQLValueString($_POST['EmpStatus'], "text")); mysql_select_db($database_dotweb, $dotweb); $Result1 = mysql_query($insertSQL, $dotweb) or die(mysql_error()); $updateSQL = sprintf("UPDATE company SET CompanyType=%s WHERE CompId=%s", GetSQLValueString($_POST['CompanyType'], "text"), GetSQLValueString($_POST['CompId'], "int")); mysql_select_db($database_dotweb, $dotweb); $Result1 = mysql_query($updateSQL, $dotweb) or die(mysql_error()); $insertGoTo = "Roster.php?CompId=" . $_POST['CompId'] . ""; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); }
-
Help me in creating a trigger Insert and Update Options
Hello
Please help me in creating a trigger.
My requirement is that, after insert or update on a Table, I want to launch an event.
I have started this way, but does not know how to fully implement it.
I have a dept table
CREATE TRIGGER DepartmentTrigger
INSERT AFTER on Dept
BEGIN
INSERT INTO mytable VALUES("123","Kiran");
END DepartmentTrigger;
Please tell me how I can put the update option also.
Thanks in advance.Please tell me how I can put the update option also.
Add "or update". ;-)
Here are a few suggestions, but you definitely need to refer to the manual page that suggested the previous poster.
CREATE OR REPLACE the TRIGGER DepartmentTrigger
AFTER INSERT or Update ON Dept
BEGIN
INSERT INTO mytable VALUES(:new.) Dept 'DEPT ADDED OR CHANGED');
END DepartmentTrigger;The "or replace" means that you can replace the shutter button as you develop without having to type in a drop statement each time. Just change and reissue your script over and over again until you get it right.
The addition of "update or" or "Or remove" fact the trigger too much fire for these events. Note, you peut want separate triggers in different scripts and with different names for each event. You must decide whether your design is really the same thing either an insert or an update.
: new. Dept, this is how you should refer to the vale has changed the Dept column (: old.) Dept is the previous value). I changed the double quotes in the string in the clause VALUES of apostrophes.
Andy
-
Combining insert and update to a form?
Hello
I am a developer web amateur who is new to dynamic Web sites, php and dreamweaver. I am currently working on a project that uses many forms to send data to a database.
Data that are inserted must also be available to update if necessary. so I need currently 2 versions of each form 1 to insert and the other for the update.
Is it possible to use a single form for insert and update, instead of using 2 forms 1 for each function. This would help reduce the level of duplication on the site.
If so is anyway to do this in Dreamweaver? or could someone point me to an example of how this can be achieved.
Thank you all
Thanks for the information, disappointing that Dreamweaver cannot handle it, but at least I know where I am...
Looks like that's what I need... http://forums.Adobe.com/message/1927405
Once again thanks for your help
-
apostrophe problem for insert and update pages
I read in the book "Dreamweaver MX dynamic Applications" that a solution must be placed in the ASP to insert code and form fields record updated to replace the apostrophes by their equivalent html entity character (') before its entry in a database do not have SQL wrong interpret the entered text. How would you say this hotfix is essential because I tested my form with apostrophes and have not gotten into trouble yet?> I read in the book "Dreamweaver MX dynamic Applications" as a fix
> should
> place in the ASP code for insert and update the fields of the registration form to
> replace
> apostrophes with their equivalent html entity character (') before his
> entry
> in a database do not have SQL wrong interpret the entered text. How
> Essentials
> would you say this fix is that I tested my form with single quotes and
> have
> not got any trouble yet?If you are user of Jack and sending it to the db in plaintext in
the query, and then people can use techniques of SQL injection basically destroy
your database:http://en.Wikipedia.org/wiki/SQL_injection
So, Yes, it's a pretty serious problem.
-Darrel
-
How to write insert and update blocks about with an if
Hai All
How to write an insert and update block education about with in an if
I had a condition Ie
If the time is between 0630 and 1030
then
Insert into Daily_attend
----
Update Daily_attend set
-----
Concerning
Srikkanth.MThere is nothing preventing you to do this:
BEGIN INSERT INTO x (mycolumn) VALUES ('A'); UPDATE x SET mycolumn = 'B' WHERE mycolumn = 'A'; COMMIT; END; /
other than the fact that he seems a bit inefficient. Yet once you try to do, and why, is not clear.
Can you put an IF statement in there to choose one way or the other under certain conditions? Yes. But I wonder if what you
are actually trying to do is to reinvent the MERGE statement.
http://www.morganslibrary.org/reference/merge.html -
ODI 12 c: IKM for differential insert and update with a sequence in the target table
Hello
I have a map where I fill in a column of my target table using a database sequence. Now my mapping is supposed to load the target gradually table. So I need a revenge for update and incremental insert. Now with this differential IKM it compares all the columns to match all colmuns line to understand, it should be an insert or update. Now, the following code shows that when the ROW_WID is loaded with a sequence of database.
If NOT EXISTS
(select 1 from W_LOV_D T
where T.ROW_WID = S.ROW_WID
and ((T.CREATED_BY = S.CREATED_BY) or (T.CREATED_BY IS NULL and S.CREATED_BY IS NULL)) and
....
....
< the rest of the comparison of columns >
)
So when running ODI returns following error
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "S". "" ROW_WID ": invalid identifier
Please suggest if there is no other IKM I should use or if there is another way around it without changing the code IKM...
Hi Marc,
Thanks for your reply.
I had solved it. The incremental update process inserts all rows from the source table to I$ table that exists in the target table. It does so by the where sql such as mentioned in my questions as
WHERE THERE is NOT (
. COLUMNS =
Maybe you are looking for
-
Portege 3500 - hangs on step 8 during the recovery procedure
Hello, I've had the laptop less hard drive, I have istalled a HARD drive is appropriate, but the external CD-ROM drive, it is the good, is not recognized. I followed these instructions:http://support.toshiba-tro.de/KB0/TSB6101CA000ER02.htm Everything
-
There was an error Code Ox800710D9 when you try to update and install the Windows SP2
I can't update Windows XP SP2 due to an Ox800710D9 error code.
-
The new hard drive will interfere with user passwords?
I replaced my hard drive on my Dell Inspiron (Windows Vista Home Basics). The new drive will interfere with my user passwords? Mona
-
Upgrade from Vista to Windows 7 home Premiun home
I've recently updated my PC from Vista to 7, and it doesn't have me let use my Vista key. The key of Vista is always good and active, but don't let me use in the upgrade to 7. What should I do another get a new copy of Windows 7?
-
Connectivity issues and incorrect clock? Risks CC
Hello!I used CC with success until one day CC blanked me. The prompt says I am not connected to the internet or the computer's clock is incorrect - that are true. I reinstalled CC and tired of the many steps in troubleshooting based on the Site of Ad