469,166 Members | 2,169 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,166 developers. It's quick & easy.

For Oracle Sql plus

One table contains information about courses offered at a local college. A course number like MATH1301 or HIST2311 identifies each course. All course numbers are the same length. Each course has a name and number of credit hours earned for successful completion of the course. All information in this table is mandatory. The values stored in the credit hours must be greater than zero and less than 100.


check this
and how can u make this possible?
Oct 24 '07 #1
7 1570
amitpatel66
2,367 Expert 2GB
One table contains information about courses offered at a local college. A course number like MATH1301 or HIST2311 identifies each course. All course numbers are the same length. Each course has a name and number of credit hours earned for successful completion of the course. All information in this table is mandatory. The values stored in the credit hours must be greater than zero and less than 100.


check this
and how can u make this possible?
You can add NOT NULL constraint on all the columns of the table
ADD CHECK constraint for credit hours to be between 0 and 100
Oct 25 '07 #2
You can add NOT NULL constraint on all the columns of the table
ADD CHECK constraint for credit hours to be between 0 and 100

I did Not Null
but add check constraint right?
but in coding i am doing but now it is giving me an error
i check that but it is not working
Oct 25 '07 #3
amitpatel66
2,367 Expert 2GB
I did Not Null
but add check constraint right?
but in coding i am doing but now it is giving me an error
i check that but it is not working
Can you PSOT your error number and error message for my reference?
Oct 26 '07 #4
debasisdas
8,127 Expert 4TB
Kindly post the table structure for reference of our experts.
Oct 26 '07 #5
Kindly post the table structure for reference of our experts.
Part 2. Insert the following data into the three tables
Chip name DOB Dep Course title hrs
1234 Bob Smith 11Dec1953 M 3 Math1314 Algebra 3 B
1111 Sally M Jones 1 June 73 F 5 Math1314 Algebra 3
1111 Sally M Jones 1 June 73 F 5 HIST1301 US 3 B
1234 Bob Smith 11Dec1953 M 3 Hist1301 US 3 A
PHED1109 Yoga 1
2121 Al A Ala 6Novem83 M PHED1108 Dance 1
3333 Sue Chen 29 Feb 82 F 0
Oct 26 '07 #6
Insert Into Student(name, Lastname, Birthdate,gender,chip)
Values ('sue','chen', '29-02-1982','f','3333');

When I Trying To Put Date
Month Feb
But It Is Not Working It Is Giving Me Error No

Ora-01830

And I Tried With 02
Then Giivng Me One More Error
Ora-01843
So Any Sugestion?
Oct 26 '07 #7
amitpatel66
2,367 Expert 2GB
Insert Into Student(name, Lastname, Birthdate,gender,chip)
Values ('sue','chen', '29-02-1982','f','3333');

When I Trying To Put Date
Month Feb
But It Is Not Working It Is Giving Me Error No

Ora-01830

And I Tried With 02
Then Giivng Me One More Error
Ora-01843
So Any Sugestion?
Try TO_DATE function here:

check below query:

Expand|Select|Wrap|Line Numbers
  1. Insert Into Student(name, Lastname, Birthdate,gender,chip)
  2.   Values ('sue','chen',TO_DATE('29-02-1982','DD-MM-YYYY'),'f','3333');
  3.  
Oct 28 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by expecthealth | last post: by
1 post views Thread by Greg Lindstrom | last post: by
1 post views Thread by Munk | last post: by
3 posts views Thread by Jon Ole Hedne | last post: by
1 post views Thread by Shawn Hirn | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.