dbTalk Databases Forums  

ERROR: INSERT has more target columns than expressions

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss ERROR: INSERT has more target columns than expressions in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kumar S
 
Posts: n/a

Default ERROR: INSERT has more target columns than expressions - 10-18-2004 , 10:09 AM






Dear Group,
I am trying to insert data in to a single row
(although I have ~ 10K rows to fill, I am
experimenting with one row because this data is highly
inconsistent )


mtdase=> INSERT INTO cdna_exp
(cdna_SPOT,cdna_NAME,cdna_Clone_ID,cdna_Gene_Symbo l,cdna_Gene_Name,cdna_Cluster_ID,cdna_Accession,cd na_Preferred_name,cdna_SUID,cdna_CH1I_MEAN,cdna_CH 1D_MEDIAN,cdna_CH1I_MEDIAN,cdna_CH1_PER_SAT,cdna_C H1I_SD,cdna_CH1B_MEAN,cdna_CH1B_MEDIAN,cdna_CH1B_S D,cdna_CH1D_MEAN,cdna_CH2I_MEAN,cdna_CH2D_MEAN,cdn a_CH2D_MEDIAN,cdna_CH2I_MEDIAN,cdna_CH2_PER_SAT,cd na_CH2I_SD,cdna_CH2B_MEAN,cdna_CH2B_MEDIAN,cdna_CH 2B_SD,cdna_CH2BN_MEDIAN,cdna_CH2DN_MEAN,cdna_CH2IN _MEAN,cdna_CH2DN_MEDIAN,cdna_CH2IN_MEDIAN,cdna_COR R,cdna_DIAMETER,cdna_FLAG,cdna_LOG_RAT2N_MEAN,cdna _LOG_RAT2N_MEDIAN,cdna_PIX_RAT2_MEAN,cdna_PIX_RAT2 _MEDIAN,cdna_PERGTBCH1I_1SD,cdna_PERGTBCH1I_2SD,cd na_PERGTBCH2I_1SD,cdna_PERGTBCH2I_2SD,cdna_RAT1_ME AN,cdna_RAT1N_MEAN,cdna_RAT2_MEAN,cdna_RAT2_MEDIAN ,cdna_RAT2_SD,cdna_RAT2N_MEAN,cdna_RAT2N_MEDIAN,cd na_REGR,cdna_SUM_MEAN,cdna_SUM_MEDIAN,cdna_TOT_BPI X,cdna_TOT_SPIX,cdna_X_COORD,cdna_Y_COORD,cdna_TOP ,cdna_BOT,cdna_LEFT,cdna_RIGHT,cdna_SECTOR,cdna_SE CTORROW,cdna_SECTORCOL,cdna_SOURCE,cdna_
PLATE,cd
na_PROW,cdna_PCOL,cdna_FAILED,cdna_IS_VERIFIED,cdn a_IS_CONTAMINATED,cdna_LUID)
VALUES (
'9215','18491','IMAGE:267638','FLJ22004','hypothet ical
protein
FLJ22004','Hs.108812','N25427',NULL,'115416','224' ,NULL,NULL,NULL,NULL,'289','135',NULL,'89','348',' 58',NULL,NULL,NULL,NULL,'390','290',NULL,'439','88 ','527',NULL,NULL,'0.625',NULL,'0','-0.019',NULL,NULL,'0.782','34',NULL,'23',NULL,'1.53 4','1.013','0.652',NULL,NULL,'0.987',NULL,'0.6',NU LL,NULL,'1126','52',NULL,NULL,'960','968','996','1 004','16','24','23','GF201:96(69H10):384(24P20)',' 24','P','20','0','Y','U');

ERROR: INSERT has more target columns than
expressions



How is this possible I have 71 expressions and 71
values in the statement. Is there a problem that I am
not exposed to deal with. Experts, can you please
help me.

Thank you.

Kumar.


(P.S: I really appreciate your patience and thank you
very much the kind help you people are pouring since I
embarked on making a database)



_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: ERROR: INSERT has more target columns than expressions - 10-18-2004 , 01:35 PM






Kumar S <ps_postgres (AT) yahoo (DOT) com> writes:
Quote:
ERROR: INSERT has more target columns than expressions

How is this possible I have 71 expressions and 71
values in the statement.
I count 72 names in the column-names list.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
  #3  
Old   
Reinhard Hnat
 
Posts: n/a

Default Re: ERROR: INSERT has more target columns than expressions - 10-28-2004 , 12:56 PM



Am Montag, 18. Oktober 2004 16:09 schrieb Kumar S:
Quote:
Dear Group,
I am trying to insert data in to a single row
(although I have ~ 10K rows to fill, I am
experimenting with one row because this data is highly
inconsistent )

....>dna_LEFT,cdna_RIGHT,cdna_SECTOR,cdna_SECTORRO W,cdna_SECTORCOL,cdna_SOURCE,cd
na_ PLATE,cd
na_PROW,cdna_PCOL,cdna_FAILED,cdna_IS_VERIFIED,cdn a_IS_CONTAMINATED,cdna_LU
ID) VALUES (
'9215','18491','IMAGE:267638','FLJ22004','hypothet ical
I am not shure if the linebreaks are as shown in your posting. Sometimes I
have experienced that editors automatically add linebreaks in sql statements
which lead to some trouble. So bring columnname 'cdna_PROW' for example on
the same line and add blanks after each komma to allow automatic linebreaks
on positions where they can't do any harm.
--
r.hnat

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.