🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.ms-sqlserver
Article #153

Trouble on Exec With Recompile etc.

#153
From: Matthew Dodd
Date: Thu, 26 Feb 1998 00:00
26 lines
1680 bytes

I've been setting up Stored Procedures to use with my User Connection
object, and some of them require a lot of string manipulation to construct
the SQL syntax.

For example, there are 20 tables all identical in structure which I must
choose from when carrying out any activity - so I pass a table no. as a
parameter.

The thing is that I mainly wanted to use SP's because they are compiled and
'pre-optimised', but I can't see that SQL Server can compile something
like:-

EXEC (strSQL1 + strSQL2)

and the WITH RECOMPILE option doesn't appear to be acceptable.

Am I worrying unnecessarily or is this an issue??

Many thanks in advance to anyone - swap any info for a great souffle recipe
;->

Matthew Dodd
Phoenix Solutions
mcdodd@soton.ac.uk
Technical Details
Message-ID: <OWO3v4rQ9GA.244@uppssnewspub05.moswest.msn.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6cre6f$i9f$1@news.global.co.za> <MPG.f5c096e5b9bd5df989683@msnews.microsoft.com> <34f3834a.15325506@msnews.microsoft.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115df1,77c51b218e75443,start
X-Google-Attributes: gid115df1,public
X-Google-Thread: 11301e,77c51b218e75443,start
X-Google-Attributes: gid11301e,public
X-Google-Thread: ff490,77c51b218e75443,start
X-Google-Attributes: gidff490,public
X-Google-Thread: 104de1,77c51b218e75443,start
X-Google-Attributes: gid104de1,public
From: "Matthew Dodd" <matthew@carrington.co.uk>
Subject: Trouble on Exec With Recompile etc.
Date: 1998/02/26
Message-ID: <OWO3v4rQ9GA.244@uppssnewspub05.moswest.msn.net>
X-Deja-AN: 328834482
References: <6cre6f$i9f$1@news.global.co.za> <MPG.f5c096e5b9bd5df989683@msnews.microsoft.com> <34f3834a.15325506@msnews.microsoft.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Newsgroups: comp.databases.ms-sqlserver,cz.comp.microsoft.sql,microsoft.public.sqlserver.odbc,microsoft.public.sqlserver.programming