Re: portable sql substring
Posted in 1999
Yirmiyahu Fischer (yfischer@vanenburg.com) wrote: : I need a query that will return the first 16 characters of a 32-character : string. : This query must work for Informix, Oracle and SQL Server. : The substring function does not work for me, since the Informix uses : brackets instead : of that function, and Orable and SQL Server have two different spellings. : Thanx, : > Yirmiyahu Fischer : > Vanenburg|Engineering : > email: yfischer@vanenburg.com , yirmi@shani.net : > : > Ever think about a stored procedure? Define them in the databases with the same name, something like: define procedure trunc_me (instr char(2000)) returning char(16); define outstr char(16); let outstr = instr; return outstr; end procedure; -- Rob Wilson rwilson@ntsource.com