Help On Creating A User Function.

Jul 25, 2005

When I declare a cursor,I use a variable to replace the sql statement:
DECLARE rs CURSOR LOCAL FAST_FORWARD FOR
@sqlPlan
But it is not true.Who can correct for me.

Another question is :
How to execute a sql statement state by a variable "@sqlPlan" and
insert the result to a table "@FeatRequestStatus"?

I am a new hand of sql programming.Thank you very much for your help

View 2 Replies


ADVERTISEMENT

Creating A New User For Sp Execution Say Sa (to Whom I Am In Need Of Creating Under My User Defined Db )

Jul 11, 2007

I am in need of creating a new user for stored procedures execution say sa (to whom i am in need of creating under my user defined db)

View 1 Replies View Related

Help Convert MS Access Function To MS SQL User Defined Function

Aug 1, 2005

I have this function in access I need to be able to use in ms sql.  Having problems trying to get it to work.  The function gets rid of the leading zeros if the field being past dosn't have any non number characters.For example:TrimZero("000000001023") > "1023"TrimZero("E1025") > "E1025"TrimZero("000000021021") > "21021"TrimZero("R5545") > "R5545"Here is the function that works in access:Public Function TrimZero(strField As Variant) As String   Dim strReturn As String   If IsNull(strField) = True Then      strReturn = ""   Else      strReturn = strField      Do While Left(strReturn, 1) = "0"         strReturn = Mid(strReturn, 2)      Loop   End If  TrimZero = strReturnEnd Function

View 3 Replies View Related

Analysis :: Creating User Who Can Only Do User Management Activities?

Nov 25, 2015

I would like to limit the role of an user In Visual Studio only to assign roles to other users for the cubes. Other than that the user should not be able to create / delete the exisiting cubes or dimensions.

View 2 Replies View Related

Using RAND Function In User Defined Function?

Mar 22, 2006

Got some errors on this one...

Is Rand function cannot be used in the User Defined function?
Thanks.

View 1 Replies View Related

Error While Creating Inline Function - CREATE FUNCTION Failed Because A Column Name Is Not Specified For Column 1.

Apr 3, 2007



Hi,



I am trying to create a inline function which is listed below.



USE [Northwind]

SET ANSI_NULLS ON

GO

CREATE FUNCTION newIdentity()

RETURNS TABLE

AS

RETURN

(SELECT ident_current('orders'))

GO



while executing this function in sql server 2005 my get this error

CREATE FUNCTION failed because a column name is not specified for column 1.



Pleae help me to fix this error



thanks

Purnima

View 3 Replies View Related

Creating Function

Jan 17, 2007

Am abit new to SQL Server Programming and I have an issue which I need Assistance.

I have a table with the following Colunms
Inv_Number
ItemCode1
ItemCode2
ItemCode3
ItemCode4
ItemCode5
this table as data which i want to put to another table with the following Columns
Invoice_Number
ItemCode
Amount

What i mean here is that Invoice Items were static and were about five and the new programs am designing will have more item codes.

View 4 Replies View Related

Creating A Function

Mar 19, 2007

Create a Function call InitCap
accepts 1 parameter of type varchar
returns a varchar
It should only capitalize the first letter of the string passed to it.
Items to watch out for.
a-z not starting the string
The 1st letter is already capitalized

This problems deals with ASCII characters, just wanted to get some insight here.

View 3 Replies View Related

Creating A SQLExecute Function In C#

Nov 28, 2007

Hi im trying to create a function called SQLExecute that takes an SQL query, executes it and returns the resultant dataset in dsetResponse and if an error in strError, however i am unsure if whether im on the right track or not, where would i put the sql query and what else needs to be done, my code is as follows;public static DataSet SQLExecute(string strSQL, string strError)
{
DataSet dsetResponse = new DataSet();
try
{using (SqlConnection conn = new SqlConnection(DHOC.clsDHOC.GetConnString()))
{SqlCommand cmd = new SqlCommand();cmd.CommandType = CommandType.Text;
}
}catch (ThreadAbortException thEx)
{throw;
}catch (Exception ex)
{
string strError
}return dsetResponse;
}

