Stored Proc Issue


Author
Message
Geoff Hirst
Geoff Hirst
StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)StrataFrame User (323 reputation)
Group: Forum Members
Posts: 123, Visits: 3.5K
Chaps,

I have a stored proc, that returns the full contents of a table, some 21 columns. Now, I have no parameters on this proc, as I intend to use it for list population etc.

Thing is, it won't deploy. I get an error that says a problem occurred with a stored proc. A problem near the word 'SELECT'.

Now if I add

@ID int

AS

at the top of the proc, it deploys fine.

Proc is

Select ID,JobNo,ProjectName,WorkDescription,ClientID,ClientContact,ContactDetails,JobManager,JobArchitect,

JobType,ClientType,EnduserCLientType,SourceofWork,Timebased,FixedFee,PercentageValueOfProject,

ExpensesID,ProjectFee,EstimatedProjectValue,ProjectPercentage,ProjectFee2 from Job

If I replace the text with SELECT * from Job it also works fine.

Any Ideas chaps?

thanks

Geoff


Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, Peter is right, the AS is not optional, even without parameters.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search