I realize that. I'm fully well aware of that issue; this is something I do all the time. Based ont he values of the variable, all of that IS in place. I know because, at the command line, I progressvely manually expanded out the EXACT content of each variable. What seems to be happening is that the expansion is stopping short somewhere.

Walker, Buddy wrote:

Kayza
 What I was trying to show you was that you have to build your where clause as you go. 
It can be kind of hairy to get all the  ANDs, Parens, quotes in line but it can be 
done. I have a program where users select from various menus for the where and I just 
continue to add to it.

Buddy


-----Original Message----- From: Kayza Kleinman [mailto:[EMAIL PROTECTED] Sent: Mon 8/30/2004 3:39 PM To: RBG7-L Mailing List Cc: Subject: [RBG7-L] - RE: edit using command not working



The problem is not with whval1. That evaluates correctly. Also, you effectively typed out the content of the "wheres" variable, which is not practical from within the program. After playing around with it from the command line, I see that when I expand that out manually, it works. But, the problem is that I need to allow the user to make the choice at run time.

Walker, Buddy wrote:

>Kayza > Try this > > SET VAR whval1 = ('this id') > SET VAR VQ = (CVAL('QUOTES')) > SET VAR full_where = ('where AGENCY_NAME cont' & .VQ+.whval1+.vq & 'and ID IN (SELECT ID from contacts where Contact_Date IS NOT NULL)' )

> > EDIT USING AgencyWAbbrevHist &full_where ORDER BY agency_name > > The set var full_where should produce the following variable > >full_where = where AGENCY_NAME cont 'this TEXT > id' and ID IN (SELECT ID from > contacts where Contact_Date > IS NOT NULL) > > >Buddy > > > >-----Original Message----- >From: Kayza Kleinman [mailto:[EMAIL PROTECTED] >Sent: Monday, August 30, 2004 1:26 PM >To: RBG7-L Mailing List >Subject: [RBG7-L] - edit using command not working > > >I have the following variables defined: > >temp int >whval1 = boro park >wheres = WHERE contacts.CONTACT_DATE IS NOT NULL >full_where = where AGENCY_NAME cont .whval1 and ID in (select id from >contacts &wheres) > >When I do the following command: >SELECT (COUNT(*)) INTO TEMP FROM agencies &full_where > >I get a value in TEMP > >However, when I run the following command: >EDIT USING AgencyWAbbrevHist &full_where ORDER BY agency_name > >I get -Error- Syntax Error (2367) > >The form is based on the table agencies, which is the same table I'm >doing the prior select on. It's a two table form, and the master and >child tables are bound by ID. > >Outside of this, the form works perfectly well. Furthermore, if I >actually type out the contents of the variables, it works fine. It's >clearly a matter of how the variable are being interpreted. > >Any ideas? > > >

--

Kayza Kleinman

Director, Nonprofit Helpdesk

Jewish Community Council of Greater Coney Island, Inc.

3001 West 37th Street

Brooklyn, NY 11224

Tel. 718 449-5000

Fax 718 946-8240

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

www.nphd.org <http://www.nonprofithelpdesk.org/>

“Putting Technology to Work For You�




--

Kayza Kleinman

Director, Nonprofit Helpdesk

Jewish Community Council of Greater Coney Island, Inc.

3001 West 37th Street

Brooklyn, NY 11224

Tel. 718 449-5000

Fax 718 946-8240

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

www.nphd.org <http://www.nonprofithelpdesk.org/>

“Putting Technology to Work For You”



Reply via email to