LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-24-2009, 11:28 PM   #1
deepaksinghnegi
Member
 
Registered: Oct 2009
Posts: 34

Rep: Reputation: 16
Question PL/SQL


SQL> DESC AREAS;
Name Null? Type
----------------------------------------- -------- --------------
AREA NUMBER(3,3)
A NUMBER(2)
B NUMBER(2)


DECLARE
A NUMBER(2):=1;
B NUMBER(2):=2;
AREA NUMBER(3);
BEGIN
WHILE(A<5)
LOOP
AREA:=A+B;
INSERT INTO AREAS VALUES(AREA,A,B);
A:=A+1;
B:=B+1;
END LOOP;
END;
/


DECLARE
*
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column
ORA-06512: at line 9



WHARE AM I DOING WRONG?

PLEASE HELP ME
 
Old 10-25-2009, 02:57 AM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,339

Rep: Reputation: 128Reputation: 128
At a guess I would say that AREA NUMBER(3,3) is a number of three digits all three being to the right of the decimal point; thus the largest value you can consider would be 0.999
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL noob question: can SQL effectively handle a 2D matrix? JoeyAdams Programming 2 03-17-2008 02:10 AM
LXer: Sql - stored procedures, views, and dynamic sql generation LXer Syndicated Linux News 0 08-17-2006 07:33 AM
SQL: old sql dump not loading into new db BrianK Linux - Software 1 07-26-2006 12:55 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 03:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 06:07 PM


All times are GMT -5. The time now is 03:38 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration