Duplication error . please help.
От | Kumar S |
---|---|
Тема | Duplication error . please help. |
Дата | |
Msg-id | 20050309210206.39769.qmail@web51402.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: Duplication error . please help.
(Sean Davis <sdavis2@mail.nih.gov>)
|
Список | pgsql-novice |
Dear group, Looking forward to get some help form experiences members. BEGIN TRANSACTION; INSERT INTO EXPERIMENT(study_id,genechip_id,sample_id,mat_id,hyb_id,exp_aim)VALUES((SELECT study_id from study where study_author = 'Georgantas RW 3rd and Civin CI'),(SELECT genechip_id from genechip where genechip_array = 'U133B'),(SELECT sample_id FROM sample WHERE sample_name ='Human stem cells'),(SELECT mat_id FROM material_manip where mat_treatment_type = 'ES H1-1a'),(select hyb_id from experiment where exp_id = (currval('experiment_exp_id_seq'))),'In this experiment ES H1-1a sample was used test on U133B chip '); INSERT INTO PLATFORM(platform_filename,platform_file_loc,exp_id)VALUES('RGeo-ESHSC-H1ES-1a-U133B','\/home\/database\/bob\/data\/es\/RGeo-ESHSC-H1ES-1a-U133\/RGeo-ESHSC-H1ES-1a-U133B',(currval('experiment_exp_id_seq'))); INSERT INTO CEL(exp_id,platform_id,affy_x,affy_y,affy_mean,affy_stdv,affy_npixels)VALUES((currval('experiment_exp_id_seq')),(SELECT platform_id from platform where platform_filename = 'RGeo-ESHSC-H1ES-1a-U133B'),0,0,125.0,18.8,25); INSERT INTO CEL(exp_id,platform_id,affy_x,affy_y,affy_mean,affy_stdv,affy_npixels)VALUES((currval('experiment_exp_id_seq')),(SELECT platform_id from platform where platform_filename = 'RGeo-ESHSC-H1ES-1a-U133B'),1,0,7702.0,1603.0,25); INSERT INTO CEL(exp_id,platform_id,affy_x,affy_y,affy_mean,affy_stdv,affy_npixels)VALUES((currval('experiment_exp_id_seq')),(SELECT platform_id from platform where platform_filename = 'RGeo-ESHSC-H1ES-1a-U133B'),2,0,121.0,23.4,30); INSERT INTO CEL(exp_id,platform_id,affy_x,affy_y,affy_mean,affy_stdv,affy_npixels)VALUES((currval('experiment_exp_id_seq')),(SELECT platform_id from platform where platform_filename = 'RGeo-ESHSC-H1ES-1a-U133B'),3,0,8156.0,1584.3,25); I get the following error, when I execute. BEGIN INSERT 132600251 1 INSERT 132600252 1 psql:/home/database/bob/dbsqls/torun/ESHSC-H1ES/test.sql:6: ERROR: more than one row returned by a subquery used as an expression psql:/home/database/bob/dbsqls/torun/ESHSC-H1ES/test.sql:8: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/home/database/bob/dbsqls/torun/ESHSC-H1ES/test.sql:10: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/home/database/bob/dbsqls/torun/ESHSC-H1ES/test.sql:12: ERROR: current transaction is aborted, commands ignored until end of transaction block when I removed the : INSERT INTO PLATFORM(platform_filename,platform_file_loc,exp_id)VALUES('RGeo-ESHSC-H1ES-1a-U133B','\/home\/database\/bob\/data\/es\/RGeo-ESHSC-H1ES-1a-U133\/RGeo-ESHSC-H1ES-1a-U133B',(currval('experiment_exp_id_seq'))); This is the result: BEGIN INSERT 132600246 1 INSERT 132600247 1 INSERT 132600248 1 INSERT 132600249 1 INSERT 132600250 1 Clean result. when I uncommented insert into cel statements, the result is this: BEGIN INSERT 132600244 1 INSERT 132600245 1 bob=> rollback; ROLLBACK Clean. when I execture every statement I get the foollowing error: ERROR: more than one row returned by a subquery ed as an expression Can any one help suggesting a way to deal this problem. thank you. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
В списке pgsql-novice по дате отправления: