2010/11/17 ZHANG Jiaqiang A <Jiaqiang.a.Zhang@alcatel-sbell.com.cn>
--大家好,有一张表,我需要多次关联,设了不同的别名,但是执行SQL的时候报错,大家有用过DBD-CSV的高手,帮我看看这是DBD CSV的限制还是SQL写的不对SQL语句:select c.husband,h.age,c.wife,w.age from couple c, people h, people w where c.husband = h.name and c.wife = w.name;报错信息:DBD::CSV::st execute failed: Error 2012 while reading file D:\Perl\people.csv: E
OF - End of data in parsing input stream at C:/strawberry/perl/site/lib/SQL/Stat
ement.pm line 813
[for Statement "select c.husband,h.age,c.wife,w.age from couple c, people h, pe
ople w where c.husband = h.name and c.wife = w.name"] at csv.pl line 99.以下SQL语句都可以正常执行:select * from couple;
husband |wife |
========================
James |Mary |
Roger |Lily |
========================
Return 2 columns and 2 linesselect * from people;name |age |
========================
Mary |22 |
Lily |26 |
Roger |24 |
James |30 |
========================
Return 2 columns and 4 linesselect c.husband,h.age from couple c, people h where c.husband = h.name;
c.husband |h.age |
========================
James |30 |
Roger |24 |
========================
Return 2 columns and 2 linesselect c.wife,w.age from couple c, people w where c.wife = w.name;c.wife |w.age |
========================
Mary |22 |
Lily |26 |
========================
Return 2 columns and 2 lines祝好家强
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
没有评论:
发表评论