Comparing Text fields in Stored Procedures
Posted in 2000
Topics: Stored Procedures & SPL
I need to compare text fields for equality in a stored procedure. As far as I know Informix won't let you say WHERE [text field] = [text field] or use the WHERE [text field] IN (Select [text field]...). Is there any way to do this comparison on the server side? If there is no other way I will have to pull lots of data to the client (VB with ADO recordsets) and use them for the comparison since they don't have the comparison constraints or use a UNIX perl DBI script. Any ideas? Sent via Deja.com http://www.deja.com/ Before you buy.
Hi! Why do you think you cannot use the WHERE clause as you described below? Am I missing something? Michael tferrante@my-deja.com wrote: > I need to compare text fields for equality in a stored procedure. As > far as I know Informix won't let you say WHERE [text field] = [text > field] or use the WHERE [text field] IN (Select [text field]...). > > Is there any way to do this comparison on the server side? > > If there is no other way I will have to pull lots of data to the client > (VB with ADO recordsets) and use them for the comparison since they > don't have the comparison constraints or use a UNIX perl DBI script. > > Any ideas? > > Sent via Deja.com http://www.deja.com/ > Before you buy.
Of course Informix will let you compare text (meaning character) fields. Or did you mean TEXT type columns (meaning TEXT BLOB columns)? In that case you are correct. If you have IDS.2000 you can write a UDF in C or Java to perform the comparison on the server side though and can even make it a datablade for some minor added performance. Art S. Kagel tferrante@my-deja.com wrote: > > I need to compare text fields for equality in a stored procedure. As > far as I know Informix won't let you say WHERE [text field] = [text > field] or use the WHERE [text field] IN (Select [text field]...). > > Is there any way to do this comparison on the server side? > > If there is no other way I will have to pull lots of data to the client > (VB with ADO recordsets) and use them for the comparison since they > don't have the comparison constraints or use a UNIX perl DBI script. > > Any ideas? > > Sent via Deja.com http://www.deja.com/ > Before you buy.