Вопрос

I am using Subsonic3 and would like to get a Left Outer Join between two tables. Here is the tested SQL

SELECT a.* 
FROM vwVendor a
LEFT OUTER JOIN dbo.pubvenmap b
on a.vend_no = b.vend_no
where b.vend_no is null

I am stuck at

Dim vendors = From v In vwVendor.All()
Join m in pubvenmap.All() On v.vend_no Equals m.vend_no

UPDATED I also tried the following

Dim vendors = New SubSonic.Query.Select(SubSonic.Query.Aggregate.GroupBy("vend_no")).From(Of vwVendor).LeftOuterJoin(Of mac_pubvenmap)().ExecuteTypedList(Of vwVendor)()

but get the error

A first chance exception of type 'System.InvalidOperationException' occurred in SubSonic.Core.dll

I am using Visual Studio 2010 and .NET 4.0...could this be the problem?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top