MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2014

RE: QMQRY using multiple files



fixed

Dan, Michael actually answered your question.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Rasch
Sent: Thursday, July 10, 2014 8:08 AM
To: midrange-l@xxxxxxxxxxxx
Subject: RE: QMQRY using multiple files

Yup. Thank you, Gary!

Date: Thu, 10 Jul 2014 09:51:04 -0400
Subject: Re: QMQRY using multiple files
From: mschutte369@xxxxxxxxx
To: midrange-l@xxxxxxxxxxxx

Dan,

It looks like you have double quotes around the "A". I believe it
thinks that's a field name. Change to 'A' single ticks.

WHERE A.TRFBCH = B.TRFBCH AND B.TRFSTS = "A"


On Thu, Jul 10, 2014 at 9:47 AM, Gary Thompson <gthompson@xxxxxxxxxxx>
wrote:

totally

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of Dan Rasch
Sent: Thursday, July 10, 2014 7:47 AM
To: midrange-l@xxxxxxxxxxxx
Subject: QMQRY using multiple files

Can two files be joined in QMQRY? Seems like it should be ok.

I tried to join multiple files in a QMQRY and it was not happy.
Does not like the A behind my first file.
So, I am not happy. Friday, yet?

Here is the source:

INSERT INTO DANRLIB/STEP001(SELECT A.TRFBCH, A.TRFSTS, A.TRFTYP,
A.TRFFLC, A.TRFTLC, A.TRFIDT, A.TRFINS, A.TRFREF, B.INUMBR,
B.TRFREQ, B.TRFSHP, B.TRFREC, B.TRFALC FROM MM4R6LIB/TRFHDR A,
MM4R6LIB/TRFDTL B WHERE A.TRFBCH = B.TRFBCH AND B.TRFSTS = "A"
AND A.TRFFLC IN(902, 904, 970, 971)
AND A.TRFIDT >= 060601
AND A.TRFIDT <= &NXTSAT
AND A.TRFTLC <> 66
AND A.TRFTLC <> 68
ORDER BY A.TRFLLC)

the message I got:

strqmqry danrlib/step003
Type a value for variable "NXTSAT" and press Enter.
140712
Column or global variable A not found.
RUN QUERY command failed with SQLCODE -206.
RUN QUERY command ended due to error.
STRQMQRY command failed.

--
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.

--
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.


--
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.


--
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.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact