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 |
|
Snigdha030
Starting Member
13 Posts |
Posted - 2007-06-18 : 09:41:13
|
| While executing the function below I am getting the following error -The column prefix 'dbo' does not match with a table name or alias name used in the query.Please advice.Here is a piece of example code:create table tabtest(a int, b int)insert into tabtest values(1,8)insert into tabtest values(2,9)Alter function fn_test()returns intASBEGIndeclare @b int--select @b = usgaap_centrac.dbo.tbl_SuspTransactionTypes.TransID from usgaap_centrac.dbo.tbl_SuspTransactionTypesselect @b = b from tabtest where a = 1return (@b)ENDselect dbo.fn_test |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-18 : 09:44:26
|
[code]select dbo.fn_test()[/code] KH |
 |
|
|
Snigdha030
Starting Member
13 Posts |
Posted - 2007-06-18 : 09:48:37
|
| Thanks. |
 |
|
|
|
|
|