# Database Discussions > Sybase >  passing a variable in a FROM clause

## David Callaghan

Friday, May 24, 2002
Hi, 
    I am hoping someone can help me.  I am using Sybase 11.9. I am trying to pass a variable in the FROM clause of a SELECT statement.  In Microsoft Sql Server 7.0 I can do this as follows:
declare 	@TABLE_NAME	VARCHAR(255),
		@MSG		VARCHAR(255)

SELECT 	@TABLE_NAME = &#39;account&#39;

SELECT 	@MSG = &#34;SELECT * FROM &#34; + @TABLE_NAME

EXEC 	(@MSG)
But this does not work for Sybase.  Thank you in advance or any help you can give me.

Regards,
David Callaghan

----------

