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



Dale,

This is why I only ever used QM in prompt mode when I was trying to learn SQL syntax. At this point, I'd convert the QM to SQL, and then fix the issues there...

When you "Work with Query Manager Queries", one of the subfile options is 10=Convert to SQL. You might want to make a copy of your original query if you think you want an original source, but once converted, you should be able to see the expressions (your cost calc function), and apply the appropriate cast to define the result dimensions you want.

Sorry I can't help with using QM in prompt mode...

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dale Janus
Sent: Wednesday, March 19, 2014 10:19 AM
To: RPG
Subject: problem with SQL query manager

I was using query manager to create a quick inventory cost report for
selected vendors. Our material is stored in feet and inches and a cost
per foot. I divided inches by 12, added to feet and multiplied by cost
per foot. This was a created expression using the prompts in query manager
The result field was 32 positions long. While I could read the detail
data, the total line was too long to display. (maybe it would have
printed, I did not try).

So I tried rounding the expression and truncating the expression. Result
was the same.

Can anyone tell me how to define the length of an expression in query
manager?


Here are some screen shots.


Define Expressions

Type expression using field names, constants, and operators, press Enter.
For full name and expression, press F4.
Valid operators are: +, -, *, /, CONCAT ...

Name Expression
COST2 ROUND(COSTFT+COSTIN,2)
COST TRUNCATE(LENGTH*INCOST,2)

More...


Edit Column Formatting

Type information, press Enter.
For Usage and Edit, press F4 for list.
For Heading, press F4 for prompt.

Column Heading Usage Edit Seq Indent
Width
INVEN# VENDOR_NUMBER 1 2 7
INODM OD 2 2 6
INWALL WALL 3 2 5
COST COST 4 2 33
INFT LENGTH_FEET 5 2 6
ININ LENGTH_INCHES 6 2 6
LENGTH LENGTH 7 2 33
INCOST COST/_FOOT 8 2 9


Display Report
Query . . . . .: * Width . . .: 142
Form . . . . .: * Column . .: 1
Control . . . .
Line
....+....1....+....2....+....3....+....4....+....5....+....6....+....7.
VENDOR LENGTH
LENGTH C
NUMBER OD WALL COST FEET INCHES LENGTH F
------- ------ ----- ---------- ------ ------ ----------
-----
000001 194613 3.500 .438 ?????????? 6
********** 11
000002 194613 3.500 .438 ?????????? 1 6
********** 11
000003 194613 3.500 .438 ?????????? 1 7
********** 11
000004 194613 3.500 .438 ?????????? 22 8
********** 11
000005 194613 3.500 .438 ?????????? 35 5
********** 11
000006 194613 3.500 .438 ?????????? 35 6
********** 11
000007 194613 3.500 .438 ?????????? 35 6
********** 11
000008 194613 3.500 .438 ?????????? 35 6
********** 11
000009 194613 3.500 .438 ?????????? 35 7
********** 11
000010 194613 3.500 .438 ?????????? 35 7
********** 11
000011 194613 3.500 .438 ?????????? 35 7
********** 11
000012 194613 3.500 .438 ?????????? 35 7
********** 11
000013 194613 3.500 .438 ?????????? 35 7
********** 11
More...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.