Jim Lawrence
jlawrenc1 at shaw.ca
Sun Oct 12 00:19:10 CDT 2008
You can use UDFs to eliminate duplication of coding just like an Access function call or within MS SQL you can use a SQL statement as a table... I believe up to 7 levels deep. (or is that Oracle?) .. air code... Select file1.name, tableB.city >From (Select * from tableA where colour = green) as file1 Where tableB.state = 'AR' It can work like a compound query. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stephen Sent: Saturday, October 11, 2008 9:18 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Converting Access nested queries into SPs I am converting an Access system to SQL-S back-end and Access front-end. Presently converting the queries into SPs. I use nested queries a lot - the lower levels form commonality for other specific higher level queries. Is there a way I can build SPs in this nested fashion without having to specifically repeat the lower-level code each time in the higher-level SP? Stephen Bond Otatara New Zealand _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com