Viewing 15 posts - 376 through 390 (of 497 total)
How about using a temp/variable table to hold the values you want in your IN clause and doing away with the sp_executesql completely?
DECLARE @foo table(mhlka_id int)
insert...
October 1, 2003 at 3:55 pm
Kind of hard to debug this without the table structure but I think what you need to do is change the
SET @mhkxa = 'WHERE mhlkot.mhlka_id IN ('+ @mhkx +')'
to...
October 1, 2003 at 3:46 pm
Another option in a slightly different approach is that you could easily put your objects in different tables as was suggested above. But when you want to return the results...
October 1, 2003 at 3:35 pm
Personally I always use stored procedures to do inserts, updates, and deletes. You have a lot more control over how the data is modified and can check for errors before...
October 1, 2003 at 3:24 pm
I'm not familiar with your tool but if it is simply a full database backup you should be able to do a restore using the recovery flag and then restore...
October 1, 2003 at 2:20 pm
Amy,
As Bill stated transaction log backups apply to the last full backup. So if you do a full SQL Litespeed backup in the middle of the day the next log...
September 26, 2003 at 5:06 pm
Make sure you use the N before each string character. IE:
SELECT * FROM tblBooksJapaneseInfo WHERE bookJPTiles like (N'%...%'‚'N'...' )
BTW: It might be easier to just use the Latin1_General_Bin...
September 26, 2003 at 4:52 pm
I think what you really want is to query the "deleted" table rather than the actual table.
IE:
CREATE TRIGGER trgtblBag_data ON tblDelete_Inventory
FOR DELETE
AS
DELETE t
FROM tblBag_Data BD
...
September 25, 2003 at 5:37 pm
If you are not replicating the table you can use:
ALTER TABLE foo DISABLE TRIGGER trg_foo
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
September 25, 2003 at 3:54 pm
The following 2 queries will allow you to create a script to drop the constraints and indexes. I don't have one handy for actually creating a script to re-create them....
September 25, 2003 at 3:46 pm
Try
create procedure sample_proc(@session_id int)
as
begin
declare @sql_stmt varchar(4000)
set @sql_stmt =
'select * from session ' +char(13)+
'where session_id =' + CONVERT(varchar,@session_id )
exec(@sql_stmt)
end
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
September 24, 2003 at 4:48 pm
Easiest way would be to simply restore a backup of your database on the new server. Otherwise both Allen and Steve are correct.
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
September 24, 2003 at 3:34 pm
I wrote a script a while back that would read the syscomments table and look for a specific piece of text for a given type of object. It would then...
September 24, 2003 at 2:09 pm
As Bill stated it designates unicode. What it really means is that if your where clause to to contain ansi characters that can only be represented as 2 byte characters...
September 24, 2003 at 1:54 pm
Also note that in my query I didn't use an outer join as it looks to me like you only want to update the records in Master that are pertinent...
September 24, 2003 at 1:47 pm
Viewing 15 posts - 376 through 390 (of 497 total)