Showing posts with label correctly. Show all posts
Showing posts with label correctly. Show all posts

Friday, March 23, 2012

SCRIPT TO ALTER for functions in a SQL 2000

I installed SQL Server Management Express and try to access to a SQL Server 2000 remotly.

I connected correctly but when I try to alter an existing function, I get the following error message:

TITLE: Microsoft SQL Server Management Studio Express

Property AnsiNullsStatus is not available for UserDefinedFunction '[dbo].[functionName]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Express.Smo)

Note that functionName contain the correct function name.

Can someone confirm me that SQL Server Managmt Express can not alter function from previous SQL version or may I need to set some parameters on Server 2000.

Thanks

I'm moving this to the Tools forum.

Mike

sql

Tuesday, March 20, 2012

script problem with POWER(x,y)

hi,

i can't see why the following field is not working correctly, ie: it's always coming up with 0:

((POWER((1+((((((POWER((1+(dbo_table1.APR/100)),(1/12)))-1))*12))/12)), dbo_table1.FREQUENCY)-1)*(12/dbo_table1.FREQUENCY))*100 AS YIELD

breaking the code down to a smaller formula it does work.

it looks like i can't have more calculations/references inside a POWER(x,y) function.

any comments would be appreciated.

thank you

The problem is integer math. This formula can never return anything other than zero because (1/12) = 0. Guessing at datatypes:

declare @.apr decimal (4,2)
declare @.frequency decimal(3,0)

set @.apr = 6.5
set @.frequency = 24

select ((POWER((1+((((((POWER((1+(@.apr/100)),(1.0/12.0)))-1))*12))/12)), @.frequency)-1)*(12/@.frequency))*100

This now returns:

6.711700

Hope this helps.

|||

thank you very much.

it has solved the issue

regards

Monday, March 12, 2012

script for generating service user account?

Hi,
Is there a script available to create the sql server service account and set
the file system and registry permissions correctly? I would like to run my
server with minimum access rights and I would like to save some time if
someone has done a nice script for creating the account and/or setting the
permissions in a way that it can easily be reused.
Svenhave a look at this
http://support.microsoft.com/kb/283811/en-us
this details what you need to script.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Matzen" <Matzen@.discussions.microsoft.com> wrote in message
news:AA0493D1-A1F6-43F3-9D34-4A590FD410F8@.microsoft.com...
> Hi,
> Is there a script available to create the sql server service account and
> set
> the file system and registry permissions correctly? I would like to run my
> server with minimum access rights and I would like to save some time if
> someone has done a nice script for creating the account and/or setting the
> permissions in a way that it can easily be reused.
> Sven

script for generating service user account?

Hi,
Is there a script available to create the sql server service account and set
the file system and registry permissions correctly? I would like to run my
server with minimum access rights and I would like to save some time if
someone has done a nice script for creating the account and/or setting the
permissions in a way that it can easily be reused.
Svenhave a look at this
http://support.microsoft.com/kb/283811/en-us
this details what you need to script.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Matzen" <Matzen@.discussions.microsoft.com> wrote in message
news:AA0493D1-A1F6-43F3-9D34-4A590FD410F8@.microsoft.com...
> Hi,
> Is there a script available to create the sql server service account and
> set
> the file system and registry permissions correctly? I would like to run my
> server with minimum access rights and I would like to save some time if
> someone has done a nice script for creating the account and/or setting the
> permissions in a way that it can easily be reused.
> Sven