Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Inserting multiple tables into one table
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

27 Posts

Posted - 09/30/2009 :  12:30:05  Show Profile  Reply with Quote
I have one table that I'm inserting multiple records that are comming from 3 different functions.

See below

INSERT INTO tb_ing (ing_reci, ing_desc, ing_amt, ing_unit) select @scope, dbo.udf_split(@ing_desc,'|'), dbo.udf_split(@ing_amt,'|'),  dbo.udf_split(@ing_unit,'|')

NOTE: @Scope is an identity value that is supposed to repeat for all row values.

dbo.udf_split is a function. That returns a one column table of values with the col name of "Items". EACH FUNCTION RETURNS THE SAME NUMBER OF ROWS.

Flowing Fount of Yak Knowledge

2875 Posts

Posted - 09/30/2009 :  13:52:21  Show Profile  Reply with Quote
I don't see a question or a problem, but since you posted on this forum I'll assume you have at least one of each!

Is the problem that each function is table-valued , rather than scalar-valued? Do the records produced by each split link together in any way?


Everyday I learn something that somebody else already knew
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000