Forum Replies Created

Viewing 15 posts - 601 through 615 (of 683 total)

  • RE: using variable in SELECT statement

    try this:

    declare @my_dynamic_query varchar(8000)

    set @my_dynamic_query = 'select [' + @column_name + '] from [' + @table_name + ']

    where [' + @column_name + '] = 23'

    sp_executesql @my_dynamic_query

    Hope that helps,

  • RE: Chain linkage mismatch

    Does this article help?

    http://support.microsoft.com/kb/811205

  • RE: Restore from large database backup

    Do you have to use the REPLACE option?

    When using the REPLACE option the original database is deleted and the files will be recreated. What is probably taking up all...

  • RE: SQL query problem

    This works perfectly well for me.

    Could it be that the query you're looking for is actually:

    select channelName

    from SiteBehaviour

    where features = '0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1'

    and NOT

    select channelName

    from SiteBehaviour

    where features='0,0,0,1,0,0,0,0,1,0,

    0,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1'

    If you put a carriage...

  • RE: Strange Delete Trigger Issue

    Simon,

    by passing the value of deleted.role_no from deleted into a variable you will only ever capture one value at a time.

    As such, if a delete statement against member_role deletes more...

  • RE: Checkpoint manually in each database

    Try the CHECKPOINT command. Not sure if there is another way of manually forcing a checkpoint, other than doing it indirectly by running an ALTER DATABASE statement and changing...

  • RE: deadlocks

    The deadlock is not caused by 2 processes updating the same row. A deadlock (in its most common form) is caused by 2 processes that are updating seperate resources...

  • RE: Windows authentication with no DC

    I don't think this is possible.

    Ultimately, if the domain controller is not up then it can't issue your account with a security token when you logon to the local workstation....

  • RE: Stored Procedure help needed - select string composition

    Another way is to use default values on your parameters of '%'.

    So the above example becomes:

    where username like @param1

    if @param1 has a value of '%' (instead of null) then it...

  • RE: How often we use DBCC INDEXDEFRAG, REINDEX

    Hi,

    it all depends on how much fragmentation you get. It might be weeks or months till you get the level of fragmentation that requires rebuilding or defragging indexes. ...

  • RE: a big transaction log

    The log will only get truncated on every checkpoint if the recovery mode is set to simple.  Otherwise, you need to manage the size of the log by taking regular...

  • RE: Worker Threads

    Is it the job that is failing or the backup itself that is failing.

    If it is the job, be aware that the default number of jobs that SQL Server can...

  • RE: Using a variable in the FROM statement

    Try this:

    DECLARE @table CHAR(10)

    SET @table = 'mytable'

    EXEC ('UPDATE xxtstats

    SET xts_dw_count =

    (SELECT COUNT(*)

    FROM [' + @table + '])

    WHERE xts_table = ''' + @table + '''')

    Alternatively:

    DECLARE @table CHAR(10)

    DECLARE @cmd varchar(1000)

    SET @table =...

  • RE: a big transaction log

    Are you backing up the transaction log? If you're not then you either need to back it up regularly or set the recovery mode to simple.

    The transaction log does...

  • RE: Where to download RS from?

    Will do. Bit of a pain but seems like the only way.

Viewing 15 posts - 601 through 615 (of 683 total)