RE: Help with sql needed
Posted in 2000
Topics: Transactions, Locking & Isolation, Platform-Specific Issues
% is used with LIKE
* is for MATCHES
The line could go:
and tkamx_project matches '*'
Although if that happens, it's more efficient just to leave off the line
altogether.
> -----Original Message-----
> From: Doug Agnew [SMTP:dagnew@charlottepipe.com]
> Sent: Thursday, August 31, 2000 1:24 PM
> To: informix-list@iiug.org
> Subject: Re: Help with sql needed
>
> Pardon my ignorance of isql, but in 'normal' SQL, I believe that '%' is
> the
> wildcard, not '*'.
>
> Doug
>
> "Tony!" <NoSpam@Thank.You.com> wrote in message
> news:O4uuOaTIPiPMbUWPcUiSnDEDLSd0@4ax.com...
> >
> > Informix Dynamic Server Version 7.30.UC8
> >
> > Using an aix shell script, I ask the user for a few pieces of
> > information to import into a table. I then pipe this into isql with an
> > "isql << !EOF!" block.
> > The table basically logs times of certain things that happen
> > overnight.
> > In this case, the upload that the startupl and stopupl fields refer to
> > could contain 1 or more, or all of the projects on a given night.
> > I would like the user to be able to enter something like "*" when
> > prompted for that field. When I do that though, it returns 0 rows
> > updated..
> > How can I modify the code below to update everything that matched the
> > calldte , site, and a wildcard for project? ??
> >
> > database development;> > lock table nightpost in exclusive mode;
> > update nightpost
> > set tkamx_startupl = '08:00',
> > tkamx_stopupl = '08:55'
> > where tkamx_calldte = "08/30/2000"
> > and tkamx_site = "47"
> > and tkamx_project = '*' ;
> > unlock table nightpost;
> >
> >
> > Thanks for any assistance!
> >
> > Tony!
> >
>
Thanks for the replies!
Was helpful :)
Tony! (The newbie)
On Thu, 31 Aug 2000 14:19:43 -0500, "Demus, Alan"
<demusa@hastings-ent.com> wrote:
>
>% is used with LIKE
>* is for MATCHES
>
>The line could go:
>and tkamx_project matches '*'
>
>Although if that happens, it's more efficient just to leave off the line
>altogether.
>
>
>> -----Original Message-----
>> From: Doug Agnew [SMTP:dagnew@charlottepipe.com]
>> Sent: Thursday, August 31, 2000 1:24 PM
>> To: informix-list@iiug.org
>> Subject: Re: Help with sql needed
>>
>> Pardon my ignorance of isql, but in 'normal' SQL, I believe that '%' is
>> the
>> wildcard, not '*'.
>>
>> Doug
>>
>> "Tony!" <NoSpam@Thank.You.com> wrote in message
>> news:O4uuOaTIPiPMbUWPcUiSnDEDLSd0@4ax.com...
>> >
>> > Informix Dynamic Server Version 7.30.UC8
>> >
>> > Using an aix shell script, I ask the user for a few pieces of
>> > information to import into a table. I then pipe this into isql with an
>> > "isql << !EOF!" block.
>> > The table basically logs times of certain things that happen
>> > overnight.
>> > In this case, the upload that the startupl and stopupl fields refer to
>> > could contain 1 or more, or all of the projects on a given night.
>> > I would like the user to be able to enter something like "*" when
>> > prompted for that field. When I do that though, it returns 0 rows
>> > updated..
>> > How can I modify the code below to update everything that matched the
>> > calldte , site, and a wildcard for project? ??
>> >
>> > database development;>> > lock table nightpost in exclusive mode;
>> > update nightpost
>> > set tkamx_startupl = '08:00',
>> > tkamx_stopupl = '08:55'
>> > where tkamx_calldte = "08/30/2000"
>> > and tkamx_site = "47"
>> > and tkamx_project = '*' ;
>> > unlock table nightpost;
>> >
>> >
>> > Thanks for any assistance!
>> >
>> > Tony!
>> >
>>