A
AJ
I have an input field (InputFieldA) that a user can type either a location#
(alphanumeric - could be all numeric) or zipcode (numeric).
I have the following select:
select * from TableA
where location = InputFieldA
I would like to just do something simple to select the information
regardlesss of whether they type in location# or zip. I thought something
like this would work:
select * from TableA
where location = InputFieldA
or zipcode = InputFieldA
This works if the field is a zipcode (numeric) but not if it contains
characters because it fails with a mis match on field type. (The location is
in quotes, the zipcode is not)
All the code is based on the loaction# so ideally that is what I am trying
to get to. Any thoughts?? Thanks.
(alphanumeric - could be all numeric) or zipcode (numeric).
I have the following select:
select * from TableA
where location = InputFieldA
I would like to just do something simple to select the information
regardlesss of whether they type in location# or zip. I thought something
like this would work:
select * from TableA
where location = InputFieldA
or zipcode = InputFieldA
This works if the field is a zipcode (numeric) but not if it contains
characters because it fails with a mis match on field type. (The location is
in quotes, the zipcode is not)
All the code is based on the loaction# so ideally that is what I am trying
to get to. Any thoughts?? Thanks.