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 - 2005-03-21 : 08:30:32
|
| sam writes "I wrote a function, fn_myTable(ID), to return a rowset with 5 columns. This function is used in a stored proc where I want to select one column from my function and some other records from another table.I tried the following:Select fn_MyTable(222).Coln2, userIDfrom tableUserwhere ...By running it, I got an error saying "Incorrect syntax near '.'."So I tried another way:Select fn_MyTable.Coln2(222), userIDfrom tableUserwhere ...This tiem the error says, "Invalid object name 'fn_IBS_RPT_RollFormSalesAmtTable.TOTALSALES'."What should I do in order to get the select statement working?Thank you for help.Sam" |
|
|
dev45
Yak Posting Veteran
54 Posts |
Posted - 2005-03-21 : 08:43:11
|
| what is coln2 ? i am not sure u need it...something like select dbo.fn_mytable(id), userID from... maybe ? (make sure to include the owner of the function, i guess it is dbo.) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-03-21 : 08:43:36
|
| post the full function codeMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|