S
Samantha
I'm having a problem on the sql results fwith the following sql:
strSQL = "INSERT INTO tblBomMult ( Assembly, Component, CompQtyPer,
AssyQtyPer ) "
strSQL = strSQL & " SELECT dbo_BOM.Assembly, dbo_BOM.Component, " _
& "dbo_BOM.QuantityPer, BuildParts.Quantity "
strSQL = strSQL & " FROM BuildParts INNER JOIN dbo_BOM ON
BuildParts.PartNumber = dbo_BOM.Assembly
strSQL = strSQL & " WHERE (dbo_BOM.Component) Not Like
IIF(ISNULL([BuildParts].[Component]),'',[BuildParts].[Component] & '" & "*')"
The problem is that the field [BuildParts].[Component] is not always filled,
i.e. it can be null or empty.
And when [BuildParts].[Component] is empty or null, the resulting query does
not have any records inserted.
Is there a better way to check for the field [BuildParts].[Component]?
Any pointers are very much appreciated! Thanks in advance.
strSQL = "INSERT INTO tblBomMult ( Assembly, Component, CompQtyPer,
AssyQtyPer ) "
strSQL = strSQL & " SELECT dbo_BOM.Assembly, dbo_BOM.Component, " _
& "dbo_BOM.QuantityPer, BuildParts.Quantity "
strSQL = strSQL & " FROM BuildParts INNER JOIN dbo_BOM ON
BuildParts.PartNumber = dbo_BOM.Assembly
strSQL = strSQL & " WHERE (dbo_BOM.Component) Not Like
IIF(ISNULL([BuildParts].[Component]),'',[BuildParts].[Component] & '" & "*')"
The problem is that the field [BuildParts].[Component] is not always filled,
i.e. it can be null or empty.
And when [BuildParts].[Component] is empty or null, the resulting query does
not have any records inserted.
Is there a better way to check for the field [BuildParts].[Component]?
Any pointers are very much appreciated! Thanks in advance.