以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]SQLCrossTableBuilder的关联方式  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=43878)

--  作者:ifastudy
--  发布时间:2013/12/18 10:15:00
--  [求助]SQLCrossTableBuilder的关联方式
请问SQLCrossTableBuilder中左表和右表的关联方式是inner join还是left join?
我做了一个四个表的关联,发现交叉后的列数少了一些

Dim g As New SQLCrossTableBuilder("库存H", "D_Stock")
g.ConnectionName = _DataSource
g.AddTable("D_Stock","SKUCode","B_SKU","SKUCode")
g.AddTable("D_Stock","PartyCode","B_Party","PartyCode")
g.AddTable("B_SKU","ProductColorCode","View_ProductKS","款色")
Dim Cols1() As String = {"PartyCode","SKUCode"}
Dim Cols2() As String = {"PartyCode","SKUCode"}
g.AddTable("D_Stock",Cols1,"D_SaleBillItem",Cols2)
g.HGroups.AddDef("{D_Stock}.PartyCode","仓库对象","仓库对象")
g.HGroups.AddDef("ProductColorCode","款色")
g.HGroups.AddDef("InsideLengthCode","内长")
g.HGroups.AddDef("销售分类")
g.HGroups.AddDef("YearCode","年份")
g.HGroups.AddDef("SeasonCode","季节")
g.HGroups.AddDef("SeasonStageCode","波段")
g.VGroups.AddDef("SizeCode","尺码")
g.Totals.AddDef("TargetQty", "目标库存")
g.Totals.AddDef("SaleBillQty", "累计销量")
g.HorizontalTotal= True
g.OrderByTotal = True

--  作者:Bin
--  发布时间:2013/12/18 10:21:00
--  
应该是left join 

少了列? 上个例子看看.

--  作者:狐狸爸爸
--  发布时间:2013/12/18 10:22:00
--  

可以设置:

http://www.foxtable.com/help/topics/2330.htm

 


--  作者:ifastudy
--  发布时间:2013/12/18 10:28:00
--  
谢谢帅哥,在线噢!狐爸,设置为JoinModeEnum.Left就可以了。默认是inner join