Viewing 15 posts - 766 through 780 (of 1,479 total)
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...
November 11, 2009 at 3:58 am
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...
November 11, 2009 at 3:36 am
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...
November 11, 2009 at 3:12 am
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....
November 11, 2009 at 3:05 am
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
November 11, 2009 at 1:38 am
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....
November 10, 2009 at 8:30 am
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....
November 10, 2009 at 2:23 am
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...
November 9, 2009 at 3:01 am
Yes you can, but notice that you are missing a coma in your statement.
Adi
November 5, 2009 at 9:41 am
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),...
November 5, 2009 at 9:17 am
--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...
November 5, 2009 at 2:13 am
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...
November 4, 2009 at 5:03 am
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...
November 4, 2009 at 4:22 am
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....
November 4, 2009 at 4:17 am
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...
November 4, 2009 at 3:03 am
Viewing 15 posts - 766 through 780 (of 1,479 total)