By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,052 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,052 IT Pros & Developers. It's quick & easy.

Error in executing a SQL stored procedure

P: 3
I get this error:
Line 1: Incorrect syntax near '.'

when executing my stored procedure:

@Func VarChar(100)

DECLARE @SQL VarChar(100)

SET @SQL = 'SELECT DISTINCT dbo.ResultSummary.TestName FROM dbo.ResultSummary, dbo.SuiteNameHierarchy' /*WHERE dbo.SuiteNameHierarchy.[Function] LIKE @Func'*/

SET @SQL = @SQL + 'WHERE dbo.SuiteNameHierarchy.[Function] LIKE @Func'


Any help?
Nov 1 '07 #1
Share this Question
Share on Google+
4 Replies

Expert 2.5K+
P: 3,405
What language is this? The ASP forum is for classic ASP and VBScript questions. Let me know, and I will move your post where it belongs.

Nov 2 '07 #2

P: 3
This is a SQL stored procedure for my ASP project. It is related to ASP, isnt it?
Nov 2 '07 #3

Expert 2.5K+
P: 3,405
This is a SQL stored procedure for my ASP project. It is related to ASP, isnt it?
Oh, I see. I just assumed since the code you posted wasn't ASP and ASP wasn't mentioned in the post that you had stumbled into the wrong forum. I don't like using stored procedures since I'm better with ASP than I am with SQL, but how about posting your procedure call?

Nov 3 '07 #4

P: 3
Never mind. I know where the error is. @SQL is declared as Varchar(100) and my query had more than 100 characters! :-)
Nov 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.