Reply to Re: my new function not found

Your name:

Reply:


Posted by Mike Epprecht \(SQL MVP\) on 10/03/05 16:21

Object Owner...Object Owner

CREATE FUNCTION dbo.encrypt_pair (@data VARCHAR(14) , @key char(30) )
RETURNS VARCHAR (60) AS
BEGIN
DECLARE @encryptedvars VARCHAR(60)
EXEC master..xp_aes_encrypt @data,@key,@encryptedvars OUTPUT
RETURN @encryptedvars
END


select student_id, student_ssn,
dbo.encrypt_pair(student_ssn,'00000000000000000000000000000000') from
student_ssn


--
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"rcamarda" <rcamarda@cablespeed.com> wrote in message
news:1128344611.711934.195110@g43g2000cwa.googlegroups.com...
>I issue this command in QA:
> CREATE FUNCTION encrypt_pair (@data VARCHAR(14) , @key char(30) )
> RETURNS VARCHAR (60) AS
> BEGIN
> DECLARE @encryptedvars VARCHAR(60)
> EXEC master..xp_aes_encrypt @data,@key,@encryptedvars OUTPUT
> RETURN @encryptedvars
> END
>
> If I run it again, I get an error that it already exists (duh).
> Next I run:
>
> select student_id, student_ssn,
> encrypt_pair(student_ssn,'00000000000000000000000000000000') from
> student_ssn
>
> and I get the error:
> Server: Msg 195, Level 15, State 10, Line 1
> 'encrypt_pair' is not a recognized function name.
> I don't get whats wrong!
> Thanks
> Rob
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация