Viewing 15 posts - 166 through 180 (of 188 total)
I am SO STUPID - it was NOCOUNT!
Thanks!
J. Moseley
October 20, 2003 at 9:41 am
CREATE PROCEDURE dbo.usp_ManDial_PD_Status_DMM_Rank
@sitevarchar(1),
@EmpLevel int
as
declare @location nvarchar(25)
Set @location = (case @site
when 'a' then 'Austin'
when 'l' then 'Louisville'
Else Null end)
begin
SELECT
RANK=IDENTITY(INT),
Site,
TL_EmpNo,
MGR_Name,
EmpNo,
Coll_Name,
EmpLevel,
DMM_pts
INTO #RANK
FROM dbo.tbl_ManDial_PD_Status_Report_Aggregate
WHERE 1=2 -- always false...
October 17, 2003 at 8:45 am
Great ideas for all kinds of ranking! I am sticking with Ken Henderson's solution using the temp table, but reading the Microsoft article gave me the idea to query...
October 8, 2003 at 3:58 pm
I have not figured out a way to truncate the Excel “table” – DTS says it’s a no-no when you try it. This is what I do instead. ...
September 30, 2003 at 1:27 pm
it's reference is already in the update statement, don't put it in the from clause.
J. Moseley
September 30, 2003 at 12:12 pm
My guess is that the temp table solution would be the fastest but I'm not sure. Bet we have some experts out there that would know for sure! ...
September 30, 2003 at 12:06 pm
BTW, I know where exists and nested subqueries can be a bit confusing! The really simple solution is to create a temp table from an aggregate query on tbl_OrderNotes...
September 30, 2003 at 11:59 am
Oops - I screwed up on the last one! Tested it with two orderid's and discovered that what you really need is where exists, like this:
select * from tbl_OrderNotes
go
--OrderIDNOTEIDType_CDtxt_notes
--189661829.09Test...
September 30, 2003 at 11:52 am
Don't you really just want the note associated with max noteid?
select * from tbl_OrderNotes
go
--OrderIDNOTEIDType_CDtxt_notes
--189661829.09Test Customer
--189661837.09Test Customer7
--189661845.09Test Customer2
--189661853.09Test Customer50
select * from tbl_Master
go
--order_idom_note
--18966
update tbl_Master
set om_note = o.txt_notes
from tbl_OrderNotes o
where
o.OrderID = tbl_Master.Order_id
and
o.type_cd...
September 30, 2003 at 10:44 am
take out the (8)
drop table test
go
create table Test(myfloat float)
go
exec sp_columns test returns the float you expected.
J. Moseley
September 18, 2003 at 2:59 pm
Thanks, David! SMB, let us know how it goes.
J. Moseley
September 18, 2003 at 8:13 am
sp_executesql is faster and more feature laden than EXEC(). Use it when you are exectuting a dynamic string multiple times in succession where only the parameters change because query...
September 17, 2003 at 3:44 pm
Have you tried Exec() function? It allows concatenation.
J. Moseley
September 17, 2003 at 2:53 pm
It looks to me like your "bad" lines don't have enough commas, yes? I have written scrubbing routines before in an ActiveX script within a DTS package that use...
September 17, 2003 at 2:22 pm
I cancelled the run and changed the source to select top 100 * from source table. That took almost a minute. Maybe there is just too much overhead....
September 4, 2003 at 3:12 pm
Viewing 15 posts - 166 through 180 (of 188 total)