Try ...... appd = "SELECT DISTINCT TrademarkNo,ApplDate,LastRenewal,NextRenewal FROM Trademarks WHERE TrademarkNo NOT IN (0) Minus SELECT DISTINCT TRADEMARKNO,APPDATE,LASTRENEWALDATE,NEXTRENEWALDATE FROM TRADEMARK WHERE TRADEMARKNO NOT IN (0)" cmd1 = New OleDbCommand(appd, cn1) dr1 = cmd1.ExecuteReader(CommandBehavior.CloseConnection) ...... Catch ex As Exception MsgBox(ex.ToString) End Try
Is there any error in syntax of the sql query??? exception thrown on the execution of that query about syntax error....there isn't mistake in other thigs..like...datatypes of the all fields are matched...fields name are also checked..
In short I want to use "Minus" operator in sql query in vb.net
(0)
EXCEPT
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)