View 3 Replies View Related

Error Creating CLR Function

Sep 6, 2005

Hi,
When I try to create a CLR function in SQL 2005 (June CTP) I get the following error:
Msg 6505, Level 16, State 1, Procedure Extenso, Line 1Could not find Type 'Extenso' in assembly 'ExtensoNET'.
The assembly registers successfully, with no errors.
I use the following command to create the function:CREATE FUNCTION Extenso (@Valor float)RETURNS VARCHAR(255)AS EXTERNAL NAME ExtensoNET.Extenso.EscreveExtensoGO
The function's code is the following:
using System;using System.Collections.Generic;using System.Text;using Microsoft.SqlServer.Server;using System.Data.SqlClient;
namespace ExtensoNET{ public class Extenso {  [SqlFunction(DataAccess = DataAccessKind.Read)]  public static string EscreveExtenso(double? nValor)  {
  //Valida Argumento  if (nValor==null || nValor <= 0 || nValor > 999999999.99)   return "";
  //Variáveis  int nTamanho;  string cValor, cParte, cFinal;  string[] aGrupo = { "", "", "", "", "" };  string[] aTexto = { "", "", "", "", "" };  .  .  .  }
  return cFinal;
  } }}
Thanks in advance,
Anderson

View 1 Replies View Related

Stuck Creating A Function

Feb 17, 2008

Alright, I'll write this again. The first try didn't go so well. I am learning SQL Server from an online tutorial. Maybe there are a lot who do that, maybe not, but it's a good tutorial. There are projects to work on at the end of each section, and they involve more than just regurgitating everything I just read. They even make me figure out stuff that wasn't covered in the section (which is probably a mistake, but it makes the learning more interesting and I like it). The problem is that I've hit one of those places and I can't figure it out. The last project for this section is to write a function that calculates and displays the diameter of the base, the circumference of the base, the base area, the side area, the total area, and the volume, given the radius and the height of a cylinder. Now I had to do the same thing as a query for the previous section, and hunting down all the formulae involved was more time-consuming than writing the thing, but I'm stumped here. Every example and work-along project was, for lack of a better description, "one function, one result". So how do I get a function to return multiple results? If I've posted this in the wrong place, someone please let me know where I might find the information I need. For those of you who may see this and be stunned that I haven't figured out the obvious, remember you were new once too. Thanks in advance.

Now that I've seen some of the other posts, maybe I should clarify. Here's what I had from the last project.


declare @Radius float(10),
@BaseDiameter float(10),
@BaseCircumference float(10),
@BaseArea float(10),
@Height float(10),
@SurfaceArea float(10),
@TotalArea float(10),
@Volume float(10)
set @Radius = 19.1
set @BaseDiameter = @Radius * 2
set @BaseCircumference = @BaseDiameter * PI()
set @BaseArea = power(@Radius,2) * PI()
set @Height = 16.27
set @SurfaceArea = 2 * (pi() * @Radius * @Height)
set @TotalArea = 2 * (pi() * @Radius * @Height) + 2 * (power(@Radius,2) * PI())
set @Volume = (power(@Radius,2) * pi()) * @Height
select @Radius as [Base Radius],
@BaseDiameter as [Base Diameter],
@BaseArea as [Base Area],
@Height as Height,
@SurfaceArea as [Side Area],
@TotalArea as [Total Area],
@Volume as Volume
go

So how do I make a function that does the same thing?

Schiz

View 3 Replies View Related

Problems Creating TVF Function

Aug 6, 2007

I had succesfully created a CLR function which was fully operational on the development server. Today the powers that be decided to do a full restore from the Production server because the wanted the most recent data on the server. Since our code has not been deployed to production I went through the exercise of redeploying everything to the server and all goes well until I try to create the function:





