Normal Topic More value's from a lookup (Read 1186 times)
alex_smits
Member
*
Offline


No personal text

Posts: 27
Location: Arnhem, The Netherlands
Joined: Dec 15th, 2003
More value's from a lookup
Mar 26th, 2005 at 7:21am
Print Post Print Post  
I'am a dutch sesame user and have a question, is er a possibility to get more value's with 1 xlookup.

I use a very large zipcode datbase, and have now do 2 xlookups to get a adress and a place.

The lookup must find twice the same record.

I looking for a command to find the zipcode in the database en fill the adress and place in once
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: More value's from a lookup
Reply #1 - Mar 26th, 2005 at 1:10pm
Print Post Print Post  
Use @XLookupSourceList. It returns the list of specified values as a semicolon separated string. You can work withthe returned value using the StringArray functions.

See page 90 of the Sesame 1.1 Programming Guide.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
alex_smits
Member
*
Offline


No personal text

Posts: 27
Location: Arnhem, The Netherlands
Joined: Dec 15th, 2003
Re: More value's from a lookup
Reply #2 - Mar 27th, 2005 at 10:01am
Print Post Print Post  
I have used the following programming.

var returnval as string
var str1 as string
var str2 as string
var str3 as string
IF CHECK = "J" THEN returnval= @XLookupsourcelist ("C:\SESAME\DATA\POST.DTF", POSTCODE, "POSTCODE", "STRAAT;PLAATS")
str1 = returnval
str2 = @AccessStringArray(str1, 1)
str3 = @accessStringArray(str1, 2)
adres=str2
woonplaats=str3

But it isn't work, it's do nothing, what i am doing wrong??
  
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: More value's from a lookup
Reply #3 - Mar 27th, 2005 at 12:17pm
Print Post Print Post  
May be you already know that the x-family statements and functions do not run in the preview mode.  Are you getting the list from Q&A file? If it is Sesame file then it should be .db instead of .dtf  I think new x-family commands are not supported to work with Q&A.  On page 39 of programming guide, it mentions, preceding commands supports Q&A...I assume succeeding commands do not.
« Last Edit: Mar 27th, 2005 at 1:22pm by Bharat_Naik »  
Back to top
 
IP Logged
 
alex_smits
Member
*
Offline


No personal text

Posts: 27
Location: Arnhem, The Netherlands
Joined: Dec 15th, 2003
Re: More value's from a lookup
Reply #4 - Mar 27th, 2005 at 3:39pm
Print Post Print Post  
You have right it doesn't work with Q&A file, i have translated the database and it works perfect thanks!  Smiley
  
Back to top
IP Logged