Jason
 
Question #1 - send email question to John Minyo ([email protected])
 
Question #2
 
1> If bigcol and smallcol are in the same table add a computed field in the
table. ex. Newcol=(bigcol&smallcol)
OR
2> Go to table design and change the length of smallcol to match the length
of bigcol and then do your union. Make sure you do a UNION ALL otherwise you
may lose some data.
 OR
 In the table with smallcol put a new computed field(which is set to equal
smallcol) that matches the length of bigcol and union on that.
OR
3> If bigcol and smallcol have a common column (say transid) create a new
table projected from t1.bigcol; then add smallcol def to new table and run a
cursor matching on the common column.
 
Use the syntax Bill Downall suggested adding ALL after UNION.
 
Hope this helps.
 
Bill Eyring

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of Jason Kramer
Sent: Thursday, January 08, 2009 10:40 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Two questions


Can someone please point me to the mailing list archives?  I know the answer
to this question has been on the list before, but I can't find where I saved
the answer.  Sorry about the duplication.

I have two text columns that I want to UNION, but they are different lengths
(100 and 36, if it matters), so I get a Column type mismatch in UNION (2372)
error.  Is there any way to cast or pad the smaller column into a string
that matches the larger one so the UNION will work?  Something along the
lines of:

SELECT bigcol FROM MyTable WHERE <CONDITION> UNION <CAST OR PAD> SELECT
smallcol FROM MyTable WHERE <CONDITION>

I'm open to other suggestions.  I am trying to take the contents of multiple
columns and combine them into one column in a view (I only need the combined
data temporarily).
                                           Thanks,
                                           Jason

-- 

Jason Kramer

University Archives and Records Management

002 Pearson Hall

(302) 831 - 3127 (voice)

(302) 831 - 6903 (fax)

Reply via email to