Subject Views with Stored Procedures
Author Alexandre Benson Smith
Hi !

I have searched and didn't find anything related, maybe a didn't search
enough :-(

I have a case, my dear enemy Crystal Reports don't let me link tables
with SP's, so I couldn't create a reports with a query like this:

select
TableA.ColumnA, StoredProcB.ColumnB
from
TableA left join
StoredProcB(TableA.ColumnA) on (StoredProcB.ColumnA = TableA.ColumnA)

Then I tiried to fool Crystal Reports creating a view like this:

Create View ViewSP (ColumnA, ColumnB) as
select
TableA.ColumnA, StoredProcB.ColumnB
from
TableA left join
StoredProcB(TableA.ColumnA) on (StoredProcB.ColumnA = TableA.ColumnA)

The select works fine as expected, but when I try to create the view I got:

Dynamic SQL Error
SQL error code = -104
Token unknown - line 6, char 15
(

the "(" is the one on the parameter list.

My Question:

Can't I use a Stored Procedure inside a view ? For what I can see the
answer is no. :-(

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.7 - Release Date: 01/03/2005