Error - is not a recognized function name.

From: HTH (anonymous_at_discussions.microsoft.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 12:19:44 -0700

add dbo. to the function call in your select
>-----Original Message-----
>Error ('long_to_number' is not a recognized function
name.)
>
>
>
>See error part function
>
>
>
>
>
>create function long_to_number (@in_column varchar,
>
> @in_table_name varchar,
>
> @in_pkcolumn varchar)
>
>returns int
>
>as
>
>begin
>
> declare @v_text varchar(4000)
>
> declare @v_sql_cur int
>
> declare @v_pknmcol varchar(2000)
>
> declare @v_contpkcol varchar(2000)
>
>
>
> select @v_sql_cur = count(*) from
syscolumns c, sysobjects o,
>
> sysindexkeys i,
sysindexes x,
>
> sysobjects si
>
> where i.indid = x.indid
>
> and o.id = x.id
>
> and i.colid = c.colid
>
> and i.id = o.id
>
> and o.id = c.id
>
> and o.xtype = 'U'
>
> and o.name = @in_table_name
>
> and x.name = si.name
>
> and si.xtype = 'PK'
>
>
>
>
>
> return (@v_sql_cur)
>
>end
>
>go
>
>select long_to_number
('PARA_TX_VALOR','SGI_PARAMETRO','PARA_ID_PARAMETRO')
>
> FROM
>
> SGI_PARAMETRO
>
> where
>
> para_id_parametro = 1
>
>go
>
>
>
>This function return number of columns PK of a table
espcified.
>
>
>
>
>
>What resolve at problem?
>
>
>
>Thanks
>
>Danilo Prates
>.
>



Relevant Pages

  • DBCC
    ... DBCC results for 'sysobjects'. ... DBCC results for 'sysindexes'. ... There are 5613 rows in 91 pages for object 'syscolumns'. ...
    (microsoft.public.sqlserver.server)
  • Re: DBCC
    ... DBCC results for 'sysobjects'. ... DBCC results for 'sysindexes'. ... There are 5613 rows in 91 pages for object 'syscolumns'. ...
    (microsoft.public.sqlserver.server)
  • Re: Index Creation Date
    ... Mistake, mistake.. ... >>Join sysindexes and sysobjects and use the crdate in the ... Read details on SQL Server Books Online. ...
    (microsoft.public.sqlserver.security)
  • Re: How Do You Get The Description Property?
    ... Note that you should avoid using sysobjects, syscolumns, systypes etc. ... I plan to add this to another sql statement which uses ...
    (microsoft.public.sqlserver.server)
  • Re: add column if it does not exist
    ... FROM sysobjects, ... ALTER TABLE Person ... Your solution would be to use dynamic SQL for the DDL. ...
    (comp.databases.sybase)