dbTalk Databases Forums  

syntax error at or near "Hs" at character 1182

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


Discuss syntax error at or near "Hs" at character 1182 in the comp.databases.postgresql.novice forum.



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

Default syntax error at or near "Hs" at character 1182 - 10-15-2004 , 04:15 PM






Dear Group,
I have a large file of 71 columns and 10K rows.
I had to pass this whole document into a table and
using a python script I created insert statements :


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 (
"9216","18495","IMAGE:262035","NULL","ESTs","Hs.26 9034","H98688","NULL","107662","227","NULL","NULL" ,"NULL","NULL","245","137","NULL","90","298","30", "NULL","NULL","NULL","NULL","339","268","NULL","40 6","45","451","NULL","NULL","0.584","NULL","0", "-0.987","NULL","NULL","0.302","40","NULL","19","NUL L","3","1.981","0.333","NULL","NULL","0.505","NULL ","0.484","NULL","NULL","1272","52","NULL","NULL", "960","968","1005","1013","16","24","24","GF201:96 (69H12):384(24P24)","24","P","24","0","Y","U");


I kept all these files into a chip.sql file.

I initialized this file from psql prompt.

Myarray=> \i ../../../chip.sql

I get the following ERROR:
psql:/../../../../../sqls/2151.sql:9216: ERROR:
syntax error at or near "Hs" at character 1182

IS it a proble if I have a value : "Hs.269034" in this
form. I declared this as varchar(100).

Also I have 9216 INSERT statements in this file.

I am unable to sniff where the problem is. Can any one
suggest some solution.

Thank you in advance.

Kumar.




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

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


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

Default Re: syntax error at or near "Hs" at character 1182 - 10-15-2004 , 04:39 PM






Kumar S <ps_postgres (AT) yahoo (DOT) com> writes:
Quote:
INSERT INTO cdna_exp
...
VALUES (
"9216","18495","IMAGE:262035","NULL","ESTs","Hs.26 9034","H98688","NULL","107662","227","NULL","NULL" ,"NULL","NULL","245","137","NULL","90","298","30", "NULL","NULL","NULL","NULL","339","268","NULL","40 6","45","451","NULL","NULL","0.584","NULL","0", "-0.987","NULL","NULL","0.302","40","NULL","19","NUL L","3","1.981","0.333","NULL","NULL","0.505","NULL ","0.484","NULL","NULL","1272","52","NULL","NULL", "960","968","1005","1013","16","24","24","GF201:96 (69H12):384(24P24)","24","P","24","0","Y","U");
I think you want single quotes, not double quotes, around those
constants.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



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.