Viewing 15 posts - 601 through 615 (of 683 total)
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,
February 20, 2006 at 4:47 am
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...
February 20, 2006 at 4:41 am
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...
February 20, 2006 at 3:54 am
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...
February 20, 2006 at 3:46 am
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...
January 12, 2006 at 7:33 am
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...
January 12, 2006 at 7:29 am
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....
January 11, 2006 at 2:43 am
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...
January 9, 2006 at 2:34 am
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. ...
January 6, 2006 at 2:20 am
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...
January 5, 2006 at 1:28 am
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...
January 4, 2006 at 7:43 am
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 =...
January 4, 2006 at 6:03 am
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...
January 4, 2006 at 5:58 am
Will do. Bit of a pain but seems like the only way.
December 21, 2005 at 12:15 pm
Viewing 15 posts - 601 through 615 (of 683 total)