Help with inserting values -- ORA-00984 error
Hello!
This time we have a problem with inserting values and we really can't find what's wrong!
The table was created as such
CREATE TABLE PASSAGER
(NO_PERSONNE INTEGER,
NO_PASSAGER INTEGER NOT NULL,
NO_PASSEPORT INTEGER NOT NULL,
NATIONALITE VARCHAR2(30) NOT NULL,
LIEU_EMISSION VARCHAR2(30) NOT NULL,
DATE_EMISSION DATE NOT NULL,
NO_TEL INTEGER,
NO_CC INTEGER,
NO_VENTE INTEGER NOT NULL,
CONSTRAINT PK_PASSAGER PRIMARY KEY (NO_PERSONNE),
CONSTRAINT FK_PASSAGER_PERSONNE FOREIGN KEY (NO_PERSONNE) REFERENCES PERSONNE (NO_PERSONNE),
CONSTRAINT FK_PASSAGER_VENTE FOREIGN KEY (NO_VENTE) REFERENCES VENTE (NO_VENTE));
We created a sequence..
CREATE SEQUENCE NOPASS_SEQ
START WITH 1
INCREMENT BY 1
NOCACHE
NOCYCLE;
for inserting the values, we did...
INSERT INTO PASSAGER VALUES (500,NOPASS_SEQ.NEXTVAL, WT456789,'CANADIENNE', 'CANADA', to_date('2007/10/12','YYYY/MM/DD'),5142348756,5157981500126734,1);
but it won't work, it's our last table and all the other worked perfectly!
Thanks a ton!
In your table creation, you got third column as
NO_PASSEPORT INTEGER NOT NULL,
where as you are passing varchar values (see bold)
INSERT INTO PASSAGER VALUES (500,NOPASS_SEQ.NEXTVAL, WT456789,+'CANADIENNE', 'CANADA', to_date('2007/10/12','YYYY/MM/DD'),5142348756,5157981500126734,1);
Should be like this I suppose
INSERT INTO PASSAGER VALUES (500,NOPASS_SEQ.NEXTVAL, *456789*,'CANADIENNE', 'CANADA', to_date('2007/10/12','YYYY/MM/DD'),5142348756,5157981500126734,1);
Similar Messages
-
Help with inserting values to sql database
Hello everyone I am having this problem with how to fill my values in my sql statement, if you look below you will notice i have set up the values to be the length of the arr (arrayList).
could someone please let me now how i should put there values in.
thanks for yr time
piper3
try {
String data = "jdbc:odbc:myProject";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(data,"","");
StringBuffer sb = new StringBuffer();
Iterator it1 = arr.iterator();
while (it1.hasNext())
if (sb.length() > 0)
sb.append(",");
sb.append(it1.next());
//takes the items of the arInterim
//int iCountInterim = arInterim.size();
int er = arr.size();
String sInterim = new String();
String sql = new String();
for(int i2 = 0; i2 < er; i2++){
sInterim = sInterim + sQuestion;
if(i2 < (er-1)){
sInterim = sInterim + sComma;
sql = "INSERT into Ben (" + sb.toString() + ") values (" + sInterim + ")";
System.out.println(sql);
PreparedStatement prepStmt = con.prepareStatement(sql);
/*prepStmt.setString(1, "hello");
prepStmt.setString(2, "hi");
prepStmt.setString(3, "bye");
prepStmt.executeUpdate();
prepStmt.close();*/
con.close();
} catch (Exception e1) {
System.err.println("Got an exception! ");
System.err.println(e1.getMessage());
//System.out.println();//.size());//tempkey+"\n"+tempvalue);you should write a prepared statement like this:
PreparedStatement updateSales = con.prepareStatement(
"UPDATE COFFEES SET SALES = ? WHERE COF_NAME LIKE ?");
where "?" is a placeholder for the values you want to use.
Then later when you want to actually update your database, first set the placeholders to your values (stored in your array for example) using a statement like this:
updateSales.setString(2, "Colombian");
//sets the 2. placeholder in the statement to the value "Colombian"
after having set all placeholders to a specific value, execute your statement:
updateSales.executeUpdate();
your code should like:
sql = "INSERT into Ben values (?,?,?)";
PreparedStatement prepStmt = con.prepareStatement(sql);
prepStmt.setString(1, "hello");
prepStmt.setString(2, "hi");
prepStmt.setString(3, "bye");
prepStmt.executeUpdate();
prepStmt.close();
HTH
Christine -
Need help with NULL values in Crosstables
Hello everybody,
I need some help with NULL values and crosstables. My issue is the following:
I have a query (BW - MDX-Query) that gives me turnover measures for each month. In Crystal Reports I choose crosstable to display this whereby I put all month in columns and all turnover-measures in rows. Each month that has a value (measures are not empty) is chown in the crosstables rows. So far so good. The problem occures when there are month that actually have no values (measures are empty). In that case these months are not chown in columns. But I need CR to display these columns and show the value 0. How can I do that?Hi Frank,
Cross tab shows the data based on your column and these column fields are grouped and based on the group it will show your summaries.
If there is no data for any of your group it will not display that group. In this case you will have to create a standard report which should look like cross tab and to get zero values you need to write formulas .
Example if you want to display Moth wise sales :
if Month() = 01 Then
sum() else 0
Now this formula will check if your month is Jan, then it will sum up the values else it will display zero value.
This is possible only through standard report not with Cross Tab.
Thanks,
Sastry -
How to read the 'Input help with fixed values' of domain .
How to read the 'Input help with fixed values' of domain .
The domain has a Value range i want to read those values .
Are these values stored in any table ?
Plz help me i need it ver badly...
Thanks in Advance...Hi Chandra Shekhar,
To read the 'Input help with fixed values' of domain , you can use the function module : HR_P_GET_FIXED_VALUE_TEXT.
iIf you enter the domain name, you will find the fixed values entered in the domain.
These values are stored in a table DD07L(DD zero 7 L). Here the values are stored based on domain name.
See if it works for you.
Award points if its helpful.
Regards,
Bhanu -
Need help with INSERT and WITH clause
I wrote sql statement which correctly work, but how i use this statment with INSERT query? NEED HELP. when i wrote insert i see error "ORA 32034: unsupported use of with clause"
with t1 as(
select a.budat,a.monat as period,b.vtweg,
c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
c.wrbtr,
c.matnr,
c.menge,
a.monat,
c.zuonr
from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='D'
and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
,t2 as(
select a.BUKRS,a.BELNR, a.GJAHR,t1.vtweg,t1.budat,t1.monat from t1, ldw_v1.bkpf a
where t1.zuonr=a.xblnr and a.blart='WL' and bukrs='8431'
,tcogs as (
select t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
sum(bseg.wrbtr) as COGS,bseg.matnr,bseg.kunnr,sum(bseg.menge) as QUANTITY
from t2, ldw_v1.bseg
where t2.bukrs=bseg.bukrs and t2.belnr=bseg.BELNR and t2.gjahr=bseg.gjahr and BSEG.KOART='S'
group by t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
bseg.matnr,bseg.kunnr
,t3 as
select a.budat,a.monat,b.vtweg,
c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
case when c.shkzg='S' then c.wrbtr*(-1)
else c.wrbtr end as NTS,
c.matnr,c.kunnr,
c.menge*(-1) as Quantity
from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='S'
and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
,trevenue as (
select t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,
sum(t3.NTS) as NTS,t3.matnr,t3.kunnr,sum(t3.QUANTITY) as QUANTITY
from t3
group by t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,t3.matnr,t3.kunnr
select NVL(tr.budat,tc.budat) as budat,
NVL(tr.monat,tc.monat) as monat,
NVL(tr.vtweg,tc.vtweg) as vtweg,
NVL(tr.gjahr, tc.gjahr) as gjahr,
tr.hkont as NTS_hkont,
tc.hkont as COGS_hkont,
NVL(tr.prctr,tc.prctr) as prctr,
NVL(tr.MATNR, tc.MATNR) as matnr,
NVL(tr.kunnr, tc.kunnr) as kunnr,
NVL(tr.Quantity, tc.Quantity) as Quantity,
tr.NTS as NTS,
tc.COGS as COGS
from trevenue TR full outer join tcogs TC
on TR.BUDAT=TC.BUDAT and TR.MONAT=TC.MONAT and TR.GJAHR=TC.GJAHR
and TR.MATNR=TC.MATNR and TR.KUNNR=TC.KUNNR and TR.QUANTITY=TC.QUANTITY
and TR.VTWEG=TC.VTWEG and TR.PRCTR=TC.PRCTR
Edited by: user13566113 on 25.03.2011 5:26Without seeing what you tried it is hard to say what you did wrong, but this is how it would work
SQL> create table t ( n number );
Table created.
SQL> insert into t
2 with test_data as
3 (select 1 x from dual union all
4 select 2 x from dual union all
5 select 3 x from dual union all
6 select 4 x from dual)
7 select x from test_data;
4 rows created.
SQL> -
Hi,
I have 2 tables. In 1st one, I insert a record, and a PRE-INSERT based trigger modify value of columns CODE. I then need to insert a record in my 2nd table with the value insert in TABLE1.CODE (FK/PK). I tried to use returning clause like this :
PROCEDURE CONVERTIR_DOCVENTE(PCODE IN CHAR) IS
VCODE TABLE1.CODE%TYPE;
BEGIN
INSERT INTO TABLE1 ... RETURNING CODE INTO VCODE;
INSERT INTO TABLE2 VALUES(VCODE);
END;
It does not work (ORA-00933: SQL command not properly ended at line 4)
any idea ?
nullTABLE1 : CODE CHAR(10) PK,DESIG VARCHAR2(100)
TABLE2 : CODE CHAR(10) PK,TABLE1_CODE CHAR(10) FK,DESIG VARCHAR2(100)
Both have a sequence on CODE
I need to insert in TABLE1 'My master record' and in TABLE2 'Child record 1' and 'Child record 2'.
When I insert 'My master record' in TABLE 1 (INSERT into TABLE1(DESIG) values('My master record')), a trigger query my sequence and fetch CODE column. When I then insert 'Child record 1' and 'Child record 2', I need to know the value inserted in TABLE1.CODE to insert it in TABLE2.TABLE1_CODE (INSERT into TABLE2(TABLE1_CODE,DESIG) values(??????,'Child record X')). That's why I need to use RETURNING clause in the first INSERT order.
But it doesn't works (ORA-00933: SQL command not properly ended at line 4)
Note : All my orders are in a stored procedure.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Riaz Shahid ([email protected]):
Hi!
Would u clearifiy ur point please so that i can advise you. Feel free to mail me.
Regards
<HR></BLOCKQUOTE>
null -
Please help with SSL POST: Servlet returns Error 500
I am struggling for many days to get a Java program to log in to an SSL page. The program is supposed to track ADSL usage statistics from https://secure.telkomsa.net/titracker/, but I never seem to get around Server returned Error 500.
Could anyone please help me understand what I am doing wrong by looking at the method I used. (It seems on the server side it is a jsp servlet that handles authentication).
Any help is deeply appreciated!
I copy-paste the method directly from NetBeans:
CODE>
void connectHTTPS(String url){
try {
URL page = new URL(url); // login page necessary to get a jsp session cookie
//------------ SET UP SSL - is it right?
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
try {
//if we have the JSSE provider available,
//and it has not already been
//set, add it as a new provide to the Security class.
final Class clsFactory = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
if( (null != clsFactory) && (null == Security.getProvider("SunJSSE")) )
Security.addProvider((Provider)clsFactory.newInstance());
} catch( ClassNotFoundException cfe ) {
throw new Exception("Unable to load the JSSE SSL stream handler." +
"Check classpath." + cfe.toString());
URLConnection urlc = page.openConnection();
urlc.setDoInput(true);
*Get the session id cookie set by the TelkomInternet java server
String cookie = urlc.getHeaderField("Set-Cookie");
//textpane.setText(totextpane);
textpane.setText(cookie);
//---------------- form an auth request and post it with the cookie
String postdata =URLEncoder.encode("ID_Field","UTF-8")+"="+URLEncoder.encode("myusrname","UTF-8")+"&"+URLEncoder.encode("PW_Field","UTF-8")+"="+URLEncoder.encode("mypwd","UTF-8")+"&"+URLEncoder.encode("confirm","UTF-8")+"="+URLEncoder.encode("false","UTF-8");
// set the servlet that handles authentication as target
URL page2 = new URL("https://secure.telkomsa.net/titracker/servlet/LoginServlet");
// cast to httpConn to enable setRequestMethod()
HttpURLConnection urlc2 = (HttpURLConnection)page2.openConnection();
// formulate request with POST data urlc2.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
urlc2.setRequestMethod("POST"); // experimental
urlc2.setRequestProperty("Content-Length",""+postdata.length());
urlc2.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)");
urlc2.setRequestProperty("Accept-Language","en-us");
urlc2.setUseCaches(false);
urlc2.setDoOutput(true);
urlc2.setDoInput(true);
urlc2.setFollowRedirects(true); // ??
//send cookies
urlc2.setRequestProperty("Set-Cookie", cookie); // or "Cookie" - doesn't work either
//write other data
PrintWriter out = new PrintWriter(urlc2.getOutputStream());
out.print(postdata); // username and password here
out.flush();
out.close();
//---------------- get the authenticated page with real ADSL statistics
BufferedReader br = new BufferedReader(new InputStreamReader(urlc2.getInputStream()));
String totextpane = "";
String buffer = "";
while (buffer != null) {
try {
totextpane = totextpane + "\n" + buffer;
buffer = br.readLine();
} catch (IOException ioe) {
ioe.printStackTrace();
break;
textpane.setText(totextpane);
} catch (Exception ex) {
System.err.println(ex.getMessage());
---- END CODE---
Thank you very much for any attempt at helping with this problem!I am struggling for many days to get a Java program to log in to an SSL page. The program is supposed to track ADSL usage statistics from https://secure.telkomsa.net/titracker/, but I never seem to get around Server returned Error 500.
Could anyone please help me understand what I am doing wrong by looking at the method I used. (It seems on the server side it is a jsp servlet that handles authentication).
Any help is deeply appreciated!
I copy-paste the method directly from NetBeans:
CODE>
void connectHTTPS(String url){
try {
URL page = new URL(url); // login page necessary to get a jsp session cookie
//------------ SET UP SSL - is it right?
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
try {
//if we have the JSSE provider available,
//and it has not already been
//set, add it as a new provide to the Security class.
final Class clsFactory = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
if( (null != clsFactory) && (null == Security.getProvider("SunJSSE")) )
Security.addProvider((Provider)clsFactory.newInstance());
} catch( ClassNotFoundException cfe ) {
throw new Exception("Unable to load the JSSE SSL stream handler." +
"Check classpath." + cfe.toString());
URLConnection urlc = page.openConnection();
urlc.setDoInput(true);
*Get the session id cookie set by the TelkomInternet java server
String cookie = urlc.getHeaderField("Set-Cookie");
//textpane.setText(totextpane);
textpane.setText(cookie);
//---------------- form an auth request and post it with the cookie
String postdata =URLEncoder.encode("ID_Field","UTF-8")+"="+URLEncoder.encode("myusrname","UTF-8")+"&"+URLEncoder.encode("PW_Field","UTF-8")+"="+URLEncoder.encode("mypwd","UTF-8")+"&"+URLEncoder.encode("confirm","UTF-8")+"="+URLEncoder.encode("false","UTF-8");
// set the servlet that handles authentication as target
URL page2 = new URL("https://secure.telkomsa.net/titracker/servlet/LoginServlet");
// cast to httpConn to enable setRequestMethod()
HttpURLConnection urlc2 = (HttpURLConnection)page2.openConnection();
// formulate request with POST data urlc2.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
urlc2.setRequestMethod("POST"); // experimental
urlc2.setRequestProperty("Content-Length",""+postdata.length());
urlc2.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)");
urlc2.setRequestProperty("Accept-Language","en-us");
urlc2.setUseCaches(false);
urlc2.setDoOutput(true);
urlc2.setDoInput(true);
urlc2.setFollowRedirects(true); // ??
//send cookies
urlc2.setRequestProperty("Set-Cookie", cookie); // or "Cookie" - doesn't work either
//write other data
PrintWriter out = new PrintWriter(urlc2.getOutputStream());
out.print(postdata); // username and password here
out.flush();
out.close();
//---------------- get the authenticated page with real ADSL statistics
BufferedReader br = new BufferedReader(new InputStreamReader(urlc2.getInputStream()));
String totextpane = "";
String buffer = "";
while (buffer != null) {
try {
totextpane = totextpane + "\n" + buffer;
buffer = br.readLine();
} catch (IOException ioe) {
ioe.printStackTrace();
break;
textpane.setText(totextpane);
} catch (Exception ex) {
System.err.println(ex.getMessage());
---- END CODE---
Thank you very much for any attempt at helping with this problem! -
Please help with Windows 7 x64 System error: Critical Kernel-power Event 41
I'm recieving this error while moving my laptop or working with it? Can someone help me to read memory dumps and to understand what causes this error please?
Where i can fount theese dump files? Can someone read them and is it possible to understand what is happening?
I have made full check of my memory and there are No errors I've also checked HDD with regenerator there are no errors too. but this not means that they can not be the problem. There is doubt about one of my HDD because when laptop is blocking there is bad
noise from HDD.
PS: There is another issue which is strange two of times when this happens the whole MBR was destroyed and the system refuses to boot ... only reboots. And i made bootrec /fixboot /fixmbr and this solve the problem ... I don't know is this connected with
system error, but i'm trying to give more details.
Thanks a lot.
Here are i'm posting my error details:
System
Provider
[ Name]
Microsoft-Windows-Kernel-Power
[ Guid]
{331C3B3A-2005-44C2-AC5E-77220C37D6B4}
EventID
41
Version
2
Level
1
Task
63
Opcode
0
Keywords
0x8000000000000002
TimeCreated
[ SystemTime]
2011-06-25T20:38:38.328017300Z
EventRecordID
7571
Correlation
Execution
[ ProcessID]
4
[ ThreadID]
8
Channel
System
Computer
Rumen-PC
Security
[ UserID]
S-1-5-18
EventData
BugcheckCode
0
BugcheckParameter1
0x0
BugcheckParameter2
0x0
BugcheckParameter3
0x0
BugcheckParameter4
0x0
SleepInProgress
true
PowerButtonTimestamp
129535076822776383Before every critical Errors in event log i found information about Kernel Power I'm pasting it here:
System
Provider
[ Name]
Microsoft-Windows-Kernel-Power
[ Guid]
{331C3B3A-2005-44C2-AC5E-77220C37D6B4}
EventID
89
Version
0
Level
4
Task
86
Opcode
0
Keywords
0x8000000000000020
TimeCreated
[ SystemTime]
2011-06-27T16:07:21.023625500Z
EventRecordID
9262
Correlation
Execution
[ ProcessID]
4
[ ThreadID]
44
Channel
System
Computer
Rumen-PC
Security
[ UserID]
S-1-5-18
EventData
ThermalZoneDeviceInstanceLength
21
ThermalZoneDeviceInstance
ACPI\ThermalZone\TZS1
AffinityCount
1
_PSV
0
_TC1
0
_TC2
0
_TSP
0
_AC0
0
_AC1
0
_AC2
0
_AC3
0
_AC4
0
_AC5
0
_AC6
0
_AC7
0
_AC8
0
_AC9
0
_CRT
361
_HOT
0
_PSL
0000000000000000
System
Provider
[ Name]
Microsoft-Windows-Kernel-Power
[ Guid]
{331C3B3A-2005-44C2-AC5E-77220C37D6B4}
EventID
89
Version
0
Level
4
Task
86
Opcode
0
Keywords
0x8000000000000020
TimeCreated
[ SystemTime]
2011-06-27T16:07:21.039225600Z
EventRecordID
9263
Correlation
Execution
[ ProcessID]
4
[ ThreadID]
44
Channel
System
Computer
Rumen-PC
Security
[ UserID]
S-1-5-18
EventData
ThermalZoneDeviceInstanceLength
21
ThermalZoneDeviceInstance
ACPI\ThermalZone\TZS0
AffinityCount
1
_PSV
359
_TC1
0
_TC2
50
_TSP
0
_AC0
0
_AC1
0
_AC2
0
_AC3
0
_AC4
0
_AC5
0
_AC6
0
_AC7
0
_AC8
0
_AC9
0
_CRT
361
_HOT
0
_PSL
0000000000000000
These two informations are before every critical error. -
Can anyone help with an out of memory error on CS2?
Hello,
I have been battling with an out of memory error on a dell laptop running 2gb of ram. I have had no prior issues with this laptop running CS2 until last week when I started getting the out of memory errors. I have seen several articles about this occuring on later versions of illustrator. Just prior to this issue appearing I had to delete and rebuild the main user profile on the computer due to it consistently logging into a temporary account.
Once the new profile was established and all user documents and profile settings were transferred back into it, this problem started showing up. The error occurs when clicking on files listed as Illustrator files, and when opening the illustrator suite. Once I click on the out of memory error it still continues to load illustrator. The files are located on a server and not on the remote computer. I have tried to copy the files to the local hard drive with the same result when I try to open them. I also tried to change the extension to .pdf and got no further. I tried to open a file and recreate the work and all I got was the black outline of the fonts. none of the other artwork appeared. once rebuilt, when trying to save, It gives the out of memory error and does not save the file.
Illustrator was installed on another dell laptop, same model, etc and works fine. no problem accessing network files. I just attempted to use Illustrator from the admin profile on the machine in question and it works fine and lightening fast. Just not from the new rebuilt profile. I have tried to uninstall and reinstall the software. it has not helped. could there be stray configuration settings that we transfered over to the new profile that should not have been?
Any insights will be helpful.
Thank You,
Brad YeutterHere are some steps that could help you:
http://kb2.adobe.com/cps/320/320782.html
http://kb2.adobe.com/cps/401/kb401053.html
I hope this helps! -
Need Help with Inserting Timeline Markers
Friends,
I have not use my premiere element 3.2 since 2008 and forgot some of the procedures. now, I need help with the insertion of Timeline Markers. I did what the Help Page showed me. But the markers were not effective in the resulting DVD, or, even when viewing the video in the editing page as if thye were not there! Here is what I did:.
1) Click the Timeline button.
2) Click in an empty space in a video or audio track in the Timeline to make the Timeline active and deselect any clips.
3) Move the current-time indicator in the Timeline to the frame where I need the marker.
4) Click the Add Marker icon in the Timeline to place the Marker 5 times where I want them.
5) Verified that each Timeline Marker is present at the intended place.
6) Burned DVD
7) Can NOT jump to any of the intended Marker in the Resulting DVD during playback.
The question is "What did I do wrong or didn't do?" It seems that I did the same before and worked! Please advise!
Also, what are the significance of the Red line just below the Timeline and the yellow bars inside the video and audio frames. But after preforming Timeline/Render Work Area, they were all gone? What purposes do they serve and what is the significance of Rendering? Thank you for your help!
I repeat the process and did a Rendering before making the DVD also. It did not help!
Andy LimSteve,
Long time no talk! You used to help me out many times when the PE-1 through PE-3 came out. I was HOPING you would still be around and you are! You came through again this time! Many thanks to you.
I use the Add DVD Scene button to insert the Markers. They are Green. Made a DVD and the markers work OK although ythey are "effective" during play back using the editing window.
While that problem was solved, will you come back and answer the other two questions concerning Rendering and the Red/Yellow lines? I would appreciate it very much!
Andy Lim
~~~~~~~~~~~~~~~~ -
Hi,
I am having issue in inserting value into table by using select statement.
Source table look like this
acct eff_date amt
1 03/04/2012 100
1 03/05/2012 200
1 03/06/2012 100
target table look like this
acct eff_date end_date amt
1 03/04/2012 03/05/2012 100
1 03/05/2012 03/06/2012 200
1 03/06/2012 default value (12/31/9999) 100
My query is
insert into table_tgt
select
acct,
eff_date,
end_date,
amt
from
select
acct,
eff_date,
amt,
row_number() over(partition by acct order by eff_date) as rn,
lead(eff_date) over(partition by acct order by eff_date) as end_date
from table_src
but the query returns value as
acct eff_date end_date amt
1 03/04/2012 03/05/2012 100
1 03/05/2012 03/06/2012 200
1 03/06/2012 null 100
how to get default value when the value is null.
Kindly help.
Regards,
Punitha936698 wrote:
Hi,
I am having issue in inserting value into table by using select statement.
Source table look like this
acct eff_date amt
1 03/04/2012 100
1 03/05/2012 200
1 03/06/2012 100
target table look like this
acct eff_date end_date amt
1 03/04/2012 03/05/2012 100
1 03/05/2012 03/06/2012 200
1 03/06/2012 default value (12/31/9999) 100
My query is
insert into table_tgt
select
acct,
eff_date,
end_date,
amt
from
select
acct,
eff_date,
amt,
row_number() over(partition by acct order by eff_date) as rn,
lead(eff_date) over(partition by acct order by eff_date) as end_date
from table_src
but the query returns value as
acct eff_date end_date amt
1 03/04/2012 03/05/2012 100
1 03/05/2012 03/06/2012 200
1 03/06/2012 null 100
how to get default value when the value is null.
Kindly help.
Regards,
PunithaJust Use the NVL() to handle NULL Values as
Try this..
select
acct,
eff_date,
nvl(end_date,to_date('12/31/9999','MM/DD/YYYYY'))
amt
from
select
acct,
eff_date,
amt,
row_number() over(partition by acct order by eff_date) as rn,
lead(eff_date) over(partition by acct order by eff_date) as end_date
from table_src
Thanks,
Shankar
Edited by: Shankar Viji on Jun 7, 2012 12:42 AM -
MERGE statement - Source with duplicate values not raising error ora-30926
Hi ,
I'm having a problem with merge that has already been reported in another thread ( Re: MERGE strange behavior ). I created a procedure with a query and have tested inserting two equal values on the Key column to raise the error. But on the first time there i run the Procedure it runs without error, apparently updating with the first row found. On the second time there i run the procedure then Oracle raises the error.
Above you can see the code to simulate the issue:
-- creating the table
create TABLE teste
( ID NUMBER NOT NULL , DESCR VARCHAR2 (20 CHAR) , GRUPO VARCHAR2 (30 CHAR) );
-- inserting the pk in table
ALTER TABLE Teste
ADD CONSTRAINT DimTestec_PK PRIMARY KEY ( ID ) ;
-- inserting records in the table
insert into teste
select -2 AS id,'t-2' AS descr,'t-2g' AS grupo from dual
union all
select -1 AS id,'t-1' AS descr,'t-1g' AS grupo from dual
union all
select 1 AS id,'t1' AS descr,'t1g' AS grupo from Dual
union all
select 2 AS id,'t2' AS descr,'t2g' AS grupo from Dual
union all
select 3 AS id,'t3' AS descr,'t3g' AS grupo from Dual
union all
select 4 AS id,'t4' AS descr,'t4g' AS grupo from Dual
union all
select 5 AS id,'t5' AS descr,'t4g' AS grupo from Dual
--create the procedure to teste the merge
create or replace procedure mergeteste is
Begin
MERGE INTO teste testemerge
USING ( select -2 AS id,'t-2' AS descr,'t-2g' AS grupo from dual
union all
select -1 AS id,'t-1' AS descr,'t-1g' AS grupo from dual
union all
select 1 AS id,'t1' AS descr,'t1g' AS grupo from Dual
union all
select 2 AS id,'t2' AS descr,'t2g' AS grupo from Dual
union all
select 3 AS id,'t3' AS descr,'t3g' AS grupo from Dual
union all
select 4 AS id,'t4' AS descr,'t4g' AS grupo from Dual
union all
select 5 AS id,'t5' AS descr,'t4g' AS grupo from Dual
union all
select 5 AS id,'t6' AS descr,'t6' AS grupo from Dual ) testesource
ON (testemerge.id = testesource.id)
WHEN MATCHED THEN
UPDATE SET testemerge.descr = testesource.descr,
testemerge.grupo = testesource.grupo
WHEN NOT MATCHED THEN
INSERT ( testemerge.id, testemerge.descr, testemerge.grupo )
VALUES ( testesource.id, testesource.descr, testesource.grupo ) ;
commit work;
EXCEPTION
WHEN OTHERS THEN
begin
ROLLBACK;
dbms_output.put_line(dbms_utility.format_error_stack||dbms_utility.format_error_backtrace);
end;
end mergeteste;
-- the first time you execute the procedure, it runs without error - when it shouldn't run cause there's two id with value 5 on the testesource query.
-- the second time it raises the expected error.
Here's the oracle version:
1 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
2 PL/SQL Release 11.2.0.3.0 - Production
3 CORE 11.2.0.3.0 Production
4 TNS for Linux: Version 11.2.0.3.0 - Production
5 NLSRTL Version 11.2.0.3.0 - Production
Thanks in advance.
Best Regards.
Renan RibeiroHi, Renan,
That sounds like a bug. In Oracle 11.1, I get the error the first time I run the procedure, but in Oracle 11.2, I get the same results you do (that is, no error the first time I run the procedure, error the second time). -
Urgent help with memory issue (ORA-04031)
Hi Geeks,
Came Across this below error in alert log in of our databases. Interestingly this error only pops up while the database backup runs. Below are the memory parameters.
memory_max_target big integer 14G
memory_target big integer 13G
pga_aggregate_target big integer 0
sga_target big integer 0
shared_pool_reserved_size big integer 192M
shared_pool_size big integer 0
ORA-04031: unable to allocate 5792 bytes of shared memory
("shared pool","unknown object","sga heap(1,1)","ges resource ")
Errors in file /apps/opt/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_lmd0_14123.trc
I have tried specifying a value to shared_pool_size but with no luck..!! Pls help. I am not sure how to resolve this.Hi, ORA-4031 in this case can be caused by unrestricted growth of the PGA, thus forcefully reducing the SGA.
We've had this in the past also.
The solution is in older versions to increase the shared_pool_size as you mentioned but with ASMM, this is no longer an option. You can however retrict the growth of the PGA by setting SGA_TARGET.
On our system this now looks like:
SQL> show parameter _target
NAME TYPE VALUE
db_flashback_retention_target integer 1440
memory_max_target big integer 10G
memory_target big integer 10G
pga_aggregate_target big integer 0
sga_target big integer 8GSee how we in fact set the max growth of the PGA to 2Gb ( 10Gb - 8Gb)
Try this and see if ot works for you also
Success!!
FJFranken -
Need help with inserting 10MB CLOB
Hi,
I have an urgent issue and desperately need some help.
There are several files on a FTP server that I need to insert their contents into a CLOB type column. One of the files has more than 10MB contents. What I've been doing is after connection is made to the FTP server, read in the contents in a file line by line into a String, then execute a SQL INSERT statement to insert a new record into the target table.
+//.... make connection, read in files and parse into a String variable called fileContents+
String psInsert = "Insert into FileTrack (Name, Contents) values";
PreparedStatment ps = conn.prepareStatement(psInsert "(?,?)");+
ps.setString(1, "some name");
ps.setObject(2, fileContents);
ps.executeUpdate();
The above works fine for all other smaller files, except the 10MB one. The error I got was SQLCODE: -302, SQLSTATE: 22001, which is about not enough space issue. So I increased the CLOB column size and made sure it doesn't exceed the initial CLOB size setting and the database has plenty of space for storing this 10MB file. Still, I got the same error.
Then I tried the following:
ps.setObject(2, fileContents, java.sql.Types.CLOB);
Failed with same error...
Then I tried this:
FileInputStream inputStream = new FileInputStream(fileContents);
ps.setAsciiStream(2, inputStream, (int)()fileContents.length()));
Still failed with the same error....
Then I changed to ps.setCharStream()... still failed....
What other options do I have to insert the 10MB contents? Can someone please help?
Thanks heaps in advance!!we're still trying to upload that CLOB. Takes a while over this 2400bps modem ;)
-
Help with inserting/removing integer from a specific index
I have an IntList that I am adding methods to and an IntListTest driver that allows me to add those options to test. I am having difficulty adding the two methods:
public void removeAt() - removes the value at a specified location at given index with consideration of the size of the list when user enters a valid position
public void insertAt(int index, int newValue) - inserts integer and puts it in the specified index of list however...i also have to take into consideration the size of the list as the user enters a valid position
I started on the insertAt(int index, int newValue) method:
// **Inserts an element to the list at a specified position
public void insertAt(int index, int newValue)
IntNode newnode = new IntNode(newValue, null);
for (int index =0; index < count; index++)
if(list[index] == newValue) //error occurs, brackets pertain to arrays, correct?
//if list is empty, this will be the only node in it
if (list == null)
list = newnode;
else
//temp point directed to the last thing on list, but want to be
//able to insert any where, specified location
IntNode temp = list;
while (temp.next != null)
temp = temp.next;
//link new node into list and insert
temp.next = newnode;
count++;
}First off, how do I write the method so that the user specifies a value at a given index and is located...From what I understand, this portion of the insertAt method is stating that the temp point will go directly to the last index:
//temp point directed to the last thing on list, but want to be
//able to insert any where, specified location
IntNode temp = list;
while (temp.next != null)
temp = temp.next;Here's where I am having complications, because I don't know where to go from here. I want the method to be able to insert at any specified index rather than just the last...I will use the insertAt method as an example for my removeAt method, so hopefully I can get input from anyone willing to help...Thanks - using textpad editor with java 1.5 compiler
Onip28Thanks for the reply - this is an assignment and I'm dealing with linked structures, I apologize for not specifying that. I have to add a total of six methods to the IntList class (e.g...public int length, String toSting, void removeLast, void search(int input), and the two mentioned - void insertAt(int index, int newValue), and void removeAt(int index)). I figured out the first two, but have had no luck with the remaining one. Here is a sample of that code -
// FILE: IntList.java
// Purpose: Defines a class that represents a list of integers
//Assignment 3 - methods to fill in, declare any variables where necessary
public class IntList
private IntNode list; //first node in list
private int currentSize;
public int count;
String [] elements;
// Constructor. Initially list is empty.
public IntList()
list = null;
// Adds given integer to list of list.
public void addToFront(int val)
list = new IntNode(val,list);
count++;
// Adds given integer to end of list.
public void addToEnd(int val)
IntNode newnode = new IntNode(val,null);
//if list is empty, this will be the only node in it
if (list == null)
list = newnode;
else
//make temp point to last thing in list
IntNode temp = list;
while (temp.next != null)
temp = temp.next;
//link new node into list
temp.next = newnode;
count++;
// Removes the first node from the list.
// If the list is empty, does nothing.
public void removeFirst()
if (list != null)
list = list.next;
count--;
// **returns the number of elements in the list
public int length()
return count;
// **returns a String containing the print value of the list.
public String toString()
StringBuffer result = new StringBuffer("{ ");
for (int i=0; i < currentSize; i++) {
if (i > 0)
result.append(", ");
result.append(elements);
result.append(" }");
return result.toString();
// **removes the last element of the list. If the list is empty, does nothing.
//public void removeLast()
//Come back to this...
// **searches all occurrences of a value user enters in the list.
//public void search(int input)
//Come back to this...
// **Inserts an element to the list at a specified position
public void insertAt(int index, int newValue)
IntNode newnode = new IntNode(newValue, null);
for (int index =0; index < count; index++)
if(list[index] == newValue) //error occurs, brackets pertain to arrays, correct?
//if list is empty, this will be the only node in it
if (list == null)
list = newnode;
else
//temp point directed to the last thing on list, but want to be
//able to insert any where, specified location
IntNode temp = list;
while (temp.next != null)
temp = temp.next;
//link new node into list and insert
temp.next = newnode;
count++;
// **Deletes an element from the list at a specified position
public void removeAt(int index)
//Come back to this...
// Prints the list elements from first to last.
public void print()
System.out.println("---------------------");
System.out.print("List elements: ");
IntNode temp = list;
while (temp != null)
System.out.print(temp.val + " ");
temp = temp.next;
System.out.println("\n---------------------\n");
// An inner class that represents a node in the integer list.
// The public variables are accessed by the IntList class.
private class IntNode
public int val; //value stored in node
public IntNode next; //link to next node in list
// Constructor; sets up the node given a value and IntNode reference
public IntNode(int val, IntNode next)
this.val = val;
this.next = next;
But as stated, my problem is merely the portion where the the I make adjustments to the "next values" in the associated nodes...
//temp point directed to the last thing on list, but want to be
//able to insert any where, specified location
IntNode temp = list;
while (temp.next != null)
temp = temp.next;I apologize if I am not answering your question correctly but I'm trying to make sense of all this, but need some suggestions/input/advice...Thx.
Regards, Onip28
Maybe you are looking for
-
JPGs exported from Lightroom 5.6 will not open in other applications
Recently I have noticed that jpgs exported from Lightroom 5.6 can not be opened in Canon DPP 3.14 and can not be resized using Image Resizer plugin. Both of these I use frequently. I have seen mention of this issue re other applications also. Does an
-
How do you create a section in labview using the configurat​ion file vis
I'm trying to create a new section in Labview. All i see is the possibilties to read sections and keys, write keys, delete sections. Is there a way to write a new section in Labview. Thanks, Brandon Solved! Go to Solution.
-
If you create an album in iPhoto and you decide to also publish it as a MobileMe Gallery you will see both in the left hand sidebar in iPhoto - the regular album and the published album - all is well. You are able to drop EITHER of these into an iWeb
-
Pkcs#11:store data in usb token (marked as q)
Hi, can the pkcs#11 be used to store data on a usb token? For example storing an id? Thanks PS: What is this "mark as question" thing? Edited by: uig on Oct 26, 2007 1:51 AM
-
I from Indonesia I have this question, what the apps for reading Microsoft office word,excel,power point and PDF,please help me