开发者

problem with sql query of a Crystal Report

开发者 https://www.devze.com 2023-01-14 10:57 出处:网络
When I create a new command of a report that looks like that select e.x, a.x, a.y from T开发者_StackOverflowable1 t,

When I create a new command of a report that looks like that

select e.x, a.x, a.y
from T开发者_StackOverflowable1 t,
     table2 a
where a.z = e.z
  and a.xx = form1.ComboBox1.Text

it generates an error. Is there a way to do it?

Thanks


Your columns need to have different names to each other - at present, the first two columns are both called x. Also, if your ComboBox has multiple values, you need to use an IN condition, not an =. Try changing the query to look like:

select e.x e_x, a.x a_x, a.y
from Table1 e,
     table2 a
where a.z = e.z
  and a.xx IN (form1.ComboBox1.Text)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号