Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2007-01-04 : 09:48:57
|
greg writes "i need to join 3 tables multiple times in my SQL statement which is causing a decrease a performance. would you suggest a way so that i can join only once and use multiple times that join in my query? also, i can't use PL/SQl." |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-04 : 10:31:11
|
Can you explain What you mean by i need to join 3 tables multiple times in my SQL statement. It seems you need to work on the resultset. If soCreate table #t(col1 ......)Insert into #tYour Join QueryNow you dont need to join 3 tables multiple times as you can make use of #tYour subject has good naming convention MadhivananFailing to plan is Planning to fail |
|
|
nr
SQLTeam MVY
12543 Posts |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2007-01-04 : 12:09:42
|
Can't use.."PL/SQl."??Is this Oracle....=> www.dbforums.com |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-04 : 13:43:59
|
Or make the JOIN in a VIEW and call it many times later.Peter LarssonHelsingborg, Sweden |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-05 : 08:00:56
|
quote: Originally posted by Peso Or make the JOIN in a VIEW and call it many times later.Peter LarssonHelsingborg, Sweden
Can View support if Joins are used in Dynamic SQL?MadhivananFailing to plan is Planning to fail |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-05 : 10:16:34
|
Where do Dynamic SQL come in the picture?Peter LarssonHelsingborg, Sweden |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-05 : 20:54:00
|
quote: Originally posted by Peso Where do Dynamic SQL come in the picture?Peter LarssonHelsingborg, Sweden
Just a thought MadhivananFailing to plan is Planning to fail |
|
|
|
|
|