Forum Replies Created

Viewing 15 posts - 12,196 through 12,210 (of 13,469 total)

  • RE: Mdf and Ldf to change hard disk location

    with NO downtime isn't possible...you can minimize it to under a minute per database, assuming the databases are not huge terabyte sized db's. two ways i can think of, maybe...

  • RE: Bizzare sp_makewebtask issue

    I'll ask a different way:

    when i create a stored procedure, i only want it to get data from the database it exists in.

    It is incredibly rare that i create a...

  • RE: Index Scan vs Index Seek

    an index seek is better...an index is stored in order. so if a query tries to look for say, PROD_ID=7, it knows to use the index to SEEK the PROD_ID...

  • RE: Bizzare sp_makewebtask issue

    I've got two ideas to look at:

    one is related to cross database chaining:

    one command points to one database, and the other points to a different one ...which is correct?

    set @muusid...

  • RE: Cannot add rights for Builtin/administrators (SQL 2000)

    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,...

  • RE: Executing Stored Procedure with data time column

    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...

  • RE: Rename a column

    yeah, there's a stored procedure for it:

    exec sp_rename 'tablename.columnname','newname','COLUMN'

  • RE: Constraints that doesn't allow ID from another table.

    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...

  • RE: When does a Trigger trigger?

    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...

  • RE: Cannot drop temp table

    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...

  • RE: datetime stamping for ModifiedDate and CreatedDate

    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...

  • RE: datetime stamping for ModifiedDate and CreatedDate

    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...

  • RE: Destroyed databases with SQL 2005 Express

    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...

  • RE: CASE with SELECT * FROM TableName not possible?!

    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...

  • RE: Foreign Key help!!

    AFTER YOU PRINT YOUR VARIABLE, I THINK YOU'LL SEE HTE MISSING OPEN PARENTHESIS FOR OBJECT_ID FUNCTION:

    parent_object_id = OBJECT_ID(' + @table + ')'

Viewing 15 posts - 12,196 through 12,210 (of 13,469 total)