Forum Replies Created

Viewing 15 posts - 466 through 480 (of 582 total)

  • RE: Insert Into on Linked Server

    you stated in your original post that the user has only write access, that is why I stated it need VIEW DEFINITION.

    It works fine for a user with full...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Create trigger on Insert

    what it does is sets the number to append to the caseid based on the highest number that was already appended plus one.

    set @seq = (select max(substring(caseid,charindex('-',caseid)+1,len(caseid)))+1 from trgi)

    charindex('-',caseid)+1 -...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Create trigger on Insert

    check out the link on how to create triggers. http://msdn.microsoft.com/en-us/library/aa258254(SQL.80).aspx

    here is something to help you get started

    create trigger trig_name

    on table_name

    after insert

    as

    declare @seq varchar(25)

    set @seq = (select max(substring(caseid,charindex('-',caseid)+1,len(caseid)))+1 from trgi)

    update...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: JOIN in Multiple Tables

    check out this quick tutorial on how to do joins. http://www.w3schools.com/sql/sql_join_inner.asp

    should be enough info to get you want you want.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Insert Into on Linked Server

    I think you need the VIEW DEFINITION permission.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Creating new user and then granting access

    I think he means, Why he didn't have to create a database user(DOMAIN\HRO_QA)for the active directory group server login in the database.

    well the answer is the sp_addrolemember proc checks...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Avoid mulitiple join on same table

    Sorry about that, I had created the example on a 2008 instance. And this is the result I want, either one code but not another or no code at all....

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Getting DB roles from SQL2000 and 2005

    You could just use sysusers view in both 2000 and 2005 but if you did want to use sys.database_principals when querying 2005 you can use something like this:

    declare @version varchar(20)

    select...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: inserting multiple records and assigning a sequential value

    Check out row_number() function. I think it is what you are looking for.

    Or you can add an identity column to the option_answers table.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Getting DB roles from SQL2000 and 2005

    sys.database_principals is a system view that was introduced in SQL Server 2005, it does not exist in 2000. dbo.sysusers view is still available in 2005 (and 2008 for that matter)...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: SQL2005 constantly using up 50%+ cpu.. help?

    best practice is for all table to have at least a clustered index and the EDI_DATA does not have one, and probably the other two table do not have one...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: two DDL statements and SELECT in single batch

    This works for me. Don't know if it still qualifies as single batch for you.

    declare @sql nvarchar(max)

    set @sql = '

    alter table foo add col2 int;

    create index idx on foo(col2);'

    exec sp_executesql...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: SQL2005 constantly using up 50%+ cpu.. help?

    Someone correct me if I am wrong, but i think your showcontig results indicate that you do not have any indexes on those table because the index id = 0....

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Transaction Log file saved as MDF

    The extension of a database file do not matter except for the sake of consistency.

    if you want to rename the log file to have ldf extension

    alter database &lt database...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Convert money to numeric

    The money type has four decimal places, so to ensure no data loss numeric(10,4) would be more appropriate.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

Viewing 15 posts - 466 through 480 (of 582 total)