• Subject: RE: Passing Parameters to Query
  • From: "Ladutko, Bob" <Bob.Ladutko@xxxxxxxxxxxx>
  • Date: Mon, 28 Dec 1998 15:49:18 -0500

OK, I guess I belong in the slow group.  

I set up a query with the following record selection:

  FGNAME            EQ     :item  

where FGNAME is an alpha field in the file I'm querying.  I then
interactively ran the STRQMQRY command against the saved query definition.
I got the following prompt:

  Type a value for variable "ITEM" and press Enter.

I then entered "ABC" and pressed Enter.  I got the following error:

Message ID . . . . . . :   SQL0206       Severity . . . . . . . :   30

Message type . . . . . :   Diagnostic

Date sent  . . . . . . :   12/28/98      Time sent  . . . . . . :   15:44:07

 

Message . . . . :   Column ABC not in specified tables.

Cause . . . . . :   ABC is not a column of table *N in library *N. If the

  table is *N, ABC is not a column of any table or view that can be

  referenced.

Recovery  . . . :   Do one of the following and try the request again:

    -- Ensure that the column and table names are specified correctly in the

  statement.

    -- If this is a SELECT statement, ensure that all the required tables
were 
  named in the FROM clause.

    -- If the column was intended to be a correlated reference, qualify the

  column with the correct table designator.


This leads me to believe that the value I enter for ":item" represents the
field I want to compare FGNAME to, rather than the actual value I want to
compare FGNAME to.

Am I understanding this correctly?  Is there a way to pass the actual value
with the STRQMQRY command?

Thanks for any help.

Bob L.


> -----Original Message-----
> From: Pete Hall [SMTP:peteh@inwave.com]
> Sent: Wednesday, December 23, 1998 10:15 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: Passing Parameters to Query
> 
> At 08:56 12/23/1998 -0500, Alan Novick wrote:
> >This is fascinating.  But how do you specify variable names in the
> >record selection part of your query definintion?
> 
> It's been quite a while. I don't have Query, but as I recall, in the
> record
> selection dialog in Query, you specify the comparison value with a leading
> colon (:MYVAR). Query then thinks you will provide a value for it with a
> subquery. Just provide any subquery name when prompted. It won't get used,
> so the name doesn't matter. The object needn't exist. The value for :MYVAR
> will be supplied by the STRQMQRY parameter.
> Pete Hall
> peteh@inwave.com
> http://www.inwave.com/~peteh
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.