Forum Replies Created

Viewing 15 posts - 8,986 through 9,000 (of 13,460 total)

  • RE: Msg 8101 With trigger

    your table dbo.deleted_table, has an identity column in it, don't stick a value in it .

    actually name each and every column that SHOULD receive a value from the insert instead.

    INSERT...

    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: Preventing a Stored Procedure to run simultaneously

    well, obviously it would be betrter to redesign the proc so it can run concurrently, but that's a future enhancement.

    I think you are right, you'll have to use some sort...

    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: How to insert IP Address in data table dynamically

    ipconfig will return information about the SERVER's NIC card...it would not have any information about the connecting users. that code might seem to work if your SQL server is also...

    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: creating table using linked server

    you have to use the EXECUTE AT [LinkedServerName] syntax to do that; 4 part names are DML only, so you cna insert/update/delete to a 4 part named object like MyLinkedServer.DatabaseName.Schema.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: trigger ddl export to file/grid

    this will give you the trigger name and the definition for everything in a given database:

    --SQL 2000:

    select

    sysobjects.name,

    syscomments.text

    from syscomments

    inner join sysobjects 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: Simple problem - drop database

    probably the easiest way is to to set it to single_user:

    alter database emptyexample set single_user with rollback immediate

    drop database emptyexample

    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 Prob.

    well, it's pretty straight forward to do in a trigger, but i would just make the [edit] column a calculated field instead and get rid of the trigger idea altogether.

    ...

    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: 8,000 charachter limit

    i think there's an issue where if you concatenate a varchar(max) with a varchar(somethingless) it will concat to a varchar(8000)

    i think you have to explicitly use all (max) variables, or...

    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: sp_executesql won't return the expected result. Any help please?

    look at what you pasted from BOL: it is NOT doing EXECUTE @SomeVariable = sp_executesql

    that is where your error lies. you want to test the value of the OUTPUT...

    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: sp_executesql won't return the expected result. Any help please?

    you are both asigning the variable to the true/false results, and expecting it to have a parameters OUTPUT; so for a picosecond the @sendmail has a value returned from the...

    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: Creating USER Group in SQL Server 2005

    what the original poster calls a "group" is what books on line calls a "role". you typically create a role and add the expected rights tot eh role, then add...

    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: How to grab the T-sql statement that fired a trigger??

    Brian I have this saved in my snippets as the solution for getting most of the command(DBCC inputbuffer is limited to 256 chars)

    this worked at the end of a long...

    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: How to add column, update data, and alter in if statement?

    this seems to work for me...

    create table old_table(columnOne varchar(30),existing_col int )

    insert into old_table

    SELECT '119',119 union all

    SELECT '129',129 union all

    SELECT '125',125 union all

    select '100',100

    IF NOT EXISTS ( SELECT * FROM...

    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: How to add column, update data, and alter in if statement?

    I think you can also switch to dynamic SQL; in that case the ALTER would be fully committed for the next state,ment.

    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: Registering sqlserver instance

    it all comes down to connectivity.

    for example, if a server is exposed to the internet, you can connect by IPAddress-comma-port instead of machine name: ie 209.191.122.70,1433 and then use a...

    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 - 8,986 through 9,000 (of 13,460 total)