×
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.
I have a SQL Statement in an RPG Program that uses fields that aren't in
the group by as selections. Something like this where field RID is used to
select.
When I try to create it as a view I can't access RID.
RPG SQL:
select :ls.shp, ls.sea, ls.sty, ls.clr,
ls.fab, ls.mod, ls.msz,
sum(ls.qty), sum(ls.qty)
from locsku00 ls
where ls.rid=:invrid
group by
ls.shp,
ls.sea, ls.sty, ls.clr,
ls.fab, ls.mod, ls.msz;
Create View
create view InvPhy (shp,sea,sty,clr,fab,mod,msz,qty) as
(SELECT ls.shp,ls.sea,ls.sty,ls.clr,ls.fab,ls.mod,ls.msz,SUM(ls.qty)
FROM invdta.locsku00 as ls
GROUP BY ls.shp,ls.sea,ls.sty, ls.clr,ls.fab, ls.mod, ls.msz);
Try to use the View
select * from INVPHY where rid = 81251501 and shp=50875 and sty=
'J4LW2700' order by shp,sea,sty,clr,fab,mod,msz
[SQL0206] Column or global variable RID not found. [SQL State=42703, DB
Errorcode=-206]
Can I use a view for this?
Thanks, Art
As an Amazon Associate we earn from qualifying purchases.
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.