Hey Peter great idea never thought of that, how ever I am getting an 
error when ran through the SQL Query Anyalzer:

The following error occured while executing the query:
Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value ')' to a column of data 
type int.

I think this has something to do with the quotes.

Tony...



--- In [email protected], "Peter Brunone" 
<[EMAIL PROTECTED]> wrote:
> Hi Tony,
> 
> ���Just append the fields together in your query, provide an alias 
for the resulting field, and specify that alias name as your 
DataTextField.� Observe:
> 
> select 
> dbo.members.ID +
> ' (' + count(dbo.members.ID) + ')' as userscount,
> dbo.province.region from dbo.members, 
> dbo.province WHERE (dbo.members.ID = dbo.province.ID) group by 
> dbo.members.ID, dbo.province.region Order by dbo.province.region 
ASC 
> 
> and in your DDL:
> 
> DataTextField="userscount"
> 
> Cheers,
> 
> Peter
> 
>  From: "Tony Trapp" [EMAIL PROTECTED]
> 
> hey guys this is the deal, I a database that has two tables in it.
> 
> One for members and one for regions, both have ID's in my select 
> statement I have joined these two tables and also counted how many 
> members are in the members table with in the join.
> 
> example:
> 
> -------------------------------------------------
> 
> select count(dbo.members.ID)as 
> userscount,dbo.members.ID,dbo.province.region from dbo.members, 
> dbo.province WHERE (dbo.members.ID = dbo.province.ID) group by 
> dbo.members.ID, dbo.province.region Order by dbo.province.region ASC
> 
> -------------------------------------------------
> 
> end example
> 
> Now I have 3 colums to work with, what I want to do in the drop 
> downlist text is show the region and count,
> 
> Example: California (10)
> 
> and for the value
> 
> Example: 21
> 
> puting it all together would be like this in html
> 
> language="javascript" id="memregs"> California (10) 
> 
> My question is how can I do this?
> 
> The dropdownlist only allows for one paremetor to be put in for the 
> text value.
> 
> If any one know of a tutorial or example that would really help as 
> well.
> 
> Tony...
> 
> 
> 
> [Non-text portions of this message have been removed]





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to