Code Snippet
CREATE FUNCTION f_GetGroupMembership(@providerKey nvarchar(200), @connection nvarchar(1000))
RETURNS TABLE (groupID uniqueidentifier, groupName nvarchar(100), groupType nvarchar(25))
AS
EXTERNAL NAME NavigatorSecurity.groups.GetGroupsForUser






This returns an error:


Msg 10305, Level 16, State 1, Procedure f_GetGroupMembership, Line 1

The Init method for a CLR table-valued function must be annotated with SqlFunctionAttribute.

Now remember this CLR was working correctly previous to the restore from backup. But just in case I got a case of dumb*** I checked my clr code anyhow here it is:




Code Snippet
using System;
using System.Data;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
using System.DirectoryServices;
using System.Collections;
public class GroupMembership
{

[SqlFunctionAttribute(FillRowMethodName = "FillGroupRow")]
public static IEnumerable GetGroupsForUser(String ProviderKey, String Connection)
{
return groups.GetGroupsForUser(ProviderKey, Connection);
}

public static void FillGroupRow(Object obj, out SqlGuid guid, out SqlString name, out SqlString type)
{
//cast the enumerator passed in
group grp = (group)obj;
//create output parameters
guid = new SqlGuid(grp.guid);
name = new SqlString(grp.Name);
type = new SqlString(grp.applicationData);
}
}






Can anyone tell me why this is happening? How can I overcome this problem?

Help will be highly appreciated.

View 5 Replies View Related

Problem Creating A Function From An Assembly

Jan 5, 2007

I have compiled a dll with the following code:

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Server
Imports System.Data.SqlTypes

Public Class SICTrans

Public Shared Function TransSIC(ByVal inpSIC As String) As String
'Dim conn As SqlConnection = New SqlConnection("context connection=true")
Dim NewSIC, TempSIC, tempFSIC As String

If Len(NZ(inpSIC)) > 0 Then
TempSIC = NZ(inpSIC)

If Len(TempSIC) < 5 Then TempSIC = Left("00000", 5 - Len(TempSIC))

tempFSIC = Left(TempSIC, 2) + "." + Mid(TempSIC, 3, 2)

If Val(Right(TempSIC, 1)) > 0 Then

tempFSIC = tempFSIC + "/" + Right(TempSIC, 1)
End If
End If

NewSIC = tempFSIC

TransSIC = NewSIC

End Function
Public Shared Function NZ(ByVal input As String) As String
If Not (input Is Nothing) Then
Return input
Exit Function
End If
Return String.Empty

End Function
End Class

Which compiles fine...

i then use the following code to create the assembly in SQL which is fine:

USE NARD
GO
CREATE ASSEMBLY SICCodeTrans
FROM 'c:SICCodeTrans.dll'
WITH PERMISSION_SET = SAFE
GO

but when i goto create the function with the following code it wont have it!

CREATE FUNCTION TransSICCode(@inpSIC varchar)
RETURNS varchar
AS EXTERNAL NAME
SICCodeTrans.SICTrans.TransSIC
GO

It gives me the following error message

Msg 6505, Level 16, State 1, Procedure TransSICCode, Line 1
Could not find Type 'SICTrans' in assembly 'SICCodeTrans'.

Any ideas??????????

Thanks

Marek Kluczynski

View 6 Replies View Related

Creating FUNCTION Append Rows At The End

Feb 1, 2008

SQL Server 2000 Standard SP4 Build 2187.

When we are creating the function below the compilation process append one row at the end of the function text:




