Viewing 15 posts - 76 through 90 (of 244 total)
a calulated column would be better.
alter tabe table
add isactve case when dateexpires >= getdate then 0 else 1 end
something like that
This is more robust than the nightly sql agent...
January 12, 2007 at 8:04 am
Code below gets around 4000 syscomments split problem.
declare @find varchar(1000)
set @find = ''-- enter search string here
set @sp_prefix = isnull(@sp_prefix,'') + '%'
set @find = '%' + @find + '%'select distinct...
January 10, 2007 at 8:20 am
update table
set col1 = substring(col,1,50),
col1 = substring(col,51,100),
col1 = substring(col,101,150),
col1 = substring(col,151,200),
col1 = substring(col,201,250)
something like that
January 10, 2007 at 7:49 am
You havent shown how these columns are related. If these tables have no relation then effectivly you arent storing which team assembled which component. Are there more columns or other...
January 10, 2007 at 7:27 am
create a SQL scheduled job written in VBScript then call the job using T-SQL.
January 5, 2007 at 11:40 am
if its a sql table have a look at sp_rename if its an excel spreaqdsheet use xp_cmdshell with dos commands.
January 3, 2007 at 5:50 am
investigate the sysjobs tables. one of these will contain a column which stores the 'quit with success\next step' status. Bung these values into a temp table before the delete then...
December 29, 2006 at 4:44 pm
Ross
this will not work SecurityGroupReferenceID is presumably an int and you are using strings in your in list.
December 29, 2006 at 7:30 am
Something like the below should work and be pretty efficient. Obviously i havnt tested this so use at your own risk.
ALTER PROCEDURE dbo.treeViewDefaultDir
@ListOwner varchar(200),
@Roles varchar(2000)
AS
if object_id('tempdb.dbo.#tmp') is not null
drop table...
December 29, 2006 at 7:25 am
thats les efficient i replaced the or with the the isnull method just wondered if there was a better way.
December 29, 2006 at 6:28 am
create proc usp_anyemployees
declare @wellisthere int
if exists (select 1 from employees)
set @wellisthere =1
else
set @wellisthere =0
select @wellisthere
really you need to put an output param into your 1st sp and return that ...
December 28, 2006 at 5:11 pm
yep you need to rebuild indexs and recompute stats if you want to use the no in sysindexes. Whats wrong with using count?
December 28, 2006 at 5:03 pm
does a 'little difficult' mean you dont understand it yourself? This doesnt sound like a real problem. Use @@rowcount on the first sp and pass to the second as input...
December 28, 2006 at 5:01 pm
click advanced and select quit with failure or more to next step depending on what you want it to do. If you don have expicit failures youneed to insert reults...
December 28, 2006 at 4:58 pm
Viewing 15 posts - 76 through 90 (of 244 total)