Viewing 15 posts - 4,516 through 4,530 (of 5,103 total)
Delete is a record by record logged opperation by DESING.
TRUNCATE TABLE logs only the deallocation of whole data pages and that is why is fast. It was created for...
March 4, 2004 at 12:19 pm
you are right. But I was showing that you didn't need to insert in a temp table just to get the value of the column!
so:
set @stmt = 'select @value...
March 4, 2004 at 11:08 am
there are some problems with that trigger:
1. if more than one row is updated it won't work
(Triggers are fired by statements not by rows )
2. assuming that only 1 row...
March 4, 2004 at 9:03 am
If the points is all that matters I may as well earn them RIGHT
March 4, 2004 at 8:52 am
UPDATE Table2 SET Department = Table1.Department
FROM TABLE1
Where Table2.month =Table1.StartDate
without some examples of the data this is what I can suggest.
March 4, 2004 at 8:29 am
Your error is here :
set @tablename = ' tblFilenames_CE' +cast ( @fld2 as varchar)
You have a leading space remove it
and you get what you asked for
March 4, 2004 at 8:23 am
can you say what happens when:
1. a department on table1 has startdate and endate difference of more than 1 month
2. when the year rolls over?
3. if more than 1 department...
March 4, 2004 at 7:53 am
Correct me if I am wrong but I see a lot of probelms in that code:
1. select @fld2 = fld2 from inserted
(What happens when more than one record is...
March 4, 2004 at 7:45 am
SELECT
FEmpID
, (CAse When Q.N = 1 Then [IN] Else [OUT] END) As FTime
, (CAse When Q.N = 1 Then 'IN' Else 'OUT' END) As FType
FROM
OriginalTable Cross...
March 4, 2004 at 6:53 am
I have to admit that i got it right because i was expecting a trick of some kind. I know its hard to keep good questions coming but I don't...
March 4, 2004 at 6:18 am
Can you post the exact delete statement you are using?
March 4, 2004 at 6:12 am
This topic is a little tricky and is heaviliy dependent on the queries runned and on the amount of data transferred across the network.
FROM BOL:
SQL Server attempts...
March 3, 2004 at 4:17 pm
one minor fix to the above solution
select Customer, sum(CASE year
WHEN 2002 THEN sales
ELSE null
END) as y2002,
sum(CASE year
WHEN 2003 THEN sales
ELSE null
END) as y2003,
sum(CASE year
WHEN 2004 THEN sales
ELSE null
END) as y2004
from...
March 3, 2004 at 3:53 pm
I am really Sorry, my browser got locked up and must have taken the extra posts. I think I will recomend to the forum...
March 3, 2004 at 3:45 pm
Viewing 15 posts - 4,516 through 4,530 (of 5,103 total)