Problem wiyh an ODBC table when using a query

  • Thread starter Thread starter weazer via AccessMonster.com
  • Start date Start date
W

weazer via AccessMonster.com

I am using Access97 and I have an Oracle ODBC table that I use with queries.
On one field I have a input criteria field. I get no results on some criteria.


What is happening is that the field is 5 character text field. If the field
is only 3 characters that I input I get no results. Spaces have to be put in
to make 5 characters.

The user does notk now this. How do I get around this?

Thanks for all your help
 
weazer said:
I am using Access97 and I have an Oracle ODBC table that I use with queries.
On one field I have a input criteria field. I get no results on some criteria.


What is happening is that the field is 5 character text field. If the field
is only 3 characters that I input I get no results. Spaces have to be put in
to make 5 characters.

The user does notk now this. How do I get around this?

Thanks for all your help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This expression

String(5-Len([InputCrieriaField])," ") & [InputCrieriaField]

Will pre-pad the value of InputCriteriaField w/ enough spaces to fill a
5-character wide field. You can use it in the query's Where clause like
this:

WHERE OracleTable.ColumnName = String(5-Len([InputCrieriaField])," ") &
[InputCrieriaField]

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBREmUqoechKqOuFEgEQJS1gCg8ty+eDL4T3BAg3Q0V2Tov9g4GkEAn0Jd
I9AcURC5FUNfygw3sze9W5Xd
=vzUZ
-----END PGP SIGNATURE-----
 
Thank you - that should do it.
I am using Access97 and I have an Oracle ODBC table that I use with queries.
On one field I have a input criteria field. I get no results on some criteria.
[quoted text clipped - 6 lines]
Thanks for all your help

This expression

String(5-Len([InputCrieriaField])," ") & [InputCrieriaField]

Will pre-pad the value of InputCriteriaField w/ enough spaces to fill a
5-character wide field. You can use it in the query's Where clause like
this:

WHERE OracleTable.ColumnName = String(5-Len([InputCrieriaField])," ") &
[InputCrieriaField]
 
Back
Top