Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,479 total)

  • RE: permission Issue

    If you don’t want the user abc to delete the data and you want to have the delete statement in the procedure, then you shouldn’t give the user abc permissions...

  • RE: Delete 30,000

    Dave Ballantyne (11/11/2009)


    Ummm, you have given no details so this is a complete guess

    Create procedure DeleteProc

    as

    Delete top 10000

    from <yourtable>

    go

    And create a job to execute it in sqlagent

    Just a small...

  • RE: group by two combining fields

    I’m sorry but it is hard to understand what you need. Can you post a small script that includes create table statement that creates the table, insert statements to...

  • RE: permission Issue

    This is because of the ownership chain. Since the stored procedure and the tables that the procedure works with are owned by the same user, ownership chain is obtained....

  • RE: How to Split the Text

    Here is one way of doing it:

    declare @string varchar(20)

    set @string = 'FA885A0/FA094V0'

    select left(@string, charindex('/',@string)-1) as FirstPart,

    right(@string, len(@string) - charindex('/',@string)) as SecondPart

    Adi

  • RE: Update Table

    You can use a CTE that uses the row_number function that is partitioned by code and subcode and then update the table through the CTE where row_number function returns 1....

  • RE: Questions at transactions

    For some reason nested transactions is one of the most confusing subjects. There are few rules that you need to understand and then the whole subject will be clear....

  • RE: deadlock and transactions

    There are 2 ways that I can thing about to make sure that this code will be executed by 1 process each time. The first way it to use...

  • RE: sp_configure - reconfigure

    Yes you can, but notice that you are missing a coma in your statement.

    Adi

  • RE: Convert INT to Datetime

    You can convert it to a string and then work with the string manipulation functions. Here is an example:

    declare @i int

    declare @ci char(8)

    set @i = 23052008

    set @ci = convert(char(8),...

  • RE: Query!!

    --Creagin the table and inserting the data

    create table #t (string char(3))

    insert into #t (string)

    select 'abc'

    union all select 'abc'

    union all select 'abc'

    union all select 'fgh'

    union all select 'dft'

    union all select 'fgh'

    go

    --Using...

  • RE: Dynamic Sql Query problem

    rockingadmin - Pleas post your question only once instead of posting it few times in different forums.

    For anyone that wants to help rockingadmin pleas use the thread at http://www.sqlservercentral.com/Forums/Topic813032-145-1.aspx

    Instead...

  • RE: Update Query

    You don’t have to specify all the columns’ names. You have to specify only the names of the columns that you want to update. If you are going...

  • RE: Dynamic Sql Query problem

    It is unclear if you are getting results and the results include the null as the value or in your procedure the variable @sql is getting the null value....

  • RE: Conversion

    You didn’t specify the way that you want to modify the data. In your example you changed letters to different letters and not only made those capital letters (for...

Viewing 15 posts - 766 through 780 (of 1,479 total)