Insert some values into the type defined by the user in the table column?
HelloI've created a type
CREATE TYPE COURSE_OBJ1 AS OBJECT)
course_code char (8),
course_name varchar (35)
);
Then set up a table with the type as one of the columns
CREATE TABLE NEW_COURSE1)
course COURSE_OBJ1,
date of course_date,
course_instructor varchar (35),
course_location varchar (20)
);
Now, it makes me error: column not allowed here
INSERT INTO NEW_COURSE1 (courses, course_date, course_instructor, course_location)
VALUES (course ('DBA12345', '101 S/n'), October 3, 2005, "Phung',"Kaanapali")
Can someone show me please the correct way to insert these data? He's not from another table. This is a file txt nothing else than values.
Thank you
You created type COURSE_OBJ1, but in the instructions wrote courses("DBA12345",'s / n 101')
(1) course replace ('DBA12345', '101 S/n') COURSE_OBJ1 ('DBA12345','s / n 101')
(2) add citations to 3 October 2005 or replace to 'to_date('03-OCT-2005','dd-mon-yyyy') '.
INSERT INTO NEW_COURSE1(course, course_date, course_instructor, course_location)
VALUES(COURSE_OBJ1('DBA12345', 'DBA 101'), to_date('03-OCT-2005','dd-mon-yyyy'), 'Phung', 'Kaanapali');
Kind regards
Sayan M.
Tags: Database
Similar Questions
-
Insert some values into the database of field boxes
I had a similar probem and error when you use the drop-down list instead of a checkbox. It was solved by putting the SELECT name = "CarMake in the menu dropdown.
But in the box, I don't know?
I seem that the problem is the action page has the Form.carmake, but the page does not work. What Miss me and where should I put in the entry below page.
The main objective is to have checked checkboxes to insert some values into the database field carmake based on what is checked.
If the Honda checkbox is checked then
It inserts into the carmake field value Honda.
If the Toyota checkbox is checked then
It inserts into the carmake field the value of Toyota.
If both are true then 2 rows are inserted two values
Honda and Toyota.
Ditto for the last option.
Thanks for your help
Here's the error again
error:
Error occurred while processing request
CARMAKE element is not defined in the FORM.
12:21:50.050 - term Exception - in C:\CFusionMX7\wwwroot\Author\CarAddAction.cfm: line 16
CARMAKE element is not defined in the FORM.
line 16 is:
"#Trim (Form.carmake), #
Join the Code
<! - Here is the form - >
< html >
< head >
< / head >
< body >
< h1 > < / h1 >
< table >
< action = "CarAddAction.cfm cfform" method = "POST" > "
< b >
< td > Honda: < table >
< td > < Center > < input type = "checkbox" name = "HONDA_MODEL" value = "HONDA" checked > < / center > < table >
< /tr >
< b >
< td > Toyota: < table >
< td > < Center > < input type = "checkbox" name = "Toyota_MODEL" value = "Toyota" Unchecked > < / center > < table >
< /tr >
< b >
< td > SUBARU: < table >
< td > < Center > < input type = "checkbox" name = "SUBARU_MODEL" value = "SUBARU" unchecked > < / center > < table >
< /tr >
< Tr > < td > < table > Honda model
< td >
< input type = "Text".
name = "Honda_Model".
Value =""
size = "22".
MaxLength = "20" >
< table >
< tr > < /tr >
< Tr > < td > < table > Toyota model
< td >
< input type = "Text".
name = "Toyota_Model".
Value =""
size = "22" >
< table >
< tr > < /tr >
< Tr > < td > < table > Subaru model
< td >
< input type = "Text".
name = "Subaru_Model".
Value =""
size = "22" >
< table >
< tr > < /tr >
< td > < table >
< td >
< input type is 'submit' value is "Take Add to database" >
< table >
< /tr >
< / cfform >
< /table >
< / body >
< / html >
<!-action page
--------->
< cfdump var = "#form #" >
< name cfquery = "InsertCarInfo."
DataSource = "#request. MainDSN #">"
INSERT INTO Car_tab)
car_Make,
Honda_Model,
Toyota_Model,
Subaru_Model
)
VALUES)
"#Trim (Form.carmake), #
"#Trim (Form.Honda_Model), #
"#Trim (Form.Toyota_Model), #
"#Trim (Form.Subaru_Model) #
)
< / cfquery >
You check in one or more of the boxes before continuing? Remember what I said about the form field box existing only on the page of treatment at least 1 or more checkboxes are checked on your form. Make sure you use
to avoid this problem. What happens when you take a look at the output of your dump of form? Your fields are present?
-
Insert a row into the table on a button click
Hi all
I have a table called 'temp' with 4 columns such as seq, name, event, id and I have a GP with 3 text such as name, event id fields
now my question is
If I enter values in the 3 text fields on this page and a button, click on (for example create), I wanted the values of dose to get inserted into the table 'temp' and
regarding, "seq" column I HAV created a sequence for it.
so 1. How to insert values into the table by entering the values in the page
2 wat shd b made to column seq... (shd b anyth made apex pages or wil automatically get values for each input line)
pls help me...
Thanks in advance
1, it is up to you change your account to something more user-friendly than '8f4692cc-040e-48ee-b102-590cdd4303fc'.
Then, it would also be a good idea to use proper English when you ask a question here... Not broken English as "now comes to my" and "wat shd b"... More people will be willing to help you if you at least put forward in order to ask a good question...
Which version of the database are you using? APEX version?
Change the code above to this process:
DECLARE
v_seq NUMBER;
BEGIN
Select SEQUENCE_NAME. NEXTVAL INTO v_seq
Double;
INSERT INTO temp (seq, name, event, id)VALUES (v_seq,: P1_name,: P1_event,: P1_id);
END;
This allows it to be used in older versions of Oracle that do not allow direct access to the sequence.nextval in an assignment statement.
Thank you
Tony Miller
Software LuvMuffin
-
Insert xml files into the table
Hi all
How to create an application, which allows me to download an xml file and insert the file into a table, looking something like what makes the apex, with 'data-> data-> Data Load XML Workshop'.
I tried to create it using this link # 9170494
but when loading the file and send it (current executing the "sp") sends the error "ORA-22285: file for FILEOPEN operation or non-existent directory.
I could slightly auxiliary
concerning
This idea is troubling for me.
The XML file DOES NOT CHANGE. This is the goal. You have a DTD/XST that defines where in the XML hierarchy, a data element is and (so) how to access it. With this information, you can hardcode things.
Therefore, you should have no reason for that functionality 'map the data column in the table column"of the data loader since all mappings will be always the same.
As a simple INSERT... The SELECT statement can (and should) be used.
(use the FUSION if you update / insert data).
I copy + paste some of my code in a procedure that I use.
You will need to replace the parameter name (p_filename) with the value of appropriate link (name of item)
declare l_XML XMLType; begin /* get file from APEX WWV_FLOW_FILES */ begin select XMLType( blob_content, 1 ) -- 1 means that the file is USACII encoded. this may need to be changed. into l_XML from wwv_flow_files where name = p_filename; -- replace this with the appropriate ITEM NAME exception when no_data_found then raise_application_error( -20001, 'not in FLOW: ''' || p_filename || '''' ); end; /* you'll need to figure this one out */ INSERT INTO T (...) SELECT .. FROM XMLTable( '/' pasing l_xml columns
PATH -- repeat for each "column" you want to extract ); delete from wwv_flow_files where name=p_filename; end; -
Impossible to insert xml data into the table
HII All,
I'm unable to parse the following xml file and insert them into the table.
Version of DB
======
My DB TableSQL> SELECT * 2 FROM V$VERSION; Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production
Published by: RUSSO April 7, 2011 04:19Create table rgh_xml_storage ( user_id varchar2(4000), to_type varchar2(4000), mail_id varchar2(4000), subject varchar2(4000), sentDateTime varchar2(4000) )
Hello
Please provide all pertinent details!
Please correct my insert if statement it must be.
You have a few bad XPath.
Here's a way to unnest correctly repeated elements:SQL> select x1.user_id, 2 x1.subject, 3 x1.sentDateTime, 4 x2.to_type, 5 x2.mail_id 6 --x1.messageBody 7 from xmltable( 8 '/emailMessage' 9 passing xmltype(bfilename('TEST_DIR','email.xml'), nls_charset_id('CHAR_CS')) 10 columns user_id varchar2(4000) path 'headerInformation/sender/user/@userID', 11 subject varchar2(4000) path 'headerInformation/subject', 12 sentDateTime varchar2(4000) path 'headerInformation/sentDateTime', 13 messageBody clob path 'messageBody', 14 my_xml xmltype path 'headerInformation/recipients' 15 ) x1, 16 xmltable( 17 '/recipients/recipient' 18 passing x1.my_xml 19 columns to_type varchar2(4000) path '@type', 20 mail_id varchar2(4000) path 'user/@emailAddress' 21 ) x2 22 ; USER_ID SUBJECT SENTDATETIME TO_TYPE MAIL_ID -------------------- ------------------------------------------------ ------------------------------ --------- ------------------------------------------ RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 to [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] 13 rows selected
-
put the value into the correct column according to (complex) date
Hello
the query I'm doing is very complex (for me, of course), so I need help from you experts...
I have a table as below
ID | name | value | Date
1. Ranieri | 254,2 | 2009-01-21
2. Jorge | 252,5 | 2009-03-23
2: Ricardo | 584,5 | 2009-04-21
5. Fabricio | 478.2 | 2009-02-12
4 > Felipe | 454,5 | 2009-01-30
7. Leonardo | 484,6 | 2009-02-15
8. Marcelo | 854,4 | 2009-02-04
First of all, I need a query that separates each month on both sides, so for this year, I'm having columns like below
jan01-15 jan16-31 fev01-15 fev16-28 mar01-15 mar16-31 apr01-15 apr16-30 and so on...
P.S:this query must deal only with the current year
So, I need the result is the union of these two tables to be as below
ID | name | value | Date | jan01-15 | JAN16-31 | fev01-15 | fev16-28 | Mar01-15 | mar16-31 | APR01-15 | Apr16-30 and so on...
1. Ranieri | 254,2 | 2009-01-21 | 254,2 |
2. Jorge | 252,5 | 2009-03-23 | 252,5 |
2: Ricardo | 584,5 | 2009-04-21 | 584,5
5. Fabricio | 478.2 | 2009-02-12 | 478.2 |
4 > Felipe | 454,5 | 2009-01-30 | 454,5 |
7. Leonardo | 484,6 | 2009-02-15 | 484,6 |
8. Marcelo | 854,4 | 2009-02-04 | 854,4 |
I 'don' t know if my problem is very clear, but for each row based on the column 'date', I need to put the value in the right column "part of month".
Is there a way to do this?
I appreciate a lot of help...
Thank you
Published by: Ranieri on 09/02/2009 06:20Hello
This is called a pivot; Here's how you can do:
SELECT id , name , value , dt -- date is not a good column name , CASE (WHEN TO_CHAR (dt, 'MM') = '01' AND TO_CHAR (dt, 'DD') <= '15' THEN value END) AS "jan01-15" , CASE (WHEN TO_CHAR (dt, 'MM') = '01' AND TO_CHAR (dt, 'DD') >= '16' THEN value END) AS "jan16-31" , CASE (WHEN TO_CHAR (dt, 'MM') = '02' AND TO_CHAR (dt, 'DD') <= '15' THEN value END) AS "feb01-15" , CASE (WHEN TO_CHAR (dt, 'MM') = '02' AND TO_CHAR (dt, 'DD') >= '16' THEN value END) AS "feb16-28" ... , CASE (WHEN TO_CHAR (dt, 'MM') = '12' AND TO_CHAR (dt, 'DD') <= '15' THEN value END) AS "dec01-15" , CASE (WHEN TO_CHAR (dt, 'MM') = '12' AND TO_CHAR (dt, 'DD') >= '16' THEN value END) AS "dec16-31" FROM ...
If you are looking for pivot, you will have many other examples. Almost all of them combine several rows of the table in a line of output, so they use GROUP BY, an aggregate function, such as MIN or SUM. Your problem doesn't have that.
-
Insert some values into multiple tables. One of the tables has a complex primary key.
Hello, I am using Jdeveloper version 11.1.2.3.0
I have a FORM_TYPE table and another table Str. The table of Str is used to translate the strings from the name of the table which are read from another program from the database and used to generate forms...
The FORM_TYPE table has a relationship with the table of STR via formtype.title_str_id = str.str_id.
STR. table has a primary key which is based on the mf_language and str_id. columns I generated the entity for the table of STR, but impossible to insert new values of add-on application for some reason any... It is said that recording invalidates its own entity...
I am trying to create a table that will be editable and will have the column Description, name, cdes in English, Str in French etc...
To create a Form_Type and at the same time insert new values for each language. But can not do the inserts of the new work of STR...
Also the FormType.TITLE_STR_ID already has a lot of null values in the database.
SELECT FormType.DESCRIPTION,
FormType.FORM_TYPE_ID,
FormType.NAME,
FormType.PAPER_REPORT_FORMAT,
FormType.PAPER_REPORT_NAME,
FormType.TITLE_STR_ID,
in. En_str str,
in. STR_ID,
en.object_name en_object_name,
Fr. Str,
Fr. STR_ID,
Fr.object_name,
of the. Str,
of the. STR_ID,
du.object_name,
BG.Str,
BG. STR_ID,
BG.object_name
OF FORM_TYPE FormType.
(select str.str_id, str.mf_language_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'fr') en
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'fr') en,.
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'from'),
(select str.str_id, str.str, str.object_name
of mf_language ml, str
where ml.mf_language_id = str.mf_language_id
and ml.code = 'bg') bg
WHERE
FormType.title_str_id = en.str_id and
FormType.title_str_id = fr.str_id and
FormType.title_str_id = du.str_id and
FormType.title_str_id = bg.str_id
Each table that you want to update must have its own entity object. You need to connect it to an another VO/OS using the associations/view links
-
How to insert a row into the table from an entity class
I use JDeveloper 11.1.2.3.0 using ADF. I would like to insert a row in Table B, when A table is inserted into the database based on a value selected by the end user. I could do in a database trigger, but I would try in the ADF. I think that the best place to do it would be in the entity based on the table A class. I could override the doDML method and search for DML_INSERT
and make the table insert B here, but I don't know the best way to achieve this. I guess I want to avoid using a SQL "insert". I'm new to ADF and it can be difficult to get
a question using the appropriate terminology. I hope this makes sense.
Hello
Check out this blog: http://andrejusb.blogspot.com/2008/02/complex-insert-in-easy-way.html
Arun-
-
Insert a logo into the table of contents?
is it possible to insert a logo at the top or bottom of the table of contents (in the skin editor)?
Thank you
clemency
Hello
Please, what version are you using: Captivate® 5 or Captivate 4?
If it's the CP5, open the Info button in the Table of contents dialog, there's a button where you can download a 'photo', but you can use it for images, even for a video:
-
Title of the report based on the value of the Table column
Hello
We use OBIEE 10 g.
We have a Table and a chart based on the table in a report.
Assume that the table has two columns, ID and NAME
can we refer dynamically the value of the column NAME in the title of the report?
for example
the table has
ID | NAME
-------------
123 | GS
now, we would like the title to appear as
Report for the GS
where GS is dynamicUse the narrative mode and refer to the column that you want to display using @2 and place it instead of view title.
Thank you
Isabelle RenonPublished by: Rajesh Raoul - BI on May 2, 2013 05:59
-
ultralitej exception when attempting to insert the value into the table
Hello
I get this exception,
Here is my table
Sub createItem()
throws ULjException
{
TableSchema table_schema = _conn.createTable ('Item');
Table_schema.createColumn ("item_code", Domain.VARCHAR, 15);
Table_schema.createColumn ("item_desc", Domain.VARCHAR, 30);
Table_schema.createColumn ("item_rate", Domain.INTEGER);
IndexSchema pk_schema = table_schema.createPrimaryIndex ("prime_key");
pk_schema. AddColumn ("item_code", IndexSchema.ASCENDING);
IndexSchema name_index = table_schema.createIndex ('ItemName');
name_index. AddColumn ("item_desc", IndexSchema.ASCENDING);
}I'm trying this option to enter the values in it.
for (int i = 0; i)<>
{
dataAccess.insertItem (str_pCode [i], str_pDesc [i], str_pRate [i]);
}Here is my code insertItem
Insert data
{} public insertItem Sub (string code, string desc, string rate)
try {}
String sql = "INSERT INTO point (item_code, item_desc, item_rate) VALUES (?,?,?)";
PreparedStatement ps = _conn.prepareStatement (sql);PS. Set (code 1);
PS. Set (2, desc);
PS. Set (3, rate);PS. Execute();
_conn.commit (); }
{} catch (ULjException uex)
System.out.println ("ULjException:"+ uex.toString () ');
}
catch (Exception ex) {}
System.out.println ("Exception:"+ ex.toString () ');
}
}and I'm getting the following exception.
Exception: ianywhere.ultralitej.implementation.JrException: error-[141] UltraLiteJ: table 'employee '.
Check which line of code is throwing the exception. Look for the error on the UltraliteJ document number.
-
API to insert values into the table of apps
Hello
I created a table with front end applications. Creating columns and rows. Now, I want to insert values in different columns of the corresponding lines.
Can you get it someone please let me know the API that I can use here to insert the column values?
Kind regards!If you want to insert data in the standard table oracle, then you must use the api instead, then apply the insert statement, this api oracle used to check the validation of the company etc.
Regarding the concern with regard to insert the date as you said, this is why you should use this api 'PAY_USER_COLUMN_INSTANCE_API' to insert data in pl/sql script.
-
The program I use is Dreamweaver.
-
increase the value of minute in 14 minutes, while the data is inserted into the table
Hello
I'm having the asp page that connects with the DB to insert values into the table. One column is date data type. Value from this asp page must be incremented to 14 minutes before be inserted into the table.
How can I do this?
sqlG="INSERT INTO AEMU " &_ " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_ " COUNTRY_G)" &_ " VALUES " &_ "('"& msid &"'," &_ "'" & X & "'," &_ "' " & Y & " '," &_ "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')," &_ "' " & req_id & " '," &_ "'" & CountryName_G & "')"
Try this way:
sqlG="INSERT INTO AEMU " &_ " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_ " COUNTRY_G)" &_ " VALUES " &_ "('"& msid &"'," &_ "'" & X & "'," &_ "' " & Y & " '," &_ "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')+14/(24*60)," &_ "' " & req_id & " '," &_ "'" & CountryName_G & "')"
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com] -
Hello, I am new to using labview and I want to create a dataloger. I want to insert values into the table and keep only when buttom is press or if a Boolean value is true. The table works but not to conserve the values, delete it and replace.
Thank you
Avimar wrote:
Hello, I am new to using labview and I want to create a dataloger. I want to insert values into the table and keep only when buttom is press or if a Boolean value is true. The table works but not to conserve the values, delete it and replace.
Thank you
First switch off the default use if Unwired on your tunnel to exit of the structure of the case. Make sure that wire you your table straight through in the wrong case (the error you are going when you have disabled the default thread continues clearing).
Maybe you are looking for
-
I love Firefox, but this problem frustrates me. I want to access a favorite site and have bookmarked. When I click this bookmark, the site opens in a sidebar! How can I open in the window of the tab complete?
-
HP sucks! Resale right. They ignore the demands of the customers with impunity. It's no wonder that the company is in trouble. I bought a printer all-in-one Officejet 8600. Great machine BUT, every day, it spits out something called the daily Ma
-
Satellite A205-s4577 - horizontal lines on the screen
I have satellite a 205-s4577.There are horizontal white lines on the screen as soon as I start it... it hangs at any point n that get these lines.It is also sometimes black or white background just black n.,.I contacted the service customer and updat
-
Read and analyze a binary file
I can't properly analyze a binary file. I use the Labview 'Reading binary file' example, I joined to open the file. I suspect that I use incorrect settings on the command "binary file reading. Here is a little history on my request. The binary file,
-
a security XP KB2393802 update failed
I have updated windows XP SP3 on Sep.2011 14. There was no failure to update BUT, on 23 September 20111 day on Widows XP Security KB2393802) SP3 failed. any solution please. Thank you Joseph Youssefi m: