波音飞机构型:ACCESS 数据库支持 union 语法吗?

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 14:45:06
ACCESS 数据库支持 union 语法吗?
请问sql如何写?
sql="select id ,title,tid from table1 where hangye=1" UNION ALL select id ,title,tid from table2 where hangye=1"
这样写好像不对,
Microsoft JET Database Engine 错误 '80040e14'

语法错误 (操作符丢失) 在查询表达式 'hangye=1 union all select id ,title,tid from table2 where hangye=1' 中。

/jiego.asp,行282
=============================================
请大虾指点,在线等~~
我已经解决le~~:)
正确语句:
==================================================
sql="select id ,title,date,time,tid from fangan where hangye="&classs&" union select id ,title,date,time,tid from peixun where hangye="&classs
刚刚不好使我也搞不清楚是什么原因~~
如果高手进来,还请指点一二,谢谢~~

解决了