Code Snippet
ALTER FUNCTION [dbo].[FX_LOJA_REPOSICAO] (
@sParametros varchar(8000),
@sFiltroFiliais varchar(8000),
@sFiltroProdutos varchar(8000)
)
RETURNS @RESULT TABLE (
FILIAL VARCHAR(25) COLLATE DATABASE_DEFAULT NOT NULL,
PRODUTO CHAR(12) COLLATE DATABASE_DEFAULT NOT NULL,
COR_PRODUTO CHAR(10) COLLATE DATABASE_DEFAULT NOT NULL,
COD_TIPO SMALLINT NOT NULL,
DESC_TIPO VARCHAR(40) COLLATE DATABASE_DEFAULT,
QTDE AS (T1+T2+T3+T4+T5+T6+T7+T8+T9+T10+T11+T12+T13+T14+T15+T16+T17+T18+T19+T20+T21+T22+T23+T24+
T25+T26+T27+T28+T29+T30+T31+T32+T33+T34+T35+T36+T37+T38+T39+T40+T41+T42+T43+T44+T45+T46+T47+T48),
T1 SMALLINT, T2 SMALLINT, T3 SMALLINT, T4 SMALLINT, T5 SMALLINT, T6 SMALLINT,
T7 SMALLINT, T8 SMALLINT, T9 SMALLINT, T10 SMALLINT,T11 SMALLINT,T12 SMALLINT,
T13 SMALLINT,T14 SMALLINT,T15 SMALLINT,T16 SMALLINT,T17 SMALLINT,T18 SMALLINT,
T19 SMALLINT,T20 SMALLINT,T21 SMALLINT,T22 SMALLINT,T23 SMALLINT,T24 SMALLINT,
T25 SMALLINT,T26 SMALLINT,T27 SMALLINT,T28 SMALLINT,T29 SMALLINT,T30 SMALLINT,
T31 SMALLINT,T32 SMALLINT,T33 SMALLINT,T34 SMALLINT,T35 SMALLINT,T36 SMALLINT,
T37 SMALLINT,T38 SMALLINT,T39 SMALLINT,T40 SMALLINT,T41 SMALLINT,T42 SMALLINT,
T43 SMALLINT,T44 SMALLINT,T45 SMALLINT,T46 SMALLINT,T47 SMALLINT,T48 SMALLINT,
FILIAL_ORIGEM VARCHAR(25) COLLATE DATABASE_DEFAULT,
FILIAL_DESTINO VARCHAR(25) COLLATE DATABASE_DEFAULT,
ORIGEM_DESTINO VARCHAR(25) COLLATE DATABASE_DEFAULT NOT NULL,
PACK VARCHAR(20) COLLATE DATABASE_DEFAULT,
PRIMARY KEY NONCLUSTERED (FILIAL, PRODUTO, COR_PRODUTO, COD_TIPO, ORIGEM_DESTINO) )
AS

...FUNCTION BODY...

RETURN
END







SP_HELPTEXT returns the function text with the row bellow appended:




Code Snippet
...FUNCTION BODY...

RETURN
END

(T1+T2+T3+T4+T5+T6+T7+T8+T9+T10+T11+T12+T13+T14+T15+T16+T17+T18+T19+T20+T21+T22+T23+T24+
T25+T26+T27+T28+T29+T30+T31+T32+T33+T34+T35+T36+T37+T38+T39+T40+T41+T42+T43+T44+T45+T46+T47+T48)






Why this happening....
Any suggestions?

View 1 Replies View Related

Problem Creating Function To Be Schema Independent

Apr 1, 2008

I am writing a SQLServer script that I want to be schema name independent. I mean I know that all users of the script will have the same tables, but not necessarily the same schema name.

When I hard code the script to use the name of my schema, wcadmin, it works OK.

CREATE FUNCTION wcadmin.dectohex(@a numeric)
RETURNS varchar(8)
BEGIN
DECLARE @x varchar(8)
DECLARE @y varchar(1)
DECLARE @z numeric
DECLARE @w numeric

SET @w=@a
SET @x=''

WHILE @w > 0
BEGIN
SET @z = @w % 16;

SET @y= CASE @z
WHEN 10 THEN 'A'
WHEN 11 THEN 'B'
WHEN 12 THEN 'C'
WHEN 13 THEN 'D'
WHEN 14 THEN 'E'
WHEN 15 THEN 'F'
ELSE CAST(@z AS varchar)
END

