Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. unable insert record show error

unable insert record show error

Scheduled Pinned Locked Moved Database
databasehelplounge
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mjawadkhatri
    wrote on last edited by
    #1

    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

    _ 1 Reply Last reply
    0
    • M mjawadkhatri

      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

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      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!!

      M J 2 Replies Last reply
      0
      • _ _Damian S_

        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!!

        M Offline
        M Offline
        mjawadkhatri
        wrote on last edited by
        #3

        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

        _ 1 Reply Last reply
        0
        • M mjawadkhatri

          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

          _ Offline
          _ Offline
          _Damian S_
          wrote on last edited by
          #4

          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!!

          M 1 Reply Last reply
          0
          • _ _Damian S_

            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!!

            M Offline
            M Offline
            mjawadkhatri
            wrote on last edited by
            #5

            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 ???

            _ 1 Reply Last reply
            0
            • M mjawadkhatri

              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 ???

              _ Offline
              _ Offline
              _Damian S_
              wrote on last edited by
              #6

              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!!

              M 1 Reply Last reply
              0
              • _ _Damian S_

                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!!

                M Offline
                M Offline
                mjawadkhatri
                wrote on last edited by
                #7

                Thanks Alot sir.

                M 1 Reply Last reply
                0
                • M mjawadkhatri

                  Thanks Alot sir.

                  M Offline
                  M Offline
                  Mycroft Holmes
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • _ _Damian S_

                    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!!

                    J Offline
                    J Offline
                    Jerry Hammond
                    wrote on last edited by
                    #9

                    _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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups