Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pick > Re: D3 ACCESS c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 12 Topic 3419 of 3636
Post > Topic >>

Re: D3 ACCESS command

by Dale <dale_benedict@[EMAIL PROTECTED] > Mar 27, 2008 at 08:15 AM

On Mar 25, 12:47=A0pm, sh <sham...@[EMAIL PROTECTED]
> wrote:
> Dale wrote:
> > On Mar 25, 11:58 am, sh <sham...@[EMAIL PROTECTED]
> wrote:
> >> I've come across the following need on a number of occasions, and I'm
> >> wondering if there already exists a D3 command that will do the
followi=
ng:
>
> >> I get a SAVE-LIST of values from some source
>
> >> 001 10001
> >> 002 10015
> >> 003 10018
> >> ...
> >> 100 10526
>
> >> I now want to SELECT off another file, but the values in the
SAVE-LIST
> >> are not item-ids in the second file, but are values (or multivalues)
in=

> >> a field within the second file.
>
> >> In other words, I want the ACCESS command to morph to
>
> >> SELECT file WITH field =3D "10001" "10015" "10018" ... "10526".
>
> >> So my sequence of commands would be
>
> >> SELECT file1
> >> SELECT file2 WITH field =3D
any-single-value-within-previous-select-lis=
t
>
> >> I know I can probably get around this by using some sort of REFORMAT
> >> into a tem****ary file, but that's messy. I'm looking for something
> >> straightforward.
>
> >> Does such a command already exist in D3, or do I have to roll my own?
>
> > As far as I know you have to roll your own. =A0But what you want to do
> > doesn't take much if you look at phrases.
>
> > What you need to do is create the list of things you want to search on
> > in the format "a1""a2""a3""a4"... put this in attribute 2 and an 'H'
> > in attribute 1 and store in the md under a unique name.
>
> > Then use the access statement:
> > =A0 =A0 LIST SECONDFILE WITH A4 =3D PHRASENAME
>
> > and presto-chango!!! majic happens
>
> > So create a program that will accept the list.
>
> > Something like:
>
> > open 'md' else stop 201,'md'
> > frase =3D 'h'
> > eol =3D 0
> > loop
> > =A0 =A0readnext stuff else eol =3D 1
> > until eol do
> > =A0 =A0frase<2> =3D '"':stuff:'"'
> > repeat
>
> > write frase on @[EMAIL PROTECTED]
'.frase'
>
> > Then your access statement would be
>
> > =A0 =A0 select filename with attr =3D me.frase
>
> > where 'me' is your logon id
>
> > Regards,
>
> > Dale
>
> Interesting idea.
>
> I think the line should be
>
> frase<2> =3D frase<2> : '"':stuff:'"'- Hide quoted text -
>
> - Show quoted text -

Yep.... I missed the : on the :=3D  shorter version of the code.
 




 12 Posts in Topic:
D3 ACCESS command
sh <shamada@[EMAIL PRO  2008-03-25 14:58:15 
Re: D3 ACCESS command
Dale <dale_benedict@[E  2008-03-25 12:19:13 
Re: D3 ACCESS command
sh <shamada@[EMAIL PRO  2008-03-25 15:47:58 
Re: D3 ACCESS command
rockingred <willsteve2  2008-03-27 06:35:40 
Re: D3 ACCESS command
Dale <dale_benedict@[E  2008-03-27 08:15:27 
Re: D3 ACCESS command
Dale <dale_benedict@[E  2008-03-27 08:19:05 
Re: D3 ACCESS command
sh <shamada@[EMAIL PRO  2008-03-27 11:39:25 
Re: D3 ACCESS command
Scott Ballinger <scott  2008-03-30 21:19:01 
Re: D3 ACCESS command
Tony Gravagno <address  2008-03-29 17:58:28 
Re: D3 ACCESS command
"Peter McMurray"  2008-03-31 01:29:35 
Re: D3 ACCESS command
sh <shamada@[EMAIL PRO  2008-03-31 10:36:35 
Re: D3 ACCESS command
Tony Gravagno <address  2008-03-31 15:55:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 21:34:45 CDT 2008.