Thank you guys both for your help!
I had the right idea...maybe my error is happening somewhere else. I
cut my SQL into three variables, then execute it this way. The error I
get when I try to create the stored proc is:
Here is my code:
create procedure dbo.usp_dcoecnsearch
p.processname, b.fabname, v.quarter, v.originatorname from
vw_dcoecnlist v, tbl_tooltype t, tbl_fa f, tbl_process p, tbl_fab b'
v.tooltypeid=t.tooltypeid and v.faid=f.faid and v.processid=p.processid
> Try breaking up the string and assigning to multiple variables; then
> concatenate the variables in the exec() statement.
> > I have a dynamic query that I need to execute in a stored proc in
> > Server 6.5. The query is longer than 255 characters.
> > Using exec(), is there a way to execute this query? What are my
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.