Viewing 15 posts - 16 through 30 (of 46 total)
Your probably going to have to give some sample data for people to understand what you are looking for but I typed this up real quick. It may give you...
June 2, 2003 at 2:09 pm
Al of the parameters are optional. You could call the proc like this for the parameters you do have.
exec test_it @param1=10, @param5 = 'a', @param8 = 'b'
or you could call...
May 30, 2003 at 8:26 am
Give this a shot. I'm not sure what your datatypes are but notice param1 is an int and notice that you have to cast it to a varchar to concatenate...
May 29, 2003 at 10:50 pm
That is kinda backwards. I always use
IF COALESCE(objectproperty(object_id('TEST_TABLE'),'IsTable'),0) = 1
begin
drop table TEST_TABLE
end
Much faster and simpler than hitting sysobjects
May 29, 2003 at 10:33 am
Books Online. If you don't have it installed, you should be able to get it off of the cd you installed SQL Server from. It's actually probably online as well,...
May 28, 2003 at 12:59 pm
You can use a Partitioned View. You would create two tables each with a check constraint on the year column. Then you create a view unioning the two tables together...
May 28, 2003 at 12:53 pm
--Here is the function I was thinking of writing. It seems to work pretty well. It could definitely be cleaned up since I wrote it pretty quickly.
if object_id('test') is not...
May 28, 2003 at 8:40 am
The easiest thing to do would be to create a three column table valued function that splits the time and converts to seconds. Then you could always add all three...
May 27, 2003 at 3:17 pm
you could try this
set nocount on
if not exists (select column_name from information_schema.columns where column_name='RG_ENTRYDELETED' and table_name='REGISTRATION')
alter table REGISTRATION add RG_ENTRYDELETED bit;
if not exists (select column_name from information_schema.columns where column_name='RG_ENTRYDELETEDBY'...
May 27, 2003 at 1:51 pm
If the variables are declared and properly populated, it will work.
May 27, 2003 at 9:22 am
If you want to insert five rows for every @ActionDesc, @ActionDate, and @ActionReport then in would be as simple as
insert into Actions (ActionTypeID,ActionDesc,ActionDate,ActionReport)
select at.ActionTypeID,
...
May 27, 2003 at 8:08 am
You could us profiler or you could use dbcc inputbuffer.
May 21, 2003 at 9:23 pm
Nope... I meant to say instead of.
There are regular triggers and there are instead of triggers. Look them up in BOL.
May 21, 2003 at 9:21 pm
Try this
update f
set f.groupid = 213
from o_file as f
where f.columnx = 215
and exists
(select * from stutable1 a
where f.fileid = a.o_objid)
May 21, 2003 at 3:33 pm
Have you looked at instead of triggers?
Also, if you put a default on the column, you could use a regular trigger and update the value to the correct value
May 21, 2003 at 2:51 pm
Viewing 15 posts - 16 through 30 (of 46 total)