By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

How do I add date with timestamp? I am getting an error while inserting row

P: 20
ERROR: value too long for type character varying(8)

********** Error **********

ERROR: value too long for type character varying(8)
SQL state: 22001

I used following script to add a Row:

INSERT INTO tbluser(
userid, username, password, name, birthdate, sscper, fees,
VALUES (1, 'elitecore','elite', 'Elitecore', '2003-1-1',88.1,700.50,

I created my table with this create script:

userid integer,
username character varying(8),
"password" character varying(8),
"name" character varying(60),
birthdate date,
sscper numeric,
fees numeric,
lastaccessedtime timestamp without time zone

Kidly help as early as possible:
Jul 23 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 700
The value 'elitecore' is nine characters length and it is too much for varchar(8) that you defined in table.
Jul 23 '10 #2

P: 115
the variable length is more than what you have defined
Jul 25 '10 #3

Post your reply

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