Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why will this query work and not this one ?

Status
Not open for further replies.

beetlebailey

Programmer
Jan 4, 2005
51
US
I am using FrontPage 2002 to query data from MSSql server 2000 by inserting database results in my web page.

This query works in both FrontPage and Query Analyzer but returns a value without comma seperators like: 1234567

select count(partno) as records from testers.

This query works in Query Analyzer and returns a value with comma seperators like: 1,234,567 but does not work in FrontPage.

declare @i money
set @i = (select count(partno) from testers)
select left(convert(varchar(20),@i,1),len(convert(varchar(20),@i,1))-3) as records

Any ideas on the problem ? Thank You.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top