How to insert the value of a LONG data type?
Hi allDevelopers what to change the type of data in the PRODUCTS table.
PRODUCT
======
ID number (10) not null,
NAME varchar2 (50) not null,
DESCR varchar2 (250) not null
They want the DESCR to change datataype at LENGTH
So I got back it up first:
create the table product_bak in select * from product;
remove the product;
change the product table change (descr, null);
Edit the product table change (long descr);
Insert into select product * from product_bak;
ORA - 997 - illegal use of LONG data type
How can I recover my data?
Thank you very much.
Use TO_LOB to convert long on the CLOB type, then use TO_CHAR to convert CLOB VARCHAR2.
Tags: Database
Similar Questions
-
How to insert the value from the FORM to another database table?
Hi all
I have the following problem.
I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)
CREATE TABLE MATURED_FD_DTL
(
ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,
CUST_CODE NUMBER (9),
FD_AMT NUMBER (15),
FD_INT_BAL NUMBER (15),
TDS NUMBER (15),
CHQ_NO NUMBER (10),
CREATED_DATE DATE,
CREATED_BY VARCHAR2 (15 BYTE),
PREV_YR_TDS NUMBER (15),
ADD_FD_AMT NUMBER (15),
DESCRIPTION VARCHAR2 (100 BYTE),
P_SAP_CODE NUMBER (10),
P_TYPE VARCHAR2 (1 BYTE)
)
By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.
But I want to insert these values in another table called TEMP.
I want to insert values of form only, no table select.
How can I do this?
Help me.
Is Oracle Designer 6i.
Answer:
BEGIN
Commit_form;
PREMIER_ENREGISTREMENT;
LOOP
insert into TEMP_MATURED_FD_DTL
SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
NEXT_RECORD;
END LOOP;
PREMIER_ENREGISTREMENT;
COMMIT;
MESSAGE ("RECORD UPDATED AS PAID '");
MESSAGE (' ', no_acknowledge);
END;
-
How to insert the value of table display
Hi all
I have a page element named that email and set this as view only, now I need to insert this value in the table I use insert statement like this: P255_EMAIL, but it gives an error.
Can someone tell me how to insert this
Thanks and greetings
srikkanth. MSrikkanth,
A single display element is not rendered at the point of entry to the difference of the other editable on the page elements, if you look at the html code of any view one item and compare it with a textfield should be clear.You can have another element hidden with the value that can be returned in the process
ORHere's a little something that does not need any additional items to make the item view alone and still available in the world as a normal part
Do not say P100_MY_ITEM like a textfield
But in the text of element Pre_ give you<span class="display_only" >&P100_MY_ITEM.</span><span style="display:none">
And in the text of item Post_ put
</span>
Hide the textfield object, it shows the value of the item as a single text to display.
-
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.
-
How to insert the value "DP &; S?
Hi all
I want to insert the record with the value 'DP & S '.
Everything by inserting a record due to & it will ask for the value of the parameter.
a solution is: set define off
Any other solution?
Thank you
SaguftaDiscover the escape characters.
A way
INSERT INTO t VALUES (has ' |' &'| ') P') ;
;)
See you soon!
BobinPublished by: Buga on October 26, 2009 08:09
-
How to return the value 0 for no data using the County?
Hi all
I used this query to count the number of records for each month of the year:
SELECT DISTINCT COUNT (I.information_sid) COUNT, TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM') MONTH
INFORMATION I
TO_DATE GROUP (TO_CHAR (INSERT_DATE, 'MM'), 'MM')
ORDER BY TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM')
But this code returns no value for months without data
I want to return the value '0' for any month of data. How, please?
Note: I use reports 6i.Maybe this?
SELECT SUM(CNT_REC) CNT_REC, MONTH FROM ( SELECT COUNT(I.information_sid) CNT_REC, TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM') MONTH FROM INFORMATIONS I GROUP BY TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM') UNION ALL SELECT 0, LPAD(ROWNUM,2,0) FROM ALL_OBJECTS WHERE ROWNUM <= 12 ) GROUP BY MONTH ORDER BY MONTH
No need to SEPARATE during the use of GROUP BY.
-Clément
-
How to display the image of wamp if data type I use is blob?
Please help me with the problem of wamp if image display is of blob data type. Thank you
Do not store images in the database. Store the names of image files in the database and place the images in a folder.
-
How to insert the value of the type in a value of type varchar date
Oracle forms 6i
Hai All
There are two tables T1, T2
T1 has these code varchar fields, the time varchar, date
T2 has these intimate date fields, outtime date intrinsically date, date of introut
I tried to change the time of Ie respondent T1 to T2
Update T2 intimate value = to_date(bartime|| bardate, «hh24mi maman-dd-yyyy»)...
It run but very well, but I got an error Ora-01861
Concerning
Srikkanth.MUpdate t2 set outtime = to_date (r1.bartime | hh24mi R1.bardate,'dd-MOM-yyyy "") that I wrote like this and it runs and I got an error 01861
One of your error is to set month format his KILLS not MOM
I guess bardate has the format DD-MON-RRRR then this request won't work
update t2 set outtime = to_date(r1.bardate||' '||r1.bartime, 'DD-MON-RRRR HH24MI') where......
---------------------
Take this into account in TO_DATE you tell Oracle that is my String don't String not really but it's date so for this, it must be said that your string contains this format date
To_date (Mystring, DateFormat);
for example
String is ' 2009/Jan/01 20:00 ' To_date would be like to_date (' 01/Jan/2009 20:00 ',' RRRR/MON/DD HH24 ')
It may be useful
If the answers are useful or correct please mark
Baig,
http://baigsorcl.blogspot.comPublished by: bamba on March 12, 2010 16:59
-
How to make a LIKE on a long data type
I need to search through all the triggers those that contain the string MYSTRING in their own bodies.
Unlike the table USER_SOURCE procedures and packages where it is possible to run a
Select distinct name from user_source where upper (text) like '% % MYSTRING ";
How can I make the same trigger where the body of trigger is a LONG type? I can't run a upper (trigger_body) like '% % MYSTRING "; on USER_TRIGGERS, so how can I do?
Thank you!I have done a few times and generally what I do is create a temporary table by using CREATE TABLE AS... SELECT, and then in the source table. I'll convert the LONG column a CLOB column in the process that you can do your search string on it. Once I'm done, I drop my table.
I hope this helps!
-
Impact on performance when you use the LONG data type
Hi all
Only I have a doubt about the use of LONG data type
I use the data type LONG for some columns in a table and I created indexes on the columns separately, but these column values can be easily fit into the varchar data type.
(Just to see the performance on this issue)
Suppose that a common select query with WHERE condition on any of the column which has LONG data type will affect the performance of the query?
Please explain.
Thank you(1) the LONG (and LONG RAW) data types have been depricated for quite a while. Oracle has been strongly recommends that you move to 8.1.5 CLOB and BLOB data types. Why you use the LONG data type? You're still on Oracle 7?
(2) have you tried to write a query that has a WHERE condition that refers to a LONG column? In general, you can not because it does not support the type of data LONG. For example
SQL> ed Wrote file afiedt.buf 1 create table a ( 2 col1 varchar2(30), 3 col2 long 4* ) SQL> / Table created. SQL> select * from a where col2='abc'; select * from a where col2='abc' * ERROR at line 1: ORA-00997: illegal use of LONG datatype
LONG data types are a royal pain to work with. They also have implications on the performance of wicked on the client.
Justin
-
How to get the value with DBSequence in EL links
Hello
I have a DBSequence type id and check if the value is null or positive
#{bindings. Id.inputValue! = null and links. Id.inputValue > 0? {"Edit": "Create"} does not work because the links. Id.inputValue returns a DBSequence and cannot convert Long
How to get the value?
JDev 11.1.1.6
You can try this:
#{bindings. Id.inputValue.sequenceNumber.value! = null and links. Id.inputValue.sequenceNumber.value > 0? {'Edit': 'Create'}
Jean Lou
-
How to count the values in row
Hello
50 columns in a table are and 10 records are there. In these 10 records are not inserted not all columns (some are null values). How to find the values of The Count of Record (row).
For example
Table
P1 p2 p3 p4 p5 p6 p7 p8 p9 p10...
10 20 30 40 50
20 30
60 80
In the table below - before, how to find
the number of values in 1 record is 5
the number of values in 2nd record is 2
the number of values in 3rd record is 2
--
Thank you and best regards,
Haridecode(p1,null,0,1)+ decode(p2,null,0,1)+ decode(p3,null,0,1)+ ...
-
How to set the value of a column in a table according to another column?
Hello world!
I use Apex 4.1.
My question is how can I set the value of a column in a table according to another column?
I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).
I tried to use javascript as
for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.$('input[name=f02]').live('change', function(){ if($(this).val()!='1'){ $('input[name=f03]').val("test")} });
Can someone give me a hint in any way to do this if possible?
Kind regards
drama9346You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:
and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).
In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:
DECLARE --putting x01 in a var to simplify l_test_var VARCHAR2(200) := apex_application.g_x01; l_return VARCHAR2(200); BEGIN -- a simplistic test IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN l_return := 'String is between 10 and 20'; END IF; --this will write l_return to the buffer, and the ajax callback will receive this htp.p(l_return); END;
And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.
-
How to extract the values of XMLTYPE column,
SQL > create table temporary global xmtype_tab (xmlfile xmltype);
SQL > select * from all_directories;
SYS RESTOREDIR/home / / dbimptask /.
insert into xmtype_tab values (xmltype (dbms_xslprocessor.read2clob ('RESTOREDIR ','LAS_SETUP.xml ')));
1 line of creation.
SQL > select * from xmtype_tab;
XMLFILE
--------------------------------------------------------------------------------
<? XML version = "1.0"? >
rowset <>
< ROW >
< DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
How to extract the values inside each tag?
XML file has the following data...
rowset <>
< ROW >
< DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
< > 9600 BAUD_RATE < / BAUD_RATE >
< ACK_TIMEOUT > 1 < / ACK_TIMEOUT >
< TUBE_TRAVEL_LIMIT > 4 < / TUBE_TRAVEL_LIMIT >
< SEND_SID_TIMEOUT > 1 < / SEND_SID_TIMEOUT >
< INDEX_Q_TIMEOUT > 2 < / INDEX_Q_TIMEOUT >
< HW_HANDSHAKING > 1 < / HW_HANDSHAKING >
< / ROW >
< / LINES > ';
I use the Oracle 10.2.0.3 version...Why does this work?
You are missing the tag of the ROWSET:
select extractvalue (xmlfile, '/ROWSET/ROW/BAUD_RATE') baud_rate from xmltype_tab where existsnode (xmlfile, '/ROWSET/ROW/BAUD_RATE') = 1;
-
Hi friends,
I came across one of the scenarios, i.e.
In my application, I have a report page and a form page, the report and the form are based on the unique table...
If a record is inserted medium, means it will be inserted in the report...
in the region of report I have an button called then if I clicked the next button means a form page must open to capture all values which is inserted in the report of each field of the form...
How to capture the values of the ratio to form shortly after clicking on the button NEXT in the region of report...
Help me solve this question friends,
Thank you
Saro...Hello
For the Next button , which is located in the region of report,
change the Action: to redirect to the page and give the respective page number: (i.e.) the target...
And specify the value of these items: what are all the elements of the target.
with these values: describe the elements of the source where you will take the values of the corresponding points...
Izz all wells
GTA...
Maybe you are looking for
-
You can search for your personal library with Siri on the Apple TV and if so, how?
You can search for your personal library with Siri on the Apple TV and if so, how?
-
How to install Mozilla if I installed Windows7 Ultimate?
I can't install the browser I think ' couse now I installed Windws 7 Ultimate. When I try you RUN Mozilla kit is apear that I owe to loggin as an administrator with my password. but I do have an account like this, and for that, of course, I can not i
-
"Invalid serial number" when you install utilities Toshiba NB200-h-13
This model (h-13) is the student edition sponsored by the Government, used by thousands of Greek students and is not in the support downloads. I made a new partition and installed XP Pro SP3, in addition to the standard XP Home. I downloaded all the
-
the upgrade of T430s to with an SSD
I currently have a computer 14 "laptop T430s with a hard drive. I plan to upgrade to an SSD. My question is, in any 2.5 "SSD will be compatible with my laptop? Currently, I am planning to buy Samsung 840 EVO. I'm not sure if it is compatible (in term
-
Contained in the factory of recovery failure
3000 N100 Type: 0689 A42 Vista Basic Background: I pressed the F11 at startup the rescue and recovery program in order to have a recovery (content of the plant). Then, the system has begun to preload the customization. However, in State of play (the