Enter Parameter Value (1 Viewer)

Susy

New member
Local time
Today, 21:10
Joined
Dec 19, 2019
Messages
25
Hi,
When launching a query, I always get the 'Enter Parameter Value' popup for 'SumOfTotal_Paid_USD' and 'SumOfNumber_Boxes'. I have tried several fixes, but unfortunately, none is working for me. Can someone please help?
Thanks,
Susy
 

Attachments

  • Query.JPG
    Query.JPG
    42.8 KB · Views: 84
  • SQL Query.JPG
    SQL Query.JPG
    35.3 KB · Views: 77
  • Table.JPG
    Table.JPG
    47.6 KB · Views: 76

theDBguy

I’m here to help
Staff member
Local time
Today, 12:10
Joined
Oct 29, 2018
Messages
21,467
Hi. Try declaring their data types in the PARAMETERS clause. Just a thought...
 

plog

Banishment Pending
Local time
Today, 14:10
Joined
May 11, 2011
Messages
11,645
You can't calculate and reference a field in the same query.

SumOfTotal_Paid_USD and SumOfNumber_Boxes do not exist until that query is run, therefore you can't use them in Expr1 of the same query to calculate a further value.

2 options:

1. Remove Expr1 from that query. Save that query as 'sub1'. Create a new query based on sub1 where you will be able to use the Expr1 calculation.

2. Use algebraic replacement to calculate Expr1---
Expr1: SUM(Total_Paid_USD) / SUM(Number_Boxes)
 

Users who are viewing this thread

Top Bottom