SET @w = ROUND(@w/16,0,1)
SET @x = @y + @x
END

-- Pads the number with 0s on the left
SET @x = RIGHT(REPLICATE('0',8) + @x ,8)
RETURN @x
END;
GO

select 'WTDOCUMENT' HOLDER,
dm.WTDocumentNumber ITEMNUMBER,
dm.name ITEMNAME,
ad.fileName ContentFilename,
fh.hostName VaultHost,
wcadmin.dectohex(fi.uniqueSequenceNumber) VaultFile,
fm.path VaultPath
from
WTDocument di,
WTDocumentMaster dm,
HolderToContent hc,
ApplicationData ad,
FvItem fi,
FvFolder ff,
FvMount fm,
FvHost fh
where di.idA3masterReference = dm.idA2A2
and fm.idA3A5 = ff.idA2A2
and fm.idA3B5 = fh.idA2A2
and fi.idA3A4 = ff.idA2A2
and ad.idA3A5 = fi.idA2A2
and hc.idA3B5 = ad.idA2A2
and hc.idA3A5 = di.idA2A2

DROP FUNCTION wcadmin.dectohex;
GO

But when I remove my schema name I get the error

'dectohex' is not a recognized built-in function name.

In this case I'm just using :-

CREATE FUNCTION dectohex(@a numeric)
.
.
.
.
select 'WTDOCUMENT' HOLDER,
dm.WTDocumentNumber ITEMNUMBER,
dm.name ITEMNAME,
ad.fileName ContentFilename,
fh.hostName VaultHost,
dectohex(fi.uniqueSequenceNumber) VaultFile,
.
.
.
.
DROP FUNCTION dectohex;

Creating and dropping the function seems to work OK when I drop the schema name, I just can't call it.

I've been trying various permutations of dbo and [dbo] prefixes unsuccessfully.

Any suggestions?

Thanks


David

View 5 Replies View Related

Error While Creating Function On Remote Server

Jun 7, 2008

i have a function
Create Function ReturnAmountB(@CMID int) Returns Decimal
as
BEGIN
declare @Return decimal
select @Return =sum(PD_PaymentAmount) from Payment_Details where
PD_IsRefund=1 and PD_PaymentType=0 and PD_CMID=@CMID
return @Return
END

when i run this on server(remote) this error shows...
Incorrect syntex near 'Function'
Must declare the variable '@CMID'
A RETURN statement with a return value cannot be used in this context

i am not able to understand why this error shows...
Any solution!!!

spandey

View 6 Replies View Related

2005: Creating Aggregate Function From .NET Assembly

Jul 17, 2006

Hello,I am learning SQL Server 2005. I have (correctly) written in .NETassembly DemoSQLServer with aggregate function AvgNoMinMax in classDemo and I have added assembly to database DemoSQLServer. Now I needto create aggregate in SQL Server. I tried this way:CREATE AGGREGATE AvgNoMinMax(@v float) RETURNS float EXTERNAL NAME[DemoSQLServer].[DemoSQLServer.Demo].[AvgNoMinMax]Unfortunately I have error:Incorrect syntax near '.'.I don't know what's wrong. Please help.Thank you very much!/RAM/

View 1 Replies View Related

Creating Sql-clr Function With Void Return Type

Mar 18, 2008



hi to all,
i have written SQL-CLR function using C# which will perform some manupulation and will not not return any value(return type is void)
i am creating sql function using SQL script


CREATE FUNCTION dbo.Amex ()

RETURNS NULL

AS CALLER

WITH EXECUTE

AS

EXTERNAL

NAME [AMEX].[UserDefinedFunctions].[Function1];

GO


but i am getting error.
there is something wrong in my sql syntax..can anybody help me?



when creating funtion having signature


public static void Function1()


i am getting error.......................
Error 1 The method "Function1" in class "UserDefinedFunctions" marked as a user defined function must return a scalar value or ISqlReader. SqlServerProject1

can anybody help me?

thanks in advance

