This is a pretty simple question that I haven't been able to find an answer for. Is it possible to have two separate SELECT commands (from the same table) in the same SqlDataSource command to populate two different cells in a given GridView?

I haven't been able to find current information so far.

::EDIT::

The challenge is that I'm attempting to manupulate one cell with a COUNT command and the second cell with a numerical grand total from the same information.

有帮助吗?

解决方案

You can Combine results from two separate SELECT Statements by doing something like this..

SELECT X.A , Y.B
FROM (SELECT Column1 AS A FROM TableName) X, (SELECT Column2 AS B FROM TableName) Y
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top