What datatype this .INVOICE_CODE_1 is?If it is varchar(nvarchar, etc)I would use temp table to select all values based on evaluation of the value and if it is can be converted to int and then create JOIN between your table and TEMP table.Something like that:Select INVOICE_Code_1 INTO #TMPTable From API_PENDING__INVOICE WHERe ISNUMERIC(INVOICE_Code_1)= 1)SELECT Invoice, Invoice_Date, Description, INVOICE_Code_1FROM API_PENDING__INVOICE WHERE (API_PENDING__INVOICE.INVOICE_CODE_1 in (select INVOICE_Code_1 from #TMPTable))
That should gives you all wanted rows.If this is inline SQL (would not ever recommend to use in-lines, but it is your application)you can do:SELECT Invoice, Invoice_Date, Description, INVOICE_Code_1FROM API_PENDING__INVOICE WHERE ISNUMERIC(INVOICE_Code_1)= 1)
CheersAlex