Tipo de dato

25/07/2008 - 21:04 por German Lugo | Informe spam
Apreciados amigos:

Estoy creando una función que recibe cualquier tipo de dato. Como configuro
el parametro para que pueda recibir datos numéricos. datetime, etc.


Best regards,

GERMAN LUGO
PROVENET LTDA. CI
ADDRESS CALLE 13 No. 58-42
BOGOTA D.C. - COLOMBIA
PHONE : 57 1 4145832
PHONEFAX : 57 1 4467880
YAHOOMAIL :german_provenetci@yahoo.com
WEBSITE :www.provenetci.com
 

Leer las respuestas

#1 German Lugo
26/07/2008 - 18:37 | Informe spam
Apreciado Alejandro:

Perfecto. Muchas gracias


Best regards,

GERMAN LUGO
PROVENET LTDA. CI
ADDRESS CALLE 13 No. 58-42
BOGOTA D.C. - COLOMBIA
PHONE : 57 1 4145832
PHONEFAX : 57 1 4467880
YAHOOMAIL :
WEBSITE :www.provenetci.com


"Alejandro Mesa" escribió en el
mensaje news:
German Lugo,

Trata con sql_variant.

Ejemplo:

create function dbo.ufn_f1 (
@p1 sql_variant
)
returns table
as
return
(
select @p1 as c1, sql_variant_property(@p1, 'BaseType') as [BaseType]
)
go

select * from dbo.ufn_f1(1)
union all
select * from dbo.ufn_f1('1')
union all
select * from dbo.ufn_f1(cast(1 as money))
go

drop function dbo.ufn_f1
go


AMB


"German Lugo" wrote:

Apreciados amigos:

Estoy creando una función que recibe cualquier tipo de dato. Como
configuro
el parametro para que pueda recibir datos numéricos. datetime, etc.


Best regards,

GERMAN LUGO
PROVENET LTDA. CI
ADDRESS CALLE 13 No. 58-42
BOGOTA D.C. - COLOMBIA
PHONE : 57 1 4145832
PHONEFAX : 57 1 4467880
YAHOOMAIL :
WEBSITE :www.provenetci.com




Preguntas similares