Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,131 total)

  • RE: Delete query would delete all related dependencies

    I know I have to make sure that all dependencies to that person are removed before I can do it.

    Not necessarily - the foreign key constraints specification will include action...

  • RE: Running SQL Server 2008 with Local Admin or Domain user

    We have change the sql server startup user from domain account to local system and it works much better now.

    The restart of SQL Server may be the difference.

    I have done...

  • RE: SQL Book

    Out of the 50 some database books that I own and another 50 that I have read, here are the books that I consider essential. I do not...

  • RE: Get the Current Date

    There is a rather nasty effect of using CURRENT_TIMESTAMP:

    Original DDL statements:

    create table dbo.foo

    ( MyTimeStamp date )

    go

    alter table dbo.foo add default ( CURRENT_TIMESTAMP ) FOR MyTimeStamp...

  • RE: How to remove one of two log files

    The primary log file cannot be removed, so the second log file will need to be removed and then the first log file moved to a different drive.

    Under SQL Server...

  • RE: SQLServerAgent AD Account

    Please realize that backups are a command sent to the database engine and the DB engine performs the backup file writes, not the originator of the backup command. Therefore...

  • RE: Cartesian product to create table takes FOREVER... any way to speed it up?

    The problem is "populated the table with all possible values (0-255)", results in a table with over 4 billion rows.

    select cast(256 as bigint) * 256 * 256 *...

  • RE: Column info

    Tables columns that are not in an index:

    selectschemas.nameas schema_name

    ,tables.nameas table_name

    ,columns.nameas column_name

    fromsys.schemas

    joinsys.tables

    ontables.schema_id= schemas.schema_id

    joinsys.columns

    on columns.object_id = tables.object_id

    WHERENOT EXISTS

    (select 1

    fromsys.index_columns

    whereindex_columns.object_id= columns.object_id

    andindex_columns.column_id= columns.column_id

    )

  • RE: Setting SQL Server Default Locations

    Caine posted:

    I have a server with multiple instances (MSDE and SQL Express). I run the same exact code on both and the correct value for BackupDirectory came back as if...

  • RE: Setting SQL Server Default Locations

    "the database is created in the proper location" How interesting as I am getting different results !

    An internet search revealed that this is a bug in SQL Server that...

  • RE: Converts in a case expression

    You should cast the numeric to a character datatype within the case statement such as:

    WithSchemataTables as

    (

    selectSCHEMATA.schema_name

    ,SUM( CASE when TABLES.TABLE_SCHEMA IS NOT NULL THEN 1 ELSE 0 END ) as...

  • RE: Setting SQL Server Default Locations

    Regarding your statements:

    "In the case of backups, this allows you to specify a backup with just a file name (from T-SQL), and the backup will go to this directory." ...

  • RE: storing unicode in sql server 2005

    "by default what sql server 2005 uses UTF8 or UTF16 for storing data?"

    Neither - SQL Server uses UCS-2 for unicode data types.

    Conversion between UCS-2 and a program's representation is performed...

  • RE: need help find overlapping dates in a table

    Try the below SQL which results in:

    ARATES 12000-01-01 2000-12-31 5 2000-01-012001-12-31

    BRATES 22000-01-01 2000-12-31 6 2000-12-31 2001-12-31

    s

    select First.InfoName

    ,First.Id

    ,First.Effective

    ,First.termination

    ,Second.Id

    ,Second.Effective

    ,Second.termination

    From @overlap as First

    join @overlap...

  • RE: Problem with REPEATABLE READ

    If you are attempting to simulate a queue with a table, where multiple connections can read from the queue but each queue row can only be read by one of...

Viewing 15 posts - 16 through 30 (of 1,131 total)