Viewing 15 posts - 12,196 through 12,210 (of 13,465 total)
the built in administrators group has rights to everything, so logically you shouldn't add or subtract rights to a built in group.
you usually do this two ways, add a role,...
December 6, 2007 at 5:03 am
you shouldn't use varchar fields to carry/pass datetime fields.
your procedure should accept datetime fields instead:
ALTER procedure P_REALTYTAX (@DATE1 datetime, @DATE2 datetime)
as
...
to test whether this would work, simply try sticking...
December 5, 2007 at 11:02 am
yeah, there's a stored procedure for it:
exec sp_rename 'tablename.columnname','newname','COLUMN'
December 5, 2007 at 10:35 am
it seems that what you are describing is literally the definition of a foreign key.
1.a child table can have the ParentId as a column, and a foreign key constraint in...
December 3, 2007 at 3:10 pm
your sources are right, it is a set based operation...only one execution for the all affected rows.
this is the advantage of Set Based Operations
if you update a table so...
December 3, 2007 at 3:02 pm
you want to drop only the tables that are related to your connection; your IF EXISTS statement checks accross all connections, so you could pick up a temp table from...
December 3, 2007 at 10:52 am
yeah, in order to have a changedDt column with the last Updated/changed, you'd need to add a trigger to the table. with the trigger, you'd be able to update the...
December 3, 2007 at 9:44 am
the timestamp datatype lets you know the last affected automatically, but it's not a datetime field;
here's an example:
create table #sample(somevalue varchar(30),CreatedDt datetime default getdate(),ChangedDt timestamp)
insert into #sample(somevalue) values('value 1')
insert into...
December 3, 2007 at 7:30 am
i use this cursor below on our dev machine at work;
it runs as a job twice a day, which is often enough to switch any new or newly restored databases...
November 30, 2007 at 10:24 am
it's kinda straightforward i think; a case statement can return only one datatype.
when the case is constructed, i think it is assuming the first item int he case statement will...
November 30, 2007 at 7:09 am
AFTER YOU PRINT YOUR VARIABLE, I THINK YOU'LL SEE HTE MISSING OPEN PARENTHESIS FOR OBJECT_ID FUNCTION:
parent_object_id = OBJECT_ID(' + @table + ')'
November 29, 2007 at 7:13 pm
when i reformatted your sql for readability, it was missing a couple of commas.
this works:
CREATE TABLE BATCHES_LOTS (
[BATCHNO] varchar (15),
[TRANSFERID] int,
CONSTRAINT PK_BATCHES_LOT PRIMARY KEY (BATCHNO,TRANSFERID ))
CREATE...
November 29, 2007 at 10:34 am
i googled for "oracle epoch date" and found a lot of stuff.
one of the more obvious selectiosn was where they took the datatime as a double, and subtracted it from...
November 29, 2007 at 5:32 am
Andras's example of the trigger determining what changed is perfect...but you want to send the email outside of the trigger code, and not inside it.
remember that a trigger needs to...
November 29, 2007 at 5:05 am
the case statment is for a field, I think you thought you needed to identify the table and where for each case, and that's not true:
this is syntactically correct:
DECLARE @Ind...
November 29, 2007 at 4:46 am
Viewing 15 posts - 12,196 through 12,210 (of 13,465 total)