Chetan S. Raut

View 4 Replies View Related

Creating A User By SID

Jan 5, 2008

I am trying to create a database setup script that will work on various OS languages. One of the things the set up script has to do is grant permissions to the NETWORK SERVICE account. This is simple when we are running on the English version of Windows with the command:




Code Block
CREATE USER [NetworkService] WITH LOGIN [NT AUTHORITYNETWORK SERVICE];




Unfortunately, if you run this on a French language version of Windows, the login is called something like [NT AUTORITESERVICE RUSSEAU] or something similar. This causes the script to fail.

I think I should be able to get around this by using the well known SID for this account (S-1-5-20) and SUSER_SNAME() to resolve to the name for the account in the local language.

Here is the code I've written:




Code Block
SET @user = quotename(SUSER_SNAME(0x010100000000000514000000));
SELECT @user;
CREATE USER [NetworkService] FOR LOGIN @user;






Everything seems to be working up to the last line. The SELECT @user line returns [NT AUTHORITYNETWORK SERVICE] on my English language server as expected. Unfortunately, the last line results in a syntax error.

This may be a really dumb question, but I'm not really a DB developer, so I'm stumped. Any ideas on how I could make this work?

Thanks,
Bill

View 4 Replies View Related

Creating User Accounts

Jan 17, 2005

Hi,
how do you create a username and password for a database in SQL.

Thanks

View 3 Replies View Related

Creating User From Application

Feb 16, 2004

I'm trying to create a user from a powerbuilder application through powerscript.
I'm trying to create first the login using sp_addlogin
but I'm getting the following error
[microsoft][odbc for sql server]the procedure sp_addlogin cannot be executed in transaction.

Plz does someone know what should I do?

View 1 Replies View Related

Creating A Read Only User

Oct 10, 2005

I'm not in our IT section but am responsible for the running of a finance application on SQL 2000.

I want a Read only user set-up on the SQL DB so that we can use Crystal and Access to look at the tables.

IT have some concerns with this as they say it by passes all security.

Are they spinning me a line?? Surely read oonly is read only? Can a user be restricted to a specific database as there are a number running on the same server.

Many thanks for any advice comments.

Tony

View 2 Replies View Related

Creating User In SQL Server

Mar 11, 2007

i am a newbie in SQL Server. i want to add a new user to my database, whom i want to grant only insert, update, delete, select commands and some procedures/triggers. i need to log on to the database using that user from my asp.net application. i might have several users to log no to the system and for each user i need a set of tables in the databse. i want to wirte the procedures /triggers once for all the users in the database where they can access. i can write the procs under dbo schema, but i what about the tables?

currently i am using SQL Express to test my database. i have Management Studio Express installed on my PC.

