HTH
R. Bruce Lunt 408.832.1900 cell
From: [EMAIL PROTECTED] Reply-To: U2 Users Discussion List <[EMAIL PROTECTED]> To: U2 Users Discussion List <[EMAIL PROTECTED]> Subject: Memo: RE: [UD] Union Query Date: Fri, 30 Apr 2004 16:49:46 +0100
Hi Ed,
You could test for the record existing in one file and if it does use the dict for that file otherwise use the dict for the other file:
TRANS("FILE.A",ID,1,"X"); IF @1 <> '' THEN FILEA.NAME ELSE FILEB.NAME
where FILEA.NAME returns the name from FILE.A and FILEB.NAME returns the name for FILE.B
this is all off the top of my head, but it should work.....
hth
asvin
"Burwell, Edward" <[EMAIL PROTECTED] on 30 Apr 2004 16:33
Please respond to U2 Users Discussion List <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
To: 'U2 Users Discussion List' <[EMAIL PROTECTED]> cc: bcc:
Subject: RE: [UD] Union Query
@ID in this case points to the filename mentioned in my statement:
LIST ORDER.FILE
the @ID's from ORDER.FILE.OTHER are showing up as non-existent:
(My merged list contains 10 items from ORDER.FILE and 10 items from ORDER.FILE.OTHER)
ORDER.FILE NAME......................... Name.OTHER..................
114061 C.M.O.S. INC. *ASC* 114062 AMERICAN PERFIT XSTAL 122228 TIMELAND COMPANY 122229 MCCANN ELECTRONICS *STR* 130395 TERMINAL TECH SERVICE 138562 TOWN VISION ELECTRONICS 154897 CASIO SERV CENTER *ASC* 163063 CASIO SERV CENTER *ASC* 171230 AMERICAN PERFIT XSTAL 195731 ELECT MUSIC INSTR *FAS* 10 records listed Enter <CR> to print non exist record ids 007890 007891 007892 007893 007894 016057 016058 016059 016060 016061
Ed Burwell [EMAIL PROTECTED] 973.361.5400 x1512
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 11:18 AM To: [EMAIL PROTECTED] Subject: RE: [UD] Union Query
My suggestion is to create a "V" type dictionary item(s) that with point to your other file.
For example, if you want to look at the city name in your file, ORDER.FILE.OTHER, create the following:
001: V 002: TRANS('ORDER.FILE.OTHER', @ID, <location of city in ORDER.FILE.OTHER'>, 'X') 003: 004: City (ORDER.FILE.OTHER) 005: 30L 006: S
Also, I recommend that you check out the capabilities of TRANS. There are other return codes.
Hope this helps.
Grant W. Boice, Jr. Systems Administrator Benchmark Electronics, Inc. Manassas Division 8500 Phoenix Drive Manassas, VA 20110
Phone: (703) 334-0156 Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Web: www.bench.com <http://www.bench.com>
-----Original Message----- From: Burwell, Edward [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 11:05 AM To: 'U2 Users Discussion List' Subject: RE: [UD] Union Query
I understand how Unibasic could handle a list that has been merged, but how would you do a Uniquery statement?
for example:
SELECT ORDER.FILE WITH DATE > "1/1/2004" SAVE-LIST LIST1
SELECT ORDER.FILE.OTHER WITH DATE > "1/1/2004" SAVE-LIST LIST2
GET-LIST LIST1 TO 1 GET-LIST LIST2 TO 2 MERGE.LIST 1 UNION 2 SAVE-LIST LIST.ALL
GET-LIST LIST.ALL
What do you enter here?
LIST ORDER.FILE NAME ADDRESS CITY STATE ZIP
or
LIST ORDER.FILE.OTHER NAME ADDRESS CITY STATE ZIP
How would a virtual dictionary know which file to get the NAME ADDRESS CITY and STATE from?
Thanks.
Ed Burwell [EMAIL PROTECTED] 973.361.5400 x1512
-----Original Message----- From: Baakkonen, Rodney [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 10:27 AM To: 'U2 Users Discussion List' Subject: RE: [UD] Union Query
You could use MERGER.LIST to get one list which is a UNION of two separate selects of each file. But you would not know which file the key was from when you were done. But Unibasic or Virtual dictionary items could take the merged list and produce what you are looking for.
-----Original Message----- From: Burwell, Edward [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 9:13 AM To: 'U2 Users Discussion List' Subject: [UD] Union Query
Hello,
Does anyone know of a way to do the equivalent of a UNION "query" (really a LIST or SORT) on 2 or more different UniData files?
I have 2 files in separate accounts that are structured the same. I want to do something like:
SORT ORDER.FILE AND ORDER.FILE.OTHER WITH DATE > "01/01/2004" NAME ADDRESS CITY STATE ZIP
Thanks in advance.
Ed Burwell [EMAIL PROTECTED] 973.361.5400 x1512 -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
****************************************************************** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ******************************************************************
************************************************************ HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ Registered in England - Number 14259 Authorised and Regulated by the Financial Services Authority
Member of the HSBC Bank marketing group. We sell life assurance, pensions and collective investment schemes and advise only on our own range of these products. ************************************************************
_____________________________________________________
This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and / or distributed to any other person. Each page attached
hereto must be read in conjunction with any disclaimer which forms part
of it. Unless otherwise stated, this transmission is neither an offer nor the
solicitation of an offer to sell or purchase any investment. Its contents are
based on information obtained from sources believed to be reliable but
HSBC makes no representation and accepts no responsibility or liability as
to its completeness or accuracy.
-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00200439ave/direct/01/
-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users