Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 error: 'varchar' is not a recognized built-in func
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kirank
Yak Posting Veteran

USA
58 Posts

Posted - 09/10/2011 :  13:26:14  Show Profile  Visit kirank's Homepage  Reply with Quote
hi here is my Sp
and i m getting this Error:
Msg 195, Level 15, State 10, Procedure sp_GetProductsPaging, Line 17
'varchar' is not a recognized built-in function name.

alter procedure [dbo].[sp_GetProductsPaging]
(
@PageNo int ,
@catid int ,
@subcatid int,
@mSortBy varchar(50)
)
as
begin

declare @PageSize as int
set @PageSize = 16

declare @tempTbl table(
catid as int, subcatid as int,prod_id as int,
productname as varchar(100) ,imagename as varchar(100),unitprice as int,listprice as int,onsale as varchar(100),
hotprod as varchar(100), prodDescription as varchar(100), caption as varchar(100), title as varchar(100) ,
prodfilename as varchar(100),rating as int,psubtype as varchar(100),sizelabel as varchar(100))

insert into @tempTbl
exec [sp_productdetails] @catid,@subcatid,@mSortBy

select * from (select ROW_NUMBER() over (
order by @mSortBy desc) as Row, * from @tempTbl)a
Where
Row > = ((@PageNo * @PageSize) +1 ) And Row <= ((@PageNo * @pageSize) + @PageSize)

end

on this line
productname as varchar(100) ,imagename as varchar(100),unitprice as int,listprice as int,onsale as varchar(100),

can u plz help me


http://webdevlopementhelp.blogspot.com

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 09/10/2011 :  13:28:26  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
You don't use AS when defining a table.

declare @tempTbl table(
catid int,
subcatid int
....
)

--
Gail Shaw
SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000