help!!!一个sql查询问题?

我有两个表
storytab表:节目序号,新闻故事号,新闻摘要
programtab表:节目序号,节目时间
请问如何联合查询摘要和时间,例如:
查询新闻摘要“江泽民”,且时间为20020702-20020802
select StoryTab.新闻摘要,StoryTab.节目时间 from StoryTab,programtab where (StoryTab.新闻摘要 like '%"&request("textfield")&"%') and (programtab.节目时间 >= " & request("time1") & ") and (programtab.节目时间<=" & request("time2" )& "
这样那里错了?
---------------------------------------------------------------

select a.新闻摘要,b.节目时间 from StoryTab as a,programtab as b where
(a.新闻摘要 like '%"&request("textfield")&"%')and
((b.节目时间>= "& request("time1") &") and (b.节目时间<=" & request("time2" )&")) and (a.节目序号=b.节目序号)

Published At
Categories with Web编程
Tagged with
comments powered by Disqus