Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using a variable in sql query: WHERE, IN
Date: Thu, 15 Jan 2009 09:36:29 -0500
Organization: The MathWorks, Inc.
Lines: 25
Message-ID: <gknhld$isp$1@fred.mathworks.com>
References: <gf7aru$aq5$1@fred.mathworks.com> <7302393.1232016523112.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1232030189 19353 144.212.105.187 (15 Jan 2009 14:36:29 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 Jan 2009 14:36:29 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:511773



"pierca" <pierca85@gmail.com> wrote in message 
news:7302393.1232016523112.JavaMail.jakarta@nitrogen.mathforum.org...
> Hi all,
> It's my first post here and I don't speak english very well, hope you 
> understand!
> I have Vincent's same problem but if I try the following
>
>> num = 'IT001E082';
>> e = exec(conn,'SELECT * FROM Mytable WHERE "Pod No_" IN(',num,')' );
>
> written in a M file Matlab says that there are Too many input arguments I 
> think because it takes G as an argument of exec.
> Does anyone here have a solution or a suggestion?

You need to concatenate the strings.

x = 'world';
disp(['Hello ', x])

-- 
Steve Lord
slord@mathworks.com