× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I assume you are running in cl? If yes, must be triple quoted. '''1010'''.
On Sep 9, 2014 5:11 PM, "Jeff Young" <jyoung0950@xxxxxxxxx> wrote:

All,
I have a QMQRY in SQL format with the following statement:
SELECT IFCOMP, IFITEM FROM VINITMB WHERE IFITEM = &ITEM

Field IFITEM is defined as Char 20 and can contain numbers, characters or a
mix of both.

When I run this using STRQMQRY *without* specifying any values for the
SETVAR keyword, it prompts for the value of *"ITEM"*. i enter *'1010' *and
get a report of all records with that value.

When I run it using the STRQMQRY *with* specifying the SETVAR keyword as
follows:
STRQMQRY TEST SETVAR(('ITEM' ' '1010')) the query ends abnormally with a
message in the joblog indicating a selection error on field IFITEM. The
prior messages indicate that it is attempting to CAST the IFITEM field as
INTEGER.

What am I missing here?
Is it not possible to pass a character value as a variable to a QMQRY?

TIA,

Jeff Young
Sr. Programmer Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.