﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Database Deployment Toolkit » Issues  » Stored Proc Issue</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:01:19 GMT</lastBuildDate><ttl>20</ttl><item><title>Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12876.aspx</link><description>Chaps,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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'.&lt;/P&gt;&lt;P&gt;Now if I add&lt;/P&gt;&lt;P&gt;@ID int&lt;/P&gt;&lt;P&gt;AS &lt;/P&gt;&lt;P&gt;at the top of the proc, it deploys fine.&lt;/P&gt;&lt;P&gt;Proc is&lt;/P&gt;&lt;FONT color=#0000ff size=1&gt;&lt;P&gt;Select&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#000000&gt; ID,&lt;/FONT&gt;JobNo,ProjectName,WorkDescription,ClientID,ClientContact,ContactDetails,JobManager,JobArchitect,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;JobType,ClientType,EnduserCLientType,SourceofWork,Timebased,FixedFee,PercentageValueOfProject,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;ExpensesID,ProjectFee,EstimatedProjectValue,ProjectPercentage,ProjectFee2 &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;from&lt;/FONT&gt;&lt;FONT size=1&gt; Job &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;If I replace the text with SELECT * from Job it also works fine.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;Any Ideas chaps?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;Geoff&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 06 Dec 2007 09:32:14 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12917.aspx</link><description>Hrm... that is strange.&amp;nbsp; I can't remember the code explicitly, but we might be trying to Regex off the AS on the front, and if we don't find one, we add it.&amp;nbsp; Maybe your sproc doesn't pass our Regex, so we can't find out that the AS is missing.&amp;nbsp; I can't remember. &lt;/P&gt;&lt;P&gt;However, if you posted an example sproc of one that deploys fine without the AS and one that requires the AS to deploy, then I might be able to figure something out.</description><pubDate>Thu, 06 Dec 2007 09:32:14 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12903.aspx</link><description>Chaps,&lt;/P&gt;&lt;P&gt;Thanks for this. Indeed in this case adding the 'AS' does resolve the issue. &lt;/P&gt;&lt;P&gt;What I do have though are other procedures in the DDT, that do not have the AS in the proc, but return only a small number of columns and they have deployed fine.&lt;/P&gt;&lt;P&gt;If you can replicate this I would be interested to know.&lt;/P&gt;&lt;P&gt;thanks Geoff</description><pubDate>Wed, 05 Dec 2007 04:54:18 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12887.aspx</link><description>Yep, Peter is right, the AS is not optional, even without parameters.</description><pubDate>Mon, 03 Dec 2007 09:02:11 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12886.aspx</link><description>Are you deploying through the DDT?&amp;nbsp; &lt;/P&gt;&lt;P&gt;If you are, then pay close attention to the labels of the Stored Procedure form... they list the code that will be executed when deploying the procedure...&lt;/P&gt;&lt;P&gt;After the "CreateProcedure" you would still need to place the AS keyword, event if you don't use any parameters.&amp;nbsp; So, the textbox would contain:&lt;/P&gt;&lt;P&gt;AS&lt;BR&gt;Select ID,JobNo,ProjectName,WorkDescription,ClientID,ClientContact,ContactDetails,JobManager,JobArchitect, JobType,ClientType,EnduserCLientType,SourceofWork,Timebased,FixedFee,PercentageValueOfProject, ExpensesID,ProjectFee,EstimatedProjectValue,ProjectPercentage,ProjectFee2 from Job</description><pubDate>Mon, 03 Dec 2007 09:01:34 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Stored Proc Issue</title><link>http://forum.strataframe.net/FindPost12877.aspx</link><description>Hi Geoff,&lt;/P&gt;&lt;P&gt;If don't think the AS is optional in a proc, e.g.&lt;/P&gt;&lt;P&gt;CREATE PROCEDURE dbo.myProc &lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM MyTable&lt;/P&gt;&lt;P&gt;GO&lt;BR&gt;&lt;/P&gt;&lt;P&gt;Maybe omitting the AS is causing the problem?&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Sun, 02 Dec 2007 20:06:25 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item></channel></rss>