N
news
Hi,
I'm a bit of an access newbie, so sorry if this question is a bit daft
but I couldn't find the answer in any FAQs.
When I have a query like this:
SELECT [fdTestThis] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis
FROM tbMyTable
ORDER BY [fdTestThis];
it prompts me to enter a parameter value for fdTestThis, but when I
remove the sort:
SELECT [fdTestThis] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis
FROM tbMyTable;
it doesn't.
In this simple example, I could replace the first line in the first
example with
SELECT [fdMonth] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis (and
also in the ORDER BY as well)
to fix the prompt. However, in the "real" example, the
"tbMyTable.fdMonth AS fdTestThis" is actually "<a long calculation> AS
fdTestThis" which means I would then have to change the first line to:
SELECT <a long calculation> AS fdSortThis, "<a long calculation> AS
fdTestThis
OK this would work, but then I have my long calculation in two places
in the query which seems a bit inefficient, which is why I was trying
to sort by the bit after the "AS". Can anyone help please?
I hope that makes sense: I'm not very good at describing the problem,
sorry!
I'm a bit of an access newbie, so sorry if this question is a bit daft
but I couldn't find the answer in any FAQs.
When I have a query like this:
SELECT [fdTestThis] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis
FROM tbMyTable
ORDER BY [fdTestThis];
it prompts me to enter a parameter value for fdTestThis, but when I
remove the sort:
SELECT [fdTestThis] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis
FROM tbMyTable;
it doesn't.
In this simple example, I could replace the first line in the first
example with
SELECT [fdMonth] AS fdSortThis, tbMyTable.fdMonth AS fdTestThis (and
also in the ORDER BY as well)
to fix the prompt. However, in the "real" example, the
"tbMyTable.fdMonth AS fdTestThis" is actually "<a long calculation> AS
fdTestThis" which means I would then have to change the first line to:
SELECT <a long calculation> AS fdSortThis, "<a long calculation> AS
fdTestThis
OK this would work, but then I have my long calculation in two places
in the query which seems a bit inefficient, which is why I was trying
to sort by the bit after the "AS". Can anyone help please?
I hope that makes sense: I'm not very good at describing the problem,
sorry!