语句: select DISTINCT t.equ_isbn,c.equ_isbn,handletime
from A c,B d,
(select eq2,a.equ_isbn
from A a,B b
where a.equ_name=b.eq1)as t
where t.eq2=c.equ_name
在得到的结果中的两个字段都为equ_isbn,equ_isbn,实际上是一个表的同一个字段,但是值不同,请问该如何区分呢?
{m_pRsLog3->MoveFirst();}
while(!m_pRsLog3->adoEOF)//遍历所有记录
{
_variant_t eq1_isbn = m_pRsLog3->GetCollect("equ_isbn");
_variant_t eq2_isbn = m_pRsLog3->GetCollect("equ_isbn");
}
from A c,B d,
(select eq2,a.equ_isbn
from A a,B b
where a.equ_name=b.eq1)as t
where t.eq2=c.equ_name
在得到的结果中的两个字段都为equ_isbn,equ_isbn,实际上是一个表的同一个字段,但是值不同,请问该如何区分呢?
{m_pRsLog3->MoveFirst();}
while(!m_pRsLog3->adoEOF)//遍历所有记录
{
_variant_t eq1_isbn = m_pRsLog3->GetCollect("equ_isbn");
_variant_t eq2_isbn = m_pRsLog3->GetCollect("equ_isbn");
}
select DISTINCT t.equ_isbn as aaa,c.equ_isbn as bbb,handletime
............
请问用INT值是用哪个函数呢?谢谢
while(!m_pRsLog3->adoEOF)//遍历所有记录
{
_variant_t eq1_isbn = m_pRsLog3->GetCollect(1);//你需要的第一个 equ_isbn
_variant_t eq2_isbn = m_pRsLog3->GetCollect(2);//你需要的第二个 equ_isbn
}