Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2004, 07:44 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default could i join function(return table) with a table

hi all
could i join function which return a table variable with a table like


Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
 
Old August 23rd, 2004, 09:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

That looks too short to be understood. Can you explain that a bit in detail?

_________________________
- Vijay G
Strive for Perfection
 
Old September 15th, 2004, 08:45 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

sorry message was not complete

like :
select * from table1 join dbo.funcTable1(@var)

Ahmed Ali
Software Developer
 
Old September 16th, 2004, 12:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Then you should go for constructing a dynamic SQL statement and use Exec() to execute that.

_________________________
- Vijay G
Strive for Perfection
 
Old September 16th, 2004, 06:42 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

using exec i think it kills the procedure performance
exec finally takes a string and execute it

Ahmed Ali
Software Developer
 
Old September 16th, 2004, 10:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

There might be a little performance hit, but IMO it shouldn't be that worse to kill the performance. I don't see it possible otherwise.

Is that such a huge/heavyload procedure? I thought that would be for just that select statement.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old September 30th, 2004, 07:23 AM
Authorized User
 
Join Date: Sep 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Lalit_Pratihari
Default

Hi,

Yes you can join a table with a function that returns a table.

The only think you will have to take care of is to give a proper alias to the function while joining.

Thanks,

Lalit
Life Means More...;)





Similar Threads
Thread Thread Starter Forum Replies Last Post
table join debbiecoates SQL Server 2000 2 July 2nd, 2008 01:39 PM
.Net reader with Oracle table function return type l.wolf Oracle ASP 1 July 24th, 2007 06:45 AM
.Net reader with Oracle table function return type l.wolf ASP.NET 2.0 Basics 0 November 18th, 2006 12:36 PM
Join table puzzle... vanjamier SQL Language 1 November 26th, 2004 04:43 AM
outer join on same table roog SQL Language 4 September 30th, 2004 05:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.