Insert the statement Question
I'm trying to insert a set of values in a table where one of the values necessary for inclusion is identical to the auto-generated primary key. I am not currently insertion of the value for the primary key because it is generated automatically. Given that I'm not insert the value of the primary key, is anyway to set another value inserted on the same primary key value?For example:
insert into ent_config.device (created_dt, created_tz, created_by_seq, modified_dt, modified_tz, modified_by_seq, enterprise_seq, clinicals_organization_seq, facility_id, dept_id, hostname, tty_id, process_num, device_name, device_status, device_type, loc_type, netbios_id, db_name) values (sysdate, 'IS', '106303', sysdate, 'IS', '106303', '5001', '5035', '9', '19', 'phslnx020', 'P12320', ' 2099', 'PC', 'ON_LINE' "cv220") (, 'NUR', * '2736' *, 'ALL');
The primary key for this table is called device_seq which is generated automatically and must be unique which as you can see from the above insert statement is inserted, and the netbios_id must be set to the same value when inserting.
No idea how I could go to do this?
Hello
Welcome to the forum!
When you say that device_seq is 'auto generated', do you mean that there is a trigger that provides this value? (I assume you are using a sequence, but it probably does not matter in this issue). See if you can change the trigger. If netbios_id is always the same as device_seq when you INSERT (but can be changed by updates later), then it is very easy. Otherwise, you may need to designate some specail value (as - 9E9) which replaces the trigger with the same value that it used to device_seq.
Change the trigger is the only good way I can think of that. If you can't touch the existing trigger, you might be able to add a new trigger, but it would be more complicated and less effective.
Tags: Database
Similar Questions
-
Insert the statement so that a line taking more than 6 minutes.
When I tried to insert just one line in a table... it's take more than 6 minutes. No idea why its causing so much time for just insertion of a line.
Please advice...
Kind regards
Yasser.YasserRACDBA wrote:
Charles,Yes you are right. Optimizer is set to rule that it is the version of Oracle 8i.
Problem has been solved... rinse us just sharing pool and insert the statement was finished within 1 second.
Still confused that how its related to the hot flushes of shared pool... May be due to bad hit ratio.
Flushing the shared pool causes the instructions shared/updates cached so far in the shared pool to get hard analysis/optimized again. Explanation so the most obvious would be that for some reason, the implementation plan have been changed to the statement you're talking about, although the plan should be quite deterministic, because you're on 8i (no bind variable peeking questions) and using the optimizer basic RULE.
Kind regards
RandolfOracle related blog stuff:
http://Oracle-Randolf.blogspot.com/SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676 /.
http://sourceforge.NET/projects/SQLT-pp/ -
Insert the statement do not using the MultiSelect values correctly
I have a set of boxes MultiSelect displayed with in a cfloop. I named the MultiSelect boxes "MultiSelect #ID # with #ID #
the value of KP for each record retrieved. I do this to make sure that each MultiSelect box has a unique name so that when I
Insert data by using a query of < cfloop > names of are not in conflict. Here's the HTML for the selectbox.
< select name = "" MultiSelect #ID # ' several size = "3" > (query #ID 'getNonRoleItemDetails) "
< cfloop query = "getMultiitems" >
< option value = "#AddInfoID #" > #Name # < / option > (these two values are taken from the "getMultiItems" query
< / cfloop >
Here's the query insert I use on the action page that uses this data.
< cfloopquery getNonRoleItemDetails >
< cfquery = name "Datasource =' #application.dbname # of the Insert_Multi_Records" >
INSERT INTO tblItemDetailUpdates (ItemID, ItemDetailsListID, ItemDetailValue, ActionItemID)
VALUES (#getNonRoleItemDetails.ItemID #, #getNonRoleItemDetails.ID #, ' #form ["MultiSelect" & ID] #', #ArrayOfIds [Counter] #)
< / cfquery >
< / cfloop >
The problem I have here is that the query works correctly, but it is the insertion of the ID MultiSelect values selected (104, 105,
(106), rather than the real names of these values (IOC, AP, AR... etc).
I looked at the source code and each MultiSelect box is named correctly and uniquely. Insert inserts the correct ID
values, but not the names.Sigh too bad I am a fool. Well at least I thought about it.
-
Insert the statement with &; in the chain
Hello
When you use the insert in varchar2 column having below value, it's the slightest mistake out.
But, if I remove & symbol... It's inclusion.
suggestions to insert any string
"Networking - Cisco SMARTnet-6600 | Security & Switch Service Cont-6620 | Not used-0000"
Thank youuse
SET DEFINE OFF
before the insert statement.
Concerning
Arun -
Insert the statement of the doDML
Hello experts!
I am of the substitution of the doDML of the object of the entity Impl and I want to run a simple sql insert statement.
How can I do this and validate these changes?
Thank you very much!When you post call doDML method will be called automatically.
You can write the Insert here and you can call commit to manage Bean or AMImplManage in bean
FacesContext fc = FacesContext.getCurrentInstance(); BindingContainer opBindings = (BindingContainer)fc.getApplication().evaluateExpressionGet(fc, "#{bindings}", BindingContainer.class); OperationBinding operationBinding = opBindings.getOperationBinding("Commit"); operationBinding.execute();
In AMImpl
this.getDBTransaction().commit();
These documents may also be useful for you.
EO - OPERATION DODML
http://andrejusb.blogspot.com/2008/02/complex-insert-in-easy-way.html -
Hello.
I have inserted video without problem and now trying to get the first image to show an image that I made (the first current image is black on pageload, which looks bad). Can someone tell me how can I do this?
Thank you!
-Derek
CEO, fishing ShimanoDW cannot add a poster to your video frame. You need to make your project
in Flash for it.
http://monkeyflash.com/tutorials/poster-frame-for-Flash-video/--
Nancy O.
ALT-Web Design & Publishing
www.Alt-Web.com -
Hello
I have 2 tables of HIP_medical_CLAIM (8 million lines) and TEMP_HIP_medical_CLAIM (1 million rows)
Can someone help me to rewrite the code to optimize performance below
insert /*+ append */ into HIP_medical_CLAIM (select * from TEMP_HIP_medical_CLAIM Where claim_status not in ('30', '31', '32', '34', '40','41','42','43') );
I use Oracle 8i
Ouch... ;)
Another way:
insert /*+ append */ into hip_medical_claim select * from temp_hip_medical_claim where not exists (select null from dual where claim_status in ('30', '31', '32', '34', '40', '41', '42', '43'))
-
Insert the statement with the subquery to insert several lines
Hi friends,
Please find below mentioned query and error. Also suggest me to go forward.
SQL > INSERT INTO FM_TRAN_DOC_NO (TDOC_COMP_CODE,
2 TDOC_TRAN_CODE,
TDOC_ACNT_YEAR 3,.
TDOC_CUR_NO 4,.
TDOC_MAX_NO 5,.
TDOC_CAL_YEAR 6,.
TDOC_PERIOD 7,.
TDOC_DIVN_CODE 8,.
TDOC_DEPT_CODE 9,.
TDOC_CR_UID 10,
TDOC_CR_DT 11,
TDOC_UPD_UID 12,
13 TDOC_UPD_DT)
14 SELECT '001',
15 (SELECT DISTINCT FM_TRAN_DOC_NO TDOC_TRAN_CODE
16 '6',
17 '0',
18 '9999',
19 NULL,
20 NULL,
21 NULL,
22 NULL,
23 "AGT,"
24 TO_DATE (SYSDATE),
25 NULL,
26 TO_DATE (SYSDATE) FROM DUAL;
(SELECT DISTINCT FM_TRAN_DOC_NO TDOC_TRAN_CODE),
*
ERROR on line 15:
ORA-01427: einreihig subquery returns multiple rows
+Untested.
When values except 'TDOC_TRAN_CODE' are hardcoded, there is no need to select double.
Something like that?
INSERT INTO FM_TRAN_DOC_NO)
TDOC_COMP_CODE,
TDOC_TRAN_CODE,
TDOC_ACNT_YEAR,
TDOC_CUR_NO,
TDOC_MAX_NO,
TDOC_CAL_YEAR,
TDOC_PERIOD,
TDOC_DIVN_CODE,
TDOC_DEPT_CODE,
TDOC_CR_UID,
TDOC_CR_DT,
TDOC_UPD_UID,
TDOC_UPD_DT
)
SELECT DISTINCT
'001',
TDOC_TRAN_CODE,
« 6 »,
'0',
"9999",
NULL,
NULL,
NULL,
NULL,
"AGT,"
TO_DATE (SYSDATE),
NULL,
TO_DATE (SYSDATE)
OF FM_TRAN_DOC_NO;
-
Insert the select statement result in CLOB
Hi, I would like to insert the result of a statement select into a CLOB with a trigger.
Whevner a number is registered my research to trigger how often the number is used in several objects and now my problem I also would like to know the record ID where the number is used.
SELECT 'ITEXT '.
OF 'CHECK_INR '.
WHERE 'USE' > 1
This select records of results 2 How can I insert the result into a CLOB with my trigger?
Thanks in advanceSteven,
It's really a question better suited for another forum because it is not really associated with ApEx. Also, something tells me that you really want to do an UPDATE not an insert. However, here's a quick example...
DECLARE l_orders VARCHAR2(4000); BEGIN FOR x IN ( SELECT * FROM my_orders_table ) LOOP l_orders := l_orders || ', ' || x.order_data_column; END LOOP; l_orders := l_trim(l_orders, ', '); UPDATE some_table SET some_column = l_orders WHERE id = some_id; END;
That's the key. Use VARCHAR2 unless you need CLOB.
Kind regards
Danhttp://danielmcghan.us
http://sourceforge.NET/projects/tapigen -
SQL statement error INSERT The conflicted with the FOREIGN KEY constraint
I recently installed a reporting for vmware vsphere software, but I get a SQL error. I opened a request for assistance with vmware, but so far they have not come up with a solution. The error is caused by: com.microsoft.sqlserver.jdbc.SQLServerException: instruction INSERT The conflicted with the FOREIGN KEY constraint 'FK_CB_VSM_NETWORK_VC_ID '. The conflict occurred in database 'VCChargebackVCC02', table "dbo." " CB_VSM_SERVER', column 'VC_ID '. I don't know a lot about SQL, so I'm lost in the extent of troubleshooting is concerned. If anyone has any ideas I'd love to hear them.
SQL questions are better posed on Technet. They are better equipped to manage the
http://social.technet.Microsoft.com/forums/en-us/categories/
-
Insert HTML in the States of the objects
I'm having issues with HTML inside the object of various States. I am inserting youtube embed code and some of the moments when I insert the code for the box appears but the video then do not play on the ipad... see screenshots
This video is displayed correctly
This video shows only a white screen (there are many with this problem and all other settings appear to be the same)... when I hit play, it becomes white, he is not a white background on the box...
reply in this thread...
http://forums.Adobe.com/message/5515574#5515574
video live right click to copy the correct code of youtube and paste them directly (no html insert) in document indesing...
-
Insert the slide in question in the middle of the video
I just bought 6 Captivate. I have some videos of existing comprehensive training that have been saved in Camtasia. They have no quiz. I would like to import video in Captivate and insert slides of quiz overall. For example, the end user will monitor the first minute of the video. Then, the video stops and the user is presented with a Question slide. The user finishes this quiz and start the video. the video stops at the next slide in the Question.
I can't understand how to insert the Question slides in the middle of the video. I tried different search phrases in forum search but can't seem to find this exact topic. I plead for a feature that does not exist?
Hello
I'll be happy to explain the other method as well. You can refer to the below mentioned video that I created for you:
I hope this helps!
Thank you!
-
Shorten the length of the blade according to the State of an inserted SWF file
My question may be advanced. I am using Captivate 4 for this project.
I am trying to create a manual online that describes a technical system.
I created multiple SWF files for the various components and inserted them into a master project of Captivate. I use the table of contents in the main project to provide navigation components.
My problem is that the SWF file to show the various components have a visible bar of 'control'. Since it is an event (without audio) we slowed down (some say too slow) for slow readers. But given the control bar allows readers 'faster' the ability to speed upward and etc.
My question, so if a user it accelerates and reaches the end of the file SWF slide continues until the 'period' is over. For example, I have an embedded SWF which is 66 seconds long, the blade must be 66 seconds long to allow it to play fully. I tried to adjust various settings and the settings of the imported video, but no matter what the video should be 66 seconds before I can do anything with the slide that hosts it.
Any ideas? I do not control the imported SWF file (which is actually a published Captivate project) and I do not master the file SWF Captivate "accommodation".
Main reason for which is "broken apart", is can I outsource the various resources so I individual file charges "on-demand" and does not have a massive SWF file.
Before asking, I thought using the Aggregater, but it does not work in Internet Explorer (HTM file) and will not cross the Preloader and my audience does not flash drives as I do.
Hi Ziqiel, hope I will find the solution.
I use the same technique as you Captivate 3. I insert the SWF on a main project. So, I insert a clickable area with options to "Stop the project until user click ' and 'no action '. You place this box anywhere on your slide where the swf file. It shut down the main project, but your swf will continue to play until the user clicks a button to continue.
It is clear to you? And is it useful?
-
How to insert the value of the variable using select statement - function Oracle
Hello
I have a function that inserts the record based on a condition
INSERT IN the case
(
Case_ID,
Case_Status,
Closure_Code,
Closure_Date
)(
SELECT newCaseID,
caseStatus,
Closure_Code,
Closure_Date,
CASE
WHERE Case_ID = caseID
);
Now, I want the new value casestatus instead of value caseStatus select statement. I have a m_caseStatus variable and I want to use the value of this variable in the select statement above.
How can I use this.
Thank youINSERT INTO Case ( Case_ID, Case_Status, Closure_Code, Closure_Date )( SELECT newCaseID, m_caseStatus, <-- here place your variable Closure_Code, Closure_Date, FROM Case WHERE Case_ID = caseID );
Nicolas.
-
State of commissioning - verification of the Email questions
Hello
I, as administrator, decided to choose the method "Send verification" of the State of implementation. I have a lot of questions about this.
1 password. The applicant, nor the administrator specifies. So what - the? Or have I missed something?
2. all e-mail providers require the secure connection. How can I created this? Without that, I'm getting the "ORA-29278: SMTP temporary error: 421 Service not available" error and the applicant does not receive emails from me.
3. the outgoing e-mail (which is not the applicant) appears in the log of the e-mail, but not his body. This prevent me from copy - paste and it and sending it manually (unless I do it at the point where he's about to be sent). Is it possible to see the body of the mail message in the Messaging log?
4. it seems that the outgoing mail is in the queue, the same workspace cannot be reissued, nor can it be deleted because it does not appear in the workspace list. It also seems that after awhile, the message is deleted from the queue automatically and it is only available in the mail log. How long the mail remain in the queue until that happens and I can change this time?
Any help would be greatly appreciated! Thank you
GaborWhen the workspace is created, the e-mail sent to the applicant appears. This email does not contain the generated password. Shouldn't it?
It is a two-step process. The first email has a link that the user clicks complete the approval process and obtain the credentials.
What I meant is that the mail log shows that an e-mail has been tried to be sent to the applicant, but it does not show the content of this e-mail. This explanation help?
Yes, thank you. To my knowledge, the message body is not connected.
Is it possible to see the real mail messages that have been sent (successfully or not) somewhere else then?
Sorry, I don't know.
The user has no chance to respond to the email because they never receive it due to the fact that the secure connection to the mail server cannot be implemented. It is therefore my understanding that there is a period of time (while the post office is located in the mail queue) when the workspace was not created yet, cannot be asked again and cannot be deleted. I understand that correctly?
Yes, except that the request of the workspace can be removed using the apex_admin application.
Scott
Maybe you are looking for
-
Trade contacts don't sync correctly
Hi all. I have an iPhone SE 9.3.1. I have an Office 365 email account that I have connected to the phone when I bought it a few weeks ago. All contacts not loading perfectly, no problem. I turned my phone off last night - the first time I did it beca
-
A80:it guard beep until I press F2, when turned on.
When I turned on, it keeps beeping with the Toshiba screen. After I pressed F2, it continues to run windows. Everyone knows what happens to it? Could you please give me some advice? Thank you.
-
Snapfish, ePrint access does not work
I am trying to log on to my new printer HP Photosmart 6520 ePrint. I can connect to Snapfish without any problem. If I try to use the same login and password for ePrint it says the email is already used. He said that he had to connect the 2. Inter
-
Try to install the Internet Information services managerReceived message the IIS Management Console is required.The Console where in Vista Home Premium? Thank you
-
My error in the event log: application DCOM error
The error message reads as follows; Machine default permission settings grant Local Activation permission for the application server COM with the CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} and APPID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} the user S