Error - is not a recognized function name.
From: HTH (anonymous_at_discussions.microsoft.com)
Date: 09/16/04
- Next message: oj: "Re: Assign return value of stored proc to a variable"
- Previous message: Anith Sen: "Re: Can someone explain this?"
- In reply to: Danilo: "Error - is not a recognized function name."
- Messages sorted by: [ date ] [ thread ]
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
>.
>
- Next message: oj: "Re: Assign return value of stored proc to a variable"
- Previous message: Anith Sen: "Re: Can someone explain this?"
- In reply to: Danilo: "Error - is not a recognized function name."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|