Skip to content

Commit

Permalink
Corrected table join conditions for IS NULL expression. Closes #42.
Browse files Browse the repository at this point in the history
  • Loading branch information
hisystems committed Mar 28, 2012
1 parent 3027a5a commit 959fe37
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions SQL/Select/SQLSelectTableJoinCondition.vb
Expand Up @@ -69,10 +69,17 @@ Namespace SQL
Friend ReadOnly Property SQL(ByVal eConnectionType As Database.ConnectionType) As String
Get

Return _
pobjLeftExpression.SQL(eConnectionType) & " " & _
SQLConvertCompare(Compare) & " " & _
pobjRightExpression.SQL(eConnectionType)
'Account for the situation where EqualTo to NULL is appropriately translated to 'IS NULL'
If TypeOf pobjRightExpression Is SQLValueExpression Then
Return _
pobjLeftExpression.SQL(eConnectionType) & " " & _
SQLConvertCondition(Compare, DirectCast(pobjRightExpression, SQLValueExpression).Value, eConnectionType)
Else
Return _
pobjLeftExpression.SQL(eConnectionType) & " " & _
SQLConvertCompare(Compare) & " " & _
pobjRightExpression.SQL(eConnectionType)
End If

End Get
End Property
Expand Down

0 comments on commit 959fe37

Please sign in to comment.