[dba-SQLServer] What's in a function

Djabarov, Robert Robert.Djabarov at usaa.com
Tue Mar 2 09:20:44 CST 2004


I think you forgot to alias your function:

	INNER JOIN dbo.udfFunction1 (T1.Field1) F1

But I also think you need to change your function or alter your SELECT,
otherwise you'll continue receiving errors.



Robert Djabarov
SQL Server & UDB
Sr. SQL Server Administrator
Phone: (210)  913-3148
Pager: (210) 753-3148
9800 Fredericksburg Rd. San Antonio, TX  78288
www.usaa.com

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
Francisco H Tapia
Sent: Monday, March 01, 2004 6:47 PM
To: SQL Server 2k List; dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] What's in a function

I wrote a quick function that kicks data out in a table format..

example select * from dbo.udfMyFunction ('GUID - 36 char')

which kicks out for example Field1, Field2, Field3 etc...

I wanted to join it to another table...table1 where table1 has Field1 
wich could be used as an input parameter for the function, am I thinking

of this wrong?

This errors out for me on the input parameter

Select f1.Field1, f1.Field2, t1.Field3 FROM Table1 AS T1
    INNER JOIN dbo.udfFunction1 (T1.Field1)
       ON T1.Field1 = F1.Field1

the error occurs at T1.Field1...

any ideas?

-- 
-Francisco


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list