同样的SQL语句,在ACCESS里可以查出,在VB6里就查不出来 5
sql语句如下:SELECTec_id,nf_id,s_price,c_price,f_price,cz,n_length,n_date,b_name,unit_name...
sql语句如下:
SELECT ec_id,nf_id,s_price,c_price,f_price,cz,n_length,n_date,b_name,unit_name,t_type,p_plate from materiel,m_brand,m_plate,m_type,m_unit where materiel.b_id = m_brand.b_id and materiel.p_id = m_plate.p_id and materiel.t_id =m_type.t_id and materiel.unit_id = m_unit.unit_id and (ec_id like '*K10707201*' or nf_id like '*K10707201*') 展开
SELECT ec_id,nf_id,s_price,c_price,f_price,cz,n_length,n_date,b_name,unit_name,t_type,p_plate from materiel,m_brand,m_plate,m_type,m_unit where materiel.b_id = m_brand.b_id and materiel.p_id = m_plate.p_id and materiel.t_id =m_type.t_id and materiel.unit_id = m_unit.unit_id and (ec_id like '*K10707201*' or nf_id like '*K10707201*') 展开
1个回答
展开全部
下面给出一段用于VB的SQL查询语句:
sql = "select cs.js_dm,cs.备件代码,cs.备件名称,cs.备件规格,cs.进口计算机号,cs.最低库存量,sl.结存数量,sl.结存金额,sl.结存单价,sl.类别代码 from JWCK_BM as cs,jwl_jiec as sl" & _
" where cs.备件代码 = sl.备件代码" & " and cs.备件代码>" & "''" & " order by sl.类别代码,sl.备件代码"
注意:
关于Like用法 应为 Like 'K10707201*'
from JWCK_BM as cs,jwl_jiec as sl用法,cs代表JWCK_BM表,sl代表jwl_jiec表,select后各字段名加.**标注,同样where后语句字段名也如此处理.仅供参考.
sql = "select cs.js_dm,cs.备件代码,cs.备件名称,cs.备件规格,cs.进口计算机号,cs.最低库存量,sl.结存数量,sl.结存金额,sl.结存单价,sl.类别代码 from JWCK_BM as cs,jwl_jiec as sl" & _
" where cs.备件代码 = sl.备件代码" & " and cs.备件代码>" & "''" & " order by sl.类别代码,sl.备件代码"
注意:
关于Like用法 应为 Like 'K10707201*'
from JWCK_BM as cs,jwl_jiec as sl用法,cs代表JWCK_BM表,sl代表jwl_jiec表,select后各字段名加.**标注,同样where后语句字段名也如此处理.仅供参考.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询