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 |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-07-24 : 07:25:55
|
| Dear Experts,I've completed my task with all your help especially KH and Peso....very much thankful to you all.now is it possible to make all this as one proceudre or one function? This is my idea to spiltting like this . actually i've to update the table19.columnb2. based on all these. please give me the way to make all the two functions and the query to run at a time.CREATE function getuomid(@uomcode varchar(50)) returns varchar(50) as begin declare @uom_id varchar(50) select @uom_id= uom_id from vuom where uom_code=@uomcode return @uom_id end CREATE function getitemid(@uomid varchar(50)) returns table as return (select * from table21 where column03=(select dbo.getuomid('no of leaves'))) UPDATE t19SET t19.Columnb2 = d.Column04FROM Table19 AS t19INNER JOIN dbo.GetItemID('1ca7a0fa-c507-4d4d-94a1-13eb9ec3d6d2') AS d ON d.Column01 = t19.Column01thank you very muchVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-07-24 : 07:55:21
|
| Sorry Peso, unexpectedly posted secondtime(because first time after posting, i didn't find my post. sorry for thatVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
|
|
|