OK - I have the below (thanks to angelIII) which works great:
UPDATE MobileInvoiceImport SET QuantityReceived = '12' WHERE OrderDetailID = '345'
GO
INSERT INTO MobileInvoiceImport (OrderDetailID, QuantityReceived) SELECT '345', '88' WHERE NOT EXISTS (SELECT 1 FROM MobileInvoiceImport WHERE OrderDetailID = '345')
However, when I try to execute on a single line, such as:
UPDATE MobileInvoiceImport SET QuantityReceived = '12' WHERE OrderDetailID = '345' GO INSERT INTO MobileInvoiceImport (OrderDetailID, QuantityReceived) SELECT '345', '88' WHERE NOT EXISTS (SELECT 1 FROM MobileInvoiceImport WHERE OrderDetailID = '345')
I get an error - is there a way to get it to work as I am executing it via a SQLCeCommand
this is the same as your SQL question
http:Q_21838811.html#0 "SQLCommand - Weird SQL Issue - Please help!":
you should use a pointer question or have them both for 250 points each
hope this helps a bit
bruintje