S ]-[ /- | ]-[ /- N

View 2 Replies View Related

Creating User To Own Schemas?

Apr 16, 2007

I have noticed that some folks create a user to own a schema, with both having the same name (ex: userowner = pfm schema = pfm) and others make dbo the owner for all their schemas. From what I can tell, it doesn't really matter; what does matter is if your database users are granted access to the schema. Since most users only have public rights and dbo has database owner rights, is there any particular reasoning to use one scenario over the other?

View 6 Replies View Related

Creating A New SQL User For Aspnetdb Membership Db

Jan 1, 2008

Hello - I am using the generic aspnetdb membership database (aspnet_regsql.exe) which I am currently connecting to as a sysadmin user from my website (via web.config). Before going live with my first website I now want to create a sql user for the website to login with, with the minimum permissions required to run the website - the reason for this is to make the db more secure. 
I have created a new sql user and am now looking at what acces they should have. I am OK giving them the required access to the NEW views, sprocs and tables I have created to link in with the generic aspnetdb database etc... however how do I know what access they require to all the BUILT-IN tables, sprocs, views etc. Also, when I am viewing Securables it also brings up all the MASTER DB sprocs, etc.. - will the user need access to these? Should I add the new user to a database role -  which one? (currently I have not given the new user a database role) This is the first time I will have created a sql user for an asp.net website so any help greatly appreciated.
Cheers
Marco  

View 1 Replies View Related

Problem Creating New User For Database

Nov 30, 2005

hello everybody

I'm trying to create a new user for a database using the enterprise manager but it doesn't ask me for a password

does anybody know why?

thanks for any help.

View 3 Replies View Related

Error Creating User On Database

May 22, 2007

Hi there,



I am setting up a database for the first time using SQL Server Express.



I have managed to create a database and create a table with data etc, all straight forward.



The problem I am having is when I come to creating a user for the database. I have the following users in there already, which I am guessing are put in by default:



dbo

guest

INFORMATION_SCHEMA

sys



When I try creating a new user via this screen I get the following error:



TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Create failed for User 'growstudiouser'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

'growstudio' is not a valid login or you do not have permission. (Microsoft SQL Server, Error: 15007)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15007&LinkId=20476

------------------------------


I was wondering if anybody could advise me as to what I'm doing wrong. I am typing in the name as "growstudiouser" and the login name as "growstudio".



Or am I just using the wrong section to do what I want. I'm trying to create a user so that when the database is built I can connect to it using a username and password that I have created. I'm not sure I'm taking to the correct route as there is no password option anywhere when creating a new user.



Thanks in advance,



Kevin

View 8 Replies View Related

Creating User Instance Of SQL Database

Feb 11, 2008

Hi,

I have installed Microsoft SQL Server 2005 Express Edition with Advanced Services

When I try to create a new DataBase (*.mdf) in Visual Studio 2005, I get an error " Unable to create user instance. This option has been disabled"

How should I overcome this issue?

View 1 Replies View Related

Creating User And Login Problem

Apr 25, 2007

When I try to create user using ent manager in mssql2000 it gives me error that there is already such user.But it actualy doesn't exists.

How to solve this problem?

View 4 Replies View Related

Creating A User Stored Proc

Sep 12, 2006

I'm running mssql 2005. And any stored procedure I create in the master database gets created as system procedures since recently. I have created procs in the master database as user procs previously. As sp_MS_upd_sysobj_category is not supported in mssql 2005, does anyone know why this is happening.. or how I can rectify it??

Thanks

View 7 Replies View Related

User ID Function

Jul 17, 2007

Greetings all

I have a question on using this function to limit the information to an individual. I've used this before on a report so that when an individual logs in he sees only his information. Now for this report I want a supervisor to only see his subordinates. Am I right in my train of thought here? I should be able to establish a relationship between the supervisor_id and the employee to limit the report to only his group?


thanks in advance -- if someone has done something similar to this and can share some specifics that would be great

regards
km

View 2 Replies View Related

Transact SQL :: Creating Comma Separated Value Logic Not Working Inside Function?

Jul 16, 2015

I am need to create comma separated list in sql and I am using below query.

declare @ConcatenatedString NVARCHAR(MAX)
select @ConcatenatedString = COALESCE(@ConcatenatedString + ', ', '') + CAST(rslt.Number AS NVARCHAR)
from
(
select 1 Number
union
select 2 Number
union
select 3 Number
)rslt
select @ConcatenatedString

When I use the above code inside a function, i am not getting desired output.

create function GetConcatenatedValue
AS
(
declare @ConcatenatedString NVARCHAR(MAX)
select @ConcatenatedString = COALESCE(@ConcatenatedString + ', ', '') + CAST(rslt.Number AS NVARCHAR)
from
(
select 1 Number
union
select 2 Number
union
select 3 Number
)rslt
return @ConcatenatedString
)

View 3 Replies View Related

Creating A User With A Login Associated With It In SQL Server 2005

Jun 13, 2008

When creating a user in SQL Server  what is a Schema as opposed to a Role?
 
In the security folder of a database, I also saw the folders "Asymmetric keys", "Certificates", and "symmetric keys".   What are these about?
 
thank you.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved