I currently have a table with a column as varchar. This column can hold numbers or text. During certain queries I treat it as a bigint column (I do
Try doing the select in 2 stages.
first create a view that selects all columns where my col is nummeric.
Then do a select in that view where you cast the varchar field.
The other thing you could look at is your design of tables to remove the need for the cast.
EDIT