Re: SQL HELP
Posted in 1999
--Boundary_(ID_bfORVp/dC4dodGj7fB7cmg)
Content-type: text/plain; charset=us-ascii
Content-disposition: inline
Content-transfer-encoding: 7BIT
Abel
Use TRIM().
HTH
Sujit
Abel_Johnson@doh.state.fl.us on 10/25/99 03:23:18 PM
To: informix-list@iiug.org
cc: (bcc: Sujit Pal)
Subject: SQL HELP
Using Informix V7.1 SQL, I am trying to concatenate several fields without
leaving any imbedded blanks. Here is a clip of my code.
insert into forsamis
(confidentialcode, agencycasecode, datecaseopened, involvement
, householdincome, referredfrom, dateofbirth, zipcode
, gender, race, education, closingdate, closingreason)
select hipr.last_name||first_name[1,1]||middle_name[1,1]||birthdate
, case_number, entry_date, child_adult
, household_income, referral_from, birthdate, zip_code
, sex, race, educ_status
, hfpr.terminate_date, hfpr.terminate_reason
from hipr, hfpr
where case_number = case_no
and entry_date >= '07/01/1999';
The 4th line concatenates into the first variable but, the field
hipr.last_name has trailing blanks which I can not seem to eliminate. What
is the systax.
--Boundary_(ID_bfORVp/dC4dodGj7fB7cmg)
Content-type: text/html; name=att1.htm
Content-description: Internet HTML
Content-disposition: attachment; filename=att1.htm
Content-transfer-encoding: 7BIT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>SQL HELP</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Using Informix V7.1 SQL, I am trying to concatenate several fields without leaving any imbedded blanks. Here is a clip of my code.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">insert into forsamis</FONT>
<BR><FONT SIZE=2 FACE="Arial"> (confidentialcode, agencycasecode, datecaseopened, involvement</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , householdincome, referredfrom, dateofbirth, zipcode</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , gender, race, education, closingdate, closingreason)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> select hipr.last_name||first_name[1,1]||middle_name[1,1]||birthdate</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , case_number, entry_date, child_adult</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , household_income, referral_from, birthdate, zip_code</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , sex, race, educ_status</FONT>
<BR><FONT SIZE=2 FACE="Arial"> , hfpr.terminate_date, hfpr.terminate_reason</FONT>
<BR><FONT SIZE=2 FACE="Arial"> from hipr, hfpr</FONT>
<BR><FONT SIZE=2 FACE="Arial"> where case_number = case_no</FONT>
<BR><FONT SIZE=2 FACE="Arial"> and entry_date >= '07/01/1999';</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The 4th line concatenates into the first variable but, the field hipr.last_name has trailing blanks which I can not seem to eliminate. What is the systax.</FONT></P>
</BODY>
</HTML>
--Boundary_(ID_bfORVp/dC4dodGj7fB7cmg)--