× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Chuck,


The second table that resides in our system has already been created and
the
field that I am interested in, has been defined as Graphic type, 20 bytes
long.
I would need to substring the first 10 bytes and "Join" that field

Do you think that in your example can be changed to something like this?


chgjob ccsid(37)
strsql
create table qtemp.p1 (Z numeric (10, 0) not null )
create table qtemp.p2 (G graphic (20) ccsid 13488 not null )
insert into qtemp.p1 values(20070816)
insert into qtemp.p2 values('20070816 ')

Question: How to join equivalence on Z and G?
select Z ,G
from qtemp.p1 ,qtemp.p2
where char(Z) = substring(G 1, 10)

If that is the case .. then I will be able to create an SQL view
and my permanent access will be in place!

Thanks for your reply



Jorge


midrange-l-bounces@xxxxxxxxxxxx wrote on 08/16/2007 09:00:52 AM:

Note: The buffer length of 20 should not be confused with how many
_characters_ the field has. The fields have equivalent characters in
length, thus no Substring should be done.

Scenario:
chgjob ccsid(37)
strsql
create table qtemp.p1 (Z numeric (10, 0) not null )
create table qtemp.p2 (G graphic (10) ccsid 13488 not null )
insert into qtemp.p1 values(20070816)
insert into qtemp.p2 values('20070816')

Question: How to join equivalence on Z and G?
select Z ,G
from qtemp.p1 ,qtemp.p2
where char(Z) = G

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.