Hi John,
It may be best to provide us with the big picture/goal <g>, otherwise, it
is very likely that both Anith and I are sending you "up the creek without
a paddle" <g>. Here's one alternative from
http://msdn.microsoft.com/library/en-us/createdb/cm_8_des_08_361x.asp:
{
(
ShipperID int,
ShipperName nvarchar(80),
OrderID int,
ShippedDate datetime,
Freight money
)
AS
BEGIN
SELECT S.ShipperID, S.CompanyName,
O.OrderID, O.ShippedDate, O.Freight
FROM Shippers AS S INNER JOIN Orders AS O
ON S.ShipperID = O.ShipVia
RETURN
END
Quote:}
You can use the above example in conjunction with Anith's case statement.
Perhaps consider the use of sql_variant. Here's a modification of the above
example:
{
(
pkey sql_variant
, chosen_column sql_variant
)
Quote:}
Thanks,
Bill Hollinshead
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no
rights. Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.