× 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.



Wouldn't you want something like this:
select shp,sea,sty,clr,fab,mod,msz, sum(qty) as ResultColumn
from INVPHY
where rid = 81251501 and shp=50875 and sty= 'J4LW2700'
group by shp,sea,sty,clr,fab,mod,msz
order by shp,sea,sty,clr,fab,mod,msz

** - Replacing the sum() with whatever function you want, or maybe use DISTINCT and remove the GROUP BY (depending on your goal).




-----Original Message-----
From: Art Tostaine, Jr. [mailto:atostaine@xxxxxxxxx]
Sent: Thursday, August 30, 2018 12:22 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: SQL View question

RID is like a record key so the group by doesn't work.
I took the group by out of the view and added RID.

Here is view
create view InvPhy (rid,shp,sea,sty,clr,fab,mod,msz,qty) as (SELECT ls.rid,ls.shp,ls.sea,ls.sty,ls.clr,ls.fab,ls.mod,ls.msz,ls.qty
FROM invdta.locsku00 as ls);

Here is my select says RID or expression in select list not valid

select * from INVPHY
where rid = 81251501 and shp=50875 and sty= 'J4LW2700'
group by shp,sea,sty,clr,fab,mod,msz
order by shp,sea,sty,clr,fab,mod,msz

[SQL0122] Column RID or expression in SELECT list not valid. [SQL State=42803, DB Errorcode=-122]


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.