Forum Replies Created

Viewing 15 posts - 5,356 through 5,370 (of 13,460 total)

  • RE: Is there a way to generate an insert stored procedure

    A Crud generator simply creates some procedures for you (for Create Read Update Delete:CRUD) based on a template and might assume one row inserts or updates for example.

    In a perfect...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Script to remove login which is mapped to several databases

    something like this should be pretty close:

    if you cannot drop a database user because it is the object owner, this would rroll it back so you can fix that first.

    SET...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Is there a way to generate an insert stored procedure

    and another way:

    download and install the SSMS add-on Called SSMS Tools Pack:

    http://www.ssmstoolspack.com/

    that adds a CRUD generator to the right click of any table, which is exactly what you were after:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Adding AD group to a db role

    the syntax is like this, is this what you were after?

    EXEC sp_addrolemember N'db_datareader', N'MyDomain\NewADGroup'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: BetterWay to write this proc

    if you want everything previous, then wouldn't it simply be less than or euql to @param?

    create proc somename

    (@paramname int

    )

    as

    begin

    select what ever

    from some table

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: What does this code do?

    left inner join? no such animal exists in SQL, so that's probably not what you meant. it's either a left outer outer or an inner join

    whatever your code...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Grant access to login to run bunch of SP

    it depends.

    if the user is going to get access to ALL stored procedures no matter what, it's a single command.

    if it is a group of specific procedures, then it's...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Adding values for the extended properties if not present

    like i said, your IF EXISTS query was not quite right.

    this works:

    --testing on an object that exists in my database:

    EXEC TestAddExtendedProperties 'Procedure', 'sp_find','dbo','Database API'

    EXEC TestAddExtendedProperties 'Procedure', 'sp_find','dbo','Apples'

    ALTER PROCEDURE [dbo].[TESTADDEXTENDEDPROPERTIES] (

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Adding values for the extended properties if not present

    the EXISTS command you are using now is checking for the specific values as well, , i think what you want to do is to simply check if the Extended...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: BCP when a NTEXT column contains carriage return

    you are using a format file out of habit, is that it?

    can you run the same command without the format file?

    ie

    bcp egarchivedb.dbo.egpl_casemgmt_activity in R:\ArchivePurge\BCP_Mortgage_email_bodies.txt -T -S xxxxxxxxxxxxxxx\INST1,1433 -t"[||]" -r"[~~]"...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: BCP when a NTEXT column contains carriage return

    weird that you are getting no rows; my example is syntactically correct and runs fine for me.

    can you paste your exact bcp commnad you are using?

    did you try via...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Adding values for the extended properties if not present

    i thought you had this solved.

    from your previous thread, you said the values were blank and the ned user is oing to update them if desired.

    in that case, it's going...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: any way to determine when a GRANT was done...

    john.p.lantz (6/18/2012)


    Thanks - wonder why this isn't tracked in the catalog. We are going to implement some triggers to capture thi going forward.

    there's a LOT of things that could...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trigger to Prevent Insert,update,delete on whole database for Users

    These lotsnof examples of logon triggers trying to prevent any access at all if they user tries to connect with ssms/access/excel.

    Any logom trigger that tries to block bases on...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trigger to Prevent Insert,update,delete on whole database for Users

    you do not have create a seperate group in Active directory.

    go a head and create a role that has db_denydatawriter as Gail suggested.

    roles in SQL Server are not an Either...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 5,356 through 5,370 (of 13,460 total)