select * FROM [C_Accessioning].[HL7].[GMessages]
where MessageID not in (Select MessageID from HL7.ORM_MSH)
There are two rows of data in GMessages:
MessageID MessageDateTime Filename
28 2010-09-07 16:29:02.543 ORM1.hl7
29 2010-09-07 16:29:07.547 ORM2.hl7
There is no data in ORM_MSH.
Please see sql statement copied above. The inner query returns null, I am expecting that the query return both rows from GMessages, but it does not return any rows. Please let me know how to fix.
View Complete Post