SQL 7 User Defined Functions

SQL 7 User Defined Functions

Post by BJ Halliwel » Thu, 05 Dec 2002 04:41:46



I believe i have found out that there are no such thing as User Defined
Functions in SQL Server 7.
This would be typical for me as i had just finished implementing their use,
sheesh.

I guess i have several questions, is it true they do not exist in SQL Server
7?

Is there another easy way of returning a set of results from a query (type
int) as a comma separated string that can become a sub-query of another
select statement??

(on the side, also i take it that 'instead of insert triggers' are also out
of the question in sql 7)

Thanks....

 
 
 

SQL 7 User Defined Functions

Post by Oleg Deshi » Thu, 05 Dec 2002 04:51:25


Quote:> I guess i have several questions, is it true they do not exist in SQL
Server
> 7?

Yes, it's true.

Quote:> Is there another easy way of returning a set of results from a query (type
> int) as a comma separated string that can become a sub-query of another
> select statement??

Temporary tables do that magic.

Regards,

Oleg.

 
 
 

SQL 7 User Defined Functions

Post by BJ Halliwel » Thu, 05 Dec 2002 05:04:37


Thanks for the help....

I'll check out temp tables then, was also considering datashaping, any ideas
on which is more effective, easier etc

anyhow Thanks


Quote:> > I guess i have several questions, is it true they do not exist in SQL
> Server
> > 7?

> Yes, it's true.

> > Is there another easy way of returning a set of results from a query
(type
> > int) as a comma separated string that can become a sub-query of another
> > select statement??

> Temporary tables do that magic.

> Regards,

> Oleg.

 
 
 

SQL 7 User Defined Functions

Post by Oleg Deshi » Thu, 05 Dec 2002 05:33:24


Hi,

Quote:> ...was also considering datashaping, any ideas
> on which is more effective, easier etc

What exactly do you mean?

Regards.

 
 
 

SQL 7 User Defined Functions

Post by BJ Halliwel » Thu, 05 Dec 2002 07:40:14


Well, yes, i can see how that doesn't really make too much sense.... i'm not
sure i can explaing it too well at the moment though...

Using the following Provider=MSDataShape;
                            data provider=MSDASQL
i have made queries that are akin to the following.....  this lets you
effectively include a sub-recordset as an entry into the main query....

SHAPE {SELECT * FROM dbo.RegisterCat }
 APPEND({SELECT *  FROM dbo.RegisterEntry  }
     RELATE RCID TO RCID) AS rsCat_Link"

I thought it was called data-shaping although these things are commonly
confused in my world.
But i have instigated a temporary tables regime now and it seems to be
working delightfully... (infact better than the above option which was going
to require further coding to traverse and concatenate the recordsets)  so
thanks again..... i'm not sure i can explain myself any better..

-bj-


Quote:> Hi,

> > ...was also considering datashaping, any ideas
> > on which is more effective, easier etc

> What exactly do you mean?

> Regards.

 
 
 

1. SQL 2000 User Defined Function with Dynamic SQL

I continue to get an error "Incorrect Syntax near the keyword Execute" on
the command of this Create Function command. I have tried many ways to get
around the error and have had no success. Can anyone enlighten me on the
problem?
My Thanks,
Chris


varchar(50) )
RETURNS
varchar(8000)  AS
BEGIN



'ID = ''' +



END

2. P4W4.5 GPF during table restructuring

3. SQL Anywhere conversion to SQL Server (user defined functions)

4. US-OH-DBA MANAGER NEEDED IN COLUMBUS, OHIO

5. Help with SQL and User defined functions.

6. SQL Server optimizer

7. SQL and User Defined Function

8. QUERY - TABLEFRAME - MOUSE CLICK - What?????? - Pdox4.5 for win

9. SQL 2000 User Defined Functions

10. Oracle SQL*Forms user defined function keys

11. Using SQL 2K User-defined functions

12. sql server user defined function - parse a string

13. VB, SQL and User-Defined Functions