Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create Store Procedure which return recordset....

Status
Not open for further replies.
Dec 28, 2004
87
US
Thanks For your reply...

a) master table terrredesign_WIActCat_WIDay has cca. 8,000,000 rows.
b) final join result to insert into tblWIActCat_WIDay has some 2,000 rows.
c) EXISTS() and JOIN are significantly faster than IN()
---
You right on above things...let me tell your something in detail...

b)-> In final join result, Mostly I get 2000-6000 Rows Maximum I would say 10000 Records..As you know It depends
SQLDB Expression...

c) EXISTS() and JOIN are significantly faster than IN()
In my case Inner Join run faster then Exists() and Exists() run faster then IN()

dbo_Custtb1 - 50000 (Total rows)
SQLDB Expression for an Example:

(Region_Num = 50 AND Team_Num = 128 AND Territory_Num = 1) OR (Region_Num = 50 AND Team_Num = 128 AND Territory_Num = 2) OR (Region_Num = 50 AND Team_Num = 128 AND Territory_Num = 6)

Above Region_Num, Team_Num,Territory_Num all these fields are in dbo_Custttb1,

SQLDB Expression depends what user select from VB Form then when user click on process button then i am passing SQLDB value to my query to Insert Data in WIActCat_WIDay Table(Local Access Table).

***
select count(distinct CustLifeNo) from terrredesign_WIActCat_WIDay

Above Query return Only 38000 Records..For your Information
terrredesign_WIActCat_WIDay contain somany redundant data and for some reason we really require redundant data..


Now I really wants to create a store procedure which return recordset (get my output really quick..)if anyone can help me out i will really appriciate...


AD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top