August 12, 2003 at 5:35 pm
Hello,
I have a field called 'WorkerI' (VARACHAR (36) NULL), in a table called 'tblWOWorkOrder' in which some of the data is numeric and some is text.
I need to isolate the data in 'WorkerI' that is text and not numeric. I've tried the following:
DECLARE @NumericValue INT
SET @NumericValue = ISNUMERIC(WorkerI)
SELECT DISTINCT
WorkerI
FROM tblWOWorkOrder
WHERE @NumericValue = 0
ORDER BY WorkerI DESC
When I execute this, I get a server message that says, "Invalid column name 'Worker1'."
If I express SET as follows:
SET @NumericValue = ISNUMERIC('WorkerI')
All of the distinct values, numeric and non numeric, are returned.
How do I express the code to return only the data that is text and not at all numeric?
Thanks!
CSDunn
August 12, 2003 at 7:01 pm
Try:
SELECT DISTINCT
WorkerI
FROM tblWOWorkOrder
WHERE ISNUMERIC(WorkerI) = 0
ORDER BY WorkerI DESC
Cheers,
- Mark
Cheers,
- Mark
August 13, 2003 at 9:41 am
Thanks, this will do what I need! CSDunn
quote:
SELECT DISTINCTWorkerI
FROM tblWOWorkOrder
WHERE ISNUMERIC(WorkerI) = 0
ORDER BY WorkerI DESC
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply