Viewing 15 posts - 13,336 through 13,350 (of 13,838 total)
Hi Thomas - as I was writing my last post, I noticed that Remi had already written almost exactly what I was typing - so he "beat me to it" ie...
August 26, 2005 at 7:00 am
Which fields need to be compared? Just an ID field, or several?
August 26, 2005 at 6:51 am
Check out SET TRANSACTION ISOLATION LEVEL in BOL and see whether that gives you what you want.
August 26, 2005 at 2:34 am
So does
select o.OfficeID, d.DeptID, s.SectionID
from offices o join depts d on o.OfficeID = d.OfficeID join Sections s on d.DeptID = s.DeptID
Give you the results you want to insert to table4?
August 24, 2005 at 12:05 pm
Assuming that you want any NULLs to be summed as zeroes, use the isnull() function to get rid of the worrying error:
select client,productcode,modifiedlot,location,sku,count(*) ct,cast(sum(isnull(grosswgt,0)) as decimal(18,4)) grosswgt,
cast(sum(isnull(netwgt,0)) as decimal(18,4))...
August 24, 2005 at 11:27 am
What is the relationship between the first three tables? Insertion is performed through use of the INSERT statement, believe it or not
Here's an example:
INSERT...
August 24, 2005 at 11:23 am
Hey, it's not as easy as you might think. Try this (untested):
update m1
set SettingValue = 'True'
from ModuleSettings m1
where exists (select m2.ModuleID from ModuleSettings m2 where m2.SettingName = 'GroupType' and m2.SettingValue...
August 24, 2005 at 11:17 am
The top three lines appear to be duplicated for some reason - not that it matters.
To make this more manageable, I suggest that you implement this as a stored procedure...
August 24, 2005 at 6:09 am
Remember that such a trigger probably needs to deal with the insertion of multiple rows - a tasty bit of coding that might require a cursor. Recommend that you stay...
August 24, 2005 at 5:58 am
How about putting the whole statement in one string and then executing that? Something like this:
create procedure TestInputTable (@InputTable varchar(100))
as begin
declare @strSQL varchar(8000)
set @strSQL= 'select * into #TempTable from '...
August 24, 2005 at 2:16 am
Yeah, that works, good thinking. Obviously if an index definition has changed, the 'check for existing' is necessary as you'd want to replace the one that's there currently.
August 24, 2005 at 1:35 am
When you debug a stored proc which contains statements that fire a trigger, you do not get to debug the statements in the trigger - even if they are executing...
August 23, 2005 at 3:20 pm
You can script the indexes one at a time (yawn) in Query Analyser, without getting the tables scripted. I can't see how you can do this in one step for...
August 23, 2005 at 2:58 pm
Viewing 15 posts - 13,336 through 13,350 (of 13,838 total)