unable insert record show error
-
hi read my this query insert into attandance values('18-AUG-2009','General','1','IT',(to_date('10:32:00 AM',hh:mi:ss tt'),(to_date('10:32:00 AM','hh:mi:ss tt)),'jawad kahtri'); when i use this show error error is Bind variable "32" not declared. thanks in advance. jawad khatri
-
hi read my this query insert into attandance values('18-AUG-2009','General','1','IT',(to_date('10:32:00 AM',hh:mi:ss tt'),(to_date('10:32:00 AM','hh:mi:ss tt)),'jawad kahtri'); when i use this show error error is Bind variable "32" not declared. thanks in advance. jawad khatri
If nothing else you are missing some single quotes, one between AM', and hh:mi:ss the other between ss tt and )) This fixes those two errors for you:
insert into attandance values('18-AUG-2009','General','1','IT',(to_date('10:32:00 AM','hh:mi:ss tt'),(to_date('10:32:00 AM','hh:mi:ss tt')),'jawad kahtri');
Whether there is anything else wrong time will tell, but it had no chance of working without those quotes!
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
-
If nothing else you are missing some single quotes, one between AM', and hh:mi:ss the other between ss tt and )) This fixes those two errors for you:
insert into attandance values('18-AUG-2009','General','1','IT',(to_date('10:32:00 AM','hh:mi:ss tt'),(to_date('10:32:00 AM','hh:mi:ss tt')),'jawad kahtri');
Whether there is anything else wrong time will tell, but it had no chance of working without those quotes!
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
thanks sir but when i insert this show error ERROR at line 1: ORA-00907: missing right parenthesis Name Null? Type ------------------------------- -------- ---- ATT_DATE NOT NULL DATE SHIFT NOT NULL VARCHAR2(8) EMP_ID NOT NULL NUMBER DEP_ID VARCHAR2(20) TIMEIN DATE TIMEOUT DATE EMP_NAME VARCHAR2(20) this is my table iwant to insert time in time in or time out. please help me. thanks
-
thanks sir but when i insert this show error ERROR at line 1: ORA-00907: missing right parenthesis Name Null? Type ------------------------------- -------- ---- ATT_DATE NOT NULL DATE SHIFT NOT NULL VARCHAR2(8) EMP_ID NOT NULL NUMBER DEP_ID VARCHAR2(20) TIMEIN DATE TIMEOUT DATE EMP_NAME VARCHAR2(20) this is my table iwant to insert time in time in or time out. please help me. thanks
Well, it's missing a right parenthesis - ie: ) insert into attandance values('18-AUG-2009','General','1','IT', (to_date('10:32:00 AM','hh:mi:ss tt'), <----------- MISSING FROM HERE (to_date('10:32:00 AM','hh:mi:ss tt')), 'jawad kahtri'); If you break it down like this, you can clearly see that the missing parenthesis is on the first to_date - compare it to the one below it!
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
-
Well, it's missing a right parenthesis - ie: ) insert into attandance values('18-AUG-2009','General','1','IT', (to_date('10:32:00 AM','hh:mi:ss tt'), <----------- MISSING FROM HERE (to_date('10:32:00 AM','hh:mi:ss tt')), 'jawad kahtri'); If you break it down like this, you can clearly see that the missing parenthesis is on the first to_date - compare it to the one below it!
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
sir now i write this query insert into attandance values (to_date('18-AUG-2009','DD-MON-YYYY')), 'General', '1', 'IT', (to_date('10:32:00 AM','hh:mi:ss AM')), (to_date('10:32:00 AM','hh:mi:ss AM')), 'jawad kahtri'); show error in line 2 ERROR at line 2: ORA-00933: SQL command not properly ended what is means ???
-
sir now i write this query insert into attandance values (to_date('18-AUG-2009','DD-MON-YYYY')), 'General', '1', 'IT', (to_date('10:32:00 AM','hh:mi:ss AM')), (to_date('10:32:00 AM','hh:mi:ss AM')), 'jawad kahtri'); show error in line 2 ERROR at line 2: ORA-00933: SQL command not properly ended what is means ???
The general form of this type of insert is this: insert into TABLE (field list) values (value list) You are now missing an opening parenthesis for the value list. Since you aren't specifying a field list, your list of values must have one for every field in the table, in the correct order. insert into attandance values ( <----------------- ADDED PARENTHESIS HERE (to_date('18-AUG-2009','DD-MON-YYYY')), 'General', '1', 'IT', (to_date('10:32:00 AM','hh:mi:ss AM')), (to_date('10:32:00 AM','hh:mi:ss AM')), 'jawad kahtri' );
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
-
The general form of this type of insert is this: insert into TABLE (field list) values (value list) You are now missing an opening parenthesis for the value list. Since you aren't specifying a field list, your list of values must have one for every field in the table, in the correct order. insert into attandance values ( <----------------- ADDED PARENTHESIS HERE (to_date('18-AUG-2009','DD-MON-YYYY')), 'General', '1', 'IT', (to_date('10:32:00 AM','hh:mi:ss AM')), (to_date('10:32:00 AM','hh:mi:ss AM')), 'jawad kahtri' );
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
Thanks Alot sir.
-
Thanks Alot sir.
I do suggest you get a book on PLSQL if you are going to continue to use Oracle (or any sql database). The problems you faced are straight observational details, you missed single quotes and brackets, this is probably from lack of practice so working through a bunch of examples will give you both practice and knowledge in SQL syntax.
-
If nothing else you are missing some single quotes, one between AM', and hh:mi:ss the other between ss tt and )) This fixes those two errors for you:
insert into attandance values('18-AUG-2009','General','1','IT',(to_date('10:32:00 AM','hh:mi:ss tt'),(to_date('10:32:00 AM','hh:mi:ss tt')),'jawad kahtri');
Whether there is anything else wrong time will tell, but it had no chance of working without those quotes!
I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
_Damian S_ wrote:
Whether there is anything else wrong time will tell
:laugh:
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering