Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field truncation on Interbase

Status
Not open for further replies.

jeremas

IS-IT--Management
Nov 18, 2003
2
CA
Hello folks,

I have two tables, one field of the first one is contained on one field of second table. I would like to have a query to get a count of fields where field.t1 is contained on field.t2.

For example:

Table t1 has field = numero_min = 5255585090333
and Table t2 has field = message_min = abcdfgh125255585090333as.WAV. So if you see the field numero_min.t1 is contained in field message_min.t2.

I will appreciate if some one can help me with such issue?

Is there any sql command in interbase to truncate field contents?

Regards,
 
Hi,

that's not data truncation, is it?

Can you try something like
WHERE Table2.message_min like '%' || Table1.Numero_min ' || '%'

I have no idea if something like this works :)

Martijn Tonies
Database Workbench - the developer tool for InterBase, Firebird and MS SQL Server
 
I asked about field truncation as in other SQL standars you can use select right(message_min,10) from t1.
It will return the 10 right side characters of the field.

So with this I could truncate the field and create a temporary table to use join queries if possible.

I will try your suggestion:

regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top