RE: [RBASE-L] - SQL Help - OT

2018-11-27 Thread paul
Thanks everyone, I kind of did a combination of Albert’s browse command and Bill’s “logic”. I created a SQL view called TRACE_vw and the below SQL select works great: select T1.ROWID, T1.PART_ID, T1. ID, T1.APROPERTY_4 from TRACE T1, TRACE_vw T2 where T1.PART_ID = 'PV216365006R' and

Re: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Doug Hamilton
Is also coincidence that ID1 is less than ID2 in the selected rows? Could that be a SEL criteria? Doug On 11/27/2018 8:48 AM, p...@buckleyandassoc.com wrote: Dan, Thanks but it’s only coincidental that the sample I created I needed the “odd” rowid’s. My guess is it will be 50/50 odd or

Re: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Albert Berry
Bill, my example above used the RowID as the “ordering" column, and returned the results from his admittedly small sample set. That is how I read his query. Albert > On Nov 27, 2018, at 11:04 AM, Bill Downall wrote: > > Unfortunately for you, Paul, the SQL definition of a table is "an

Re: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Bill Downall
Unfortunately for you, Paul, the SQL definition of a table is "an unordered set of rows." So the concept of a "next row" is problematic to building a query. Your query provides the order through the ORDER BY clause. Will the ID2 column match a ID1 column more than once in the table? I'd be

Re: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Albert Berry
The attached RMD will create a database (double quotes) with the one table, load the data you supplied and run a query that returns your results. You can modify the query to suit your needs. Albert -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You

Re: [RBASE-L] - Forms - Tables in Forms - Custom Table Relationships

2018-11-27 Thread Albert Berry
You are more than welcome. I have received so much help from others on this forum and its predecessors since 1984 I feel honour bound to return the favour. Albert > On Nov 26, 2018, at 3:19 PM, Myron Finegold wrote: > > Albert, > I just finished recreating the form and all works fine. > I

RE: [RBASE-L] - SQL Help - OT

2018-11-27 Thread paul
Dan, It will always be the previous row. I would sort on the ID1 column so it would always be the previous row. Thanks, Paul From: rbase-l@googlegroups.com On Behalf Of Dan Goldberg Sent: November 27, 2018 10:09 AM To: rbase-l@googlegroups.com Subject: RE: [RBASE-L] - SQL Help - OT

RE: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Dan Goldberg
Is it only from the previous row or any of the rows? Dan Goldberg From: rbase-l@googlegroups.com On Behalf Of p...@buckleyandassoc.com Sent: Tuesday, November 27, 2018 6:48 AM To: rbase-l@googlegroups.com Subject: RE: [RBASE-L] - SQL Help - OT Dan, Thanks but it’s only coincidental that the

RE: [RBASE-L] - SQL Help - OT

2018-11-27 Thread paul
Dan, Thanks but it’s only coincidental that the sample I created I needed the “odd” rowid’s. My guess is it will be 50/50 odd or even. What I need is to check ID1 & ID2 and if the ID1 from the next row equals the ID2 from the previous row I don’t select that row. Thanks anyway, Paul

RE: [RBASE-L] - SQL Help - OT

2018-11-27 Thread Dan Goldberg
You can do this to get the odd rowid values in rbase. Select ROWID, PART_ID, ID1, ID2 from tablename where (MOD(ROWID,2)) = 1 Dan Goldberg From: rbase-l@googlegroups.com On Behalf Of p...@buckleyandassoc.com Sent: Tuesday, November 27, 2018 6:23 AM To: rbase-l@googlegroups.com Subject:

[RBASE-L] - SQL Help - OT

2018-11-27 Thread paul
Good morning, I need some help with a SQL select command, not specifically for R:BASE. See my little table sample below. What I’d like to end up with after the SQL select is the following rows: Results of SQL Select/Query ROWID PART_ID ID1