Re: [U2] syntax for joining two files in Retrieve statement using Universe

2007-07-15 Thread Ray Wurlod
I disagree with the "vewy, vewy ugly" Clif (or is that Elmer?).  UniVerse/SQL 
is "just another query language" - UniVerse has two parsers but only one query 
engine.

Another solution is to build TRANS() I-type expressions into the command line 
using EVAL with any required field modifiers.  Note that you do have to quote 
the parent table name, unlike building it in a file dictionary.  For example:

LIST ORDERS CUST.NO EVAL "TRANS('CUSTOMERS', CUST.NO, 1, 'X')" COL.HDG 
"Customer" FMT "32T" ORDER.TOTAL
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] syntax for joining two files in Retrieve statement using Universe

2007-07-13 Thread Clifton Oliver
I am NOT suggesting this, but for accuracy you *can* use such  
notation and do joins if you, 1) turn your account(s) into UniVerse  
Schemas and 2) use UniVerse SQL instead of retrieve.


Of course, then constraints are enforced (you WILL properly mark your  
field S or M, etc.), datatypes are enforced, and so forth. In other  
words, while it sounds lovely, in the Real Word of UniVerse inherited- 
from-who-knows-where applications, the application usually ties its  
shoe laces together and tries to run down-hill.


It gets vewy, vewy, ugly.

I've helped clients do this, so if anyone wants to consider it,  
contact me direct, off list.



--

Regards,

Clif

~~~
W. Clifton Oliver, CCP
CLIFTON OLIVER & ASSOCIATES
Tel: +1 619 460 5678Web: www.oliver.com
~~~


On Jul 13, 2007, at 6:48 PM, Bob Woodward wrote:

If I understand what you're asking for, I'm not aware of a way to  
use two

dictionaries in one Retrieve statement.  You would, instead, create
dictionary entries in your primary file that accomplish the  
"linking" to
other files for an attribute by attribute connection.  Look up  
xlate or

trans to be used in i-descriptor dictionary entries.

You're not in SQL-Kansas an more, Toto.  :-)

BobW

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, July 13, 2007 5:35 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] syntax for joining two files in Retrieve statement using
Universe

I would like to populate a Retrieve statement in Universe joining  
two files
linking common fields in those two files. What would be the syntax  
to use to

accomplish my need? If I want to list in that Retrieve statement,
dictionary and non-dictionary items, is it just enough to Prefix  
the file

name with a period after -example PM.PMID, POLI.VENDOR.
Thanks for the help.
Krish
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] syntax for joining two files in Retrieve statement using Universe

2007-07-13 Thread Bob Woodward
If I understand what you're asking for, I'm not aware of a way to use two
dictionaries in one Retrieve statement.  You would, instead, create
dictionary entries in your primary file that accomplish the "linking" to
other files for an attribute by attribute connection.  Look up xlate or
trans to be used in i-descriptor dictionary entries.

You're not in SQL-Kansas an more, Toto.  :-)

BobW

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, July 13, 2007 5:35 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] syntax for joining two files in Retrieve statement using
Universe

I would like to populate a Retrieve statement in Universe joining two files
linking common fields in those two files. What would be the syntax to use to
accomplish my need? If I want to list in that Retrieve statement,
dictionary and non-dictionary items, is it just enough to Prefix the file
name with a period after -example PM.PMID, POLI.VENDOR.
Thanks for the help.
Krish 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] syntax for joining two files in Retrieve statement using Universe

2007-07-13 Thread MAJ Programming
My suggestion would for Krish to get a very good understanding of what
normal outputs are available in Retrieve and to understand the way our
post-dictionary items work. AFAIK, all queries function on a primary data
file and everything is relative to that file. Therefore, the answer is NO,
you can not just type PM.PMID or POLI.VENDOR and the desired results
magically appear.

His illustrated suggestions indicate that he comes from a different database
where the filefield style is normal and virtually required. Him
learning that our applications do not need all the fields defined at the
dicitonary level in order to work in Data/Basic will be one of his first
surprises. From there he can learn that there's really 2 sides to the
database: The unregulated updates from Basic and the later usage using
retrieval languages.

Therefore, the data/basic program need not know of the dictionary item
called VENDOR to put data in the proper attribute assumed to be the vendor.
It updates the field by field number, not by field name.

While this may not cover his exact question, it should lay the foundation
for learning how MV works in general and to begin to identify the
differences between MV and SQL-style databases.

If anyone is using a 4GL or other hamburger helper that performs the
functions, then it should be made aware that these are private extensions of
the MV data model and not MV by itself.

My 2 cents
Mark Johnson


- Original Message -
From: <[EMAIL PROTECTED]>
To: 
Sent: Friday, July 13, 2007 8:35 PM
Subject: [U2] syntax for joining two files in Retrieve statement using
Universe


> I would like to populate a Retrieve statement in Universe joining two
files linking common fields in those two files. What would be the syntax to
use to accomplish my need? If I want to list in that Retrieve statement,
dictionary and non-dictionary items, is it just enough to Prefix the file
name with a period after -example PM.PMID, POLI.VENDOR.
> Thanks for the help.
> Krish
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/