Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using a variable in sql query: WHERE, IN
Date: Mon, 10 Nov 2008 16:44:02 +0000 (UTC)
Organization: Hoodiny Entertainment
Lines: 16
Message-ID: <gf9oci$l2i$1@fred.mathworks.com>
References: <gf7aru$aq5$1@fred.mathworks.com> <gf83si$4oq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226335442 21586 172.30.248.35 (10 Nov 2008 16:44:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Nov 2008 16:44:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1446252
Xref: news.mathworks.com comp.soft-sys.matlab:500006


Nick,

Thank you for the suggestion!!  Much appreciated! :)

Vince

> 
> Hi Vincent
> 
> Try the following:
> 
> G = '680';
> query =  ['SELECT * FROM mytable WHERE id IN (',G,')'];
> 
> Hope that helps,
> Nick