Reputation: 6586
I am using the django model for my project When I hit my query to insert the row.I am getting an error
Query:
INSERT INTO "intelligence_centre_organicsearchresults"
("keyword", "location", "position", "page_no", "headline", "url", "exerpt", "query_url", "content_updated_date", "created_on", "modified_on", "downloaded")
VALUES
(E'abilify', NULL, 8, 1, E'NAMI | Abilify (aripiprazole)', E'/url?q=http://www.nami.org/Template.cfm?Section=About_Medications&template=/ContentManagement/ContentDisplay.cfm&ContentID=8133&sa=U&ei=-v5VT7HkHMTsrAf5wqCLBw&ved=0CEEQFjAH&usg=AFQjCNG7-G-LSrWE65DeZuDmy2Uvi71HTg', E'What is the most important information I should know about Abilify®? Relapse is very common in schizophrenia and the most frequent cause is that patients stop ...www.nami.org/Template.cfm?Section=About_Medications... - Cached - Similar', NULL, NULL, E'2012-03-06 06:11:37.606388', E'2012-03-06 06:11:37.606449', true)
Error:
ERROR: value too long for type character varying(200)
My schema field sizes are also extended for this problem:
ALTER TABLE intelligence_centre_adwordsearchresults
ALTER COLUMN landing_page_url TYPE character varying(1000)
likewise I had extended the size for all fields.
i have attached my table description as screen shot.
Please suggest me to solve this error?
Upvotes: 2
Views: 8274
Reputation: 2776
You are getting an error inserting into intelligence_centre_ORGANICsearchresults
, but you've altered the columns on intelligence_centre_ADWORDsearchresult
s. I think you need to alter the columns on intelligence_centre_ORGANICsearchresults
.
Upvotes: 2
Reputation: 932
Check the table names first. Your solution is okay if you see the table names.
Upvotes: 1