Home > database >  Ask: this sentence Order by don't come into effect?
Ask: this sentence Order by don't come into effect?

Time:10-11

Environment: ACCESS2010 links use SQL server 2008, wdangandrd is a link table,
Problem statement:
SELECT
Wdangandrd. [index] AS A,
Wdangandrd Wloanunit AS B,
Wdangandrd Wname AS C,
Wdangandrd Wloanvalue AS D,
Wdangandrd Wstartdate AS E,
Wdangandrd Wenddate AS F,
Wdangandrd Wdanbaofs AS G,
Wdangandrd Wmanager AS H,
Wdangandrd. Wboxindex AS I,
Wdangandrd Wheshu AS J,
Wdangandrd Wbenshu AS K,
Wdangandrd Wyeshu AS L,
Wdangandrd Wtjsj AS M,
Wdangandrd Wtjr AS N,
"" AS O,
"" AS P
The FROM Wdangandrd
WHERE
Wdangandrd. [index] & gt; Liststartindex ()
And wdangandrd. [index] <=(select Max ([index]) from wdangandrd)
And userid=SQLbianliang ()
The ORDER BY Wdangandrd. Wboxindex ASC


Among them:
Liststartindex (), SQLbianliang function is given by the () is a program run,
Question:
When they failed to call this the query statements Wdangandrd. Wboxindex fields to sort, try to change the where clause for simple userid="aaa", for example, statements can realize sorting,
Ask: what is going wrong, how should change? Thank you very much!

CodePudding user response:

The great god, appear!

CodePudding user response:

SQLbianliang () the return type of the string? What is the return type of liststartindex ()?
Use Like try it, see this post: https://support.microsoft.com/zh-cn/office/access-sql%ef%bc%9awhere- b28 bbc13 - debc clause - 753-4 - b527-42 eb7885c862? UI=useful - cn& Rs=useful - cn& AD=cn
  • Related