I have a column in a database. Let's say for this question it looks
like this:
tblFood.food
---------
"%apple%"
"%carrot%"
"%grape%"
"%chicken%"
Now if I wanted to find out if there is a particular food in a string,
I can make a query like this:
select food from tblFood where "apple casserole and chicken delight"
like food;
Now I know that this string has an apple instance and a chicken
instance.
But what if I have something like "apple pie with apple salmon"? I
want to know not only if a column is like tblFood.food, but how many
times it matched. Is there a way to do this in mysql. I guess the
desired result set would be.
tblFood.food | num_of_matches
--------- | ---------
%apple% | 2
Any ideas?
|
|
0
|
|
|
|
Reply
|
jasonwthompson (25)
|
9/7/2007 5:11:43 PM |
|
GameboyHippo wrote:
> I have a column in a database. Let's say for this question it looks
> like this:
>
> tblFood.food
> ---------
> "%apple%"
> "%carrot%"
> "%grape%"
> "%chicken%"
>
> Now if I wanted to find out if there is a particular food in a string,
> I can make a query like this:
>
> select food from tblFood where "apple casserole and chicken delight"
> like food;
>
> Now I know that this string has an apple instance and a chicken
> instance.
>
> But what if I have something like "apple pie with apple salmon"? I
> want to know not only if a column is like tblFood.food, but how many
> times it matched. Is there a way to do this in mysql. I guess the
> desired result set would be.
>
> tblFood.food | num_of_matches
> --------- | ---------
> %apple% | 2
>
> Any ideas?
Why are the % signs surrounding the ingredient?
|
|
0
|
|
|
|
Reply
|
Paul
|
9/7/2007 5:34:23 PM
|
|
Because that's the way the database I'm working on has it designed.
The %s basically allow someone to take a string and like it with an
entire column to find matches. I would have done it differently, but
code monkeys can't be choosers sometimes. The database I'm actually
working with does not use food at all, but it demonstrates what I'm
struggling with without actually giving any proprietary information
away.
On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
> GameboyHippo wrote:
> > I have a column in a database. Let's say for this question it looks
> > like this:
>
> > tblFood.food
> > ---------
> > "%apple%"
> > "%carrot%"
> > "%grape%"
> > "%chicken%"
>
> > Now if I wanted to find out if there is a particular food in a string,
> > I can make a query like this:
>
> > select food from tblFood where "apple casserole and chicken delight"
> > like food;
>
> > Now I know that this string has an apple instance and a chicken
> > instance.
>
> > But what if I have something like "apple pie with apple salmon"? I
> > want to know not only if a column is like tblFood.food, but how many
> > times it matched. Is there a way to do this in mysql. I guess the
> > desired result set would be.
>
> > tblFood.food | num_of_matches
> > --------- | ---------
> > %apple% | 2
>
> > Any ideas?
>
> Why are the % signs surrounding the ingredient?
|
|
0
|
|
|
|
Reply
|
GameboyHippo
|
9/7/2007 7:04:05 PM
|
|
GameboyHippo wrote:
> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
> wrote:
>> GameboyHippo wrote:
>>> I have a column in a database. Let's say for this question it looks
>>> like this:
>>
>>> tblFood.food
>>> ---------
>>> "%apple%"
>>> "%carrot%"
>>> "%grape%"
>>> "%chicken%"
>>
>>> Now if I wanted to find out if there is a particular food in a
>>> string, I can make a query like this:
>>
>>> select food from tblFood where "apple casserole and chicken delight"
>>> like food;
>>
>>> Now I know that this string has an apple instance and a chicken
>>> instance.
>>
>>> But what if I have something like "apple pie with apple salmon"? I
>>> want to know not only if a column is like tblFood.food, but how many
>>> times it matched. Is there a way to do this in mysql. I guess the
>>> desired result set would be.
>>
>>> tblFood.food | num_of_matches
>>> --------- | ---------
>>> %apple% | 2
>>
>>> Any ideas?
>>
>> Why are the % signs surrounding the ingredient?
> Because that's the way the database I'm working on has it designed.
> The %s basically allow someone to take a string and like it with an
> entire column to find matches. I would have done it differently, but
> code monkeys can't be choosers sometimes. The database I'm actually
> working with does not use food at all, but it demonstrates what I'm
> struggling with without actually giving any proprietary information
> away.
>
Please don't top post!
I'm not getting it. Please show an example of a query that does this.
|
|
0
|
|
|
|
Reply
|
Paul
|
9/7/2007 7:58:13 PM
|
|
Paul Lautman wrote:
> GameboyHippo wrote:
>> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
>> wrote:
>>> GameboyHippo wrote:
>>>> I have a column in a database. Let's say for this question it looks
>>>> like this:
>>>> tblFood.food
>>>> ---------
>>>> "%apple%"
>>>> "%carrot%"
>>>> "%grape%"
>>>> "%chicken%"
>>>> Now if I wanted to find out if there is a particular food in a
>>>> string, I can make a query like this:
>>>> select food from tblFood where "apple casserole and chicken delight"
>>>> like food;
>>>> Now I know that this string has an apple instance and a chicken
>>>> instance.
>>>> But what if I have something like "apple pie with apple salmon"? I
>>>> want to know not only if a column is like tblFood.food, but how many
>>>> times it matched. Is there a way to do this in mysql. I guess the
>>>> desired result set would be.
>>>> tblFood.food | num_of_matches
>>>> --------- | ---------
>>>> %apple% | 2
>>>> Any ideas?
>>> Why are the % signs surrounding the ingredient?
>> Because that's the way the database I'm working on has it designed.
>> The %s basically allow someone to take a string and like it with an
>> entire column to find matches. I would have done it differently, but
>> code monkeys can't be choosers sometimes. The database I'm actually
>> working with does not use food at all, but it demonstrates what I'm
>> struggling with without actually giving any proprietary information
>> away.
>>
> Please don't top post!
>
> I'm not getting it. Please show an example of a query that does this.
>
>
>
Hi, Paul,
He's has a little-used technique (maybe because it stinks) here.
For instance, if the table contained:
id food
1 applesauce
2 kumquats
3 carameled apples
4 tomatoes
You could use something like:
SELECT * FROM foods WHERE food like "%apple%"
which would return items 1 and 3
However, you can reverse the situation:
id food
1 %apple%
2 %tomato%
And get a match on id 1 with:
SELECT * from foods WHERE 'applesauce' like food
But proper design of the database negates the need for such a kludge.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|
|
0
|
|
|
|
Reply
|
Jerry
|
9/7/2007 8:49:22 PM
|
|
Jerry Stuckle wrote:
> Paul Lautman wrote:
>> GameboyHippo wrote:
>>> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
>>> wrote:
>>>> GameboyHippo wrote:
>>>>> I have a column in a database. Let's say for this question it
>>>>> looks like this:
>>>>> tblFood.food
>>>>> ---------
>>>>> "%apple%"
>>>>> "%carrot%"
>>>>> "%grape%"
>>>>> "%chicken%"
>>>>> Now if I wanted to find out if there is a particular food in a
>>>>> string, I can make a query like this:
>>>>> select food from tblFood where "apple casserole and chicken
>>>>> delight" like food;
>>>>> Now I know that this string has an apple instance and a chicken
>>>>> instance.
>>>>> But what if I have something like "apple pie with apple salmon"? I
>>>>> want to know not only if a column is like tblFood.food, but how
>>>>> many times it matched. Is there a way to do this in mysql. I
>>>>> guess the desired result set would be.
>>>>> tblFood.food | num_of_matches
>>>>> --------- | ---------
>>>>> %apple% | 2
>>>>> Any ideas?
>>>> Why are the % signs surrounding the ingredient?
>>> Because that's the way the database I'm working on has it designed.
>>> The %s basically allow someone to take a string and like it with an
>>> entire column to find matches. I would have done it differently,
>>> but code monkeys can't be choosers sometimes. The database I'm
>>> actually working with does not use food at all, but it demonstrates
>>> what I'm struggling with without actually giving any proprietary
>>> information away.
>>>
>> Please don't top post!
>>
>> I'm not getting it. Please show an example of a query that does this.
>>
>>
>>
>
> Hi, Paul,
>
> He's has a little-used technique (maybe because it stinks) here.
>
> For instance, if the table contained:
>
>
> id food
> 1 applesauce
> 2 kumquats
> 3 carameled apples
> 4 tomatoes
>
> You could use something like:
>
> SELECT * FROM foods WHERE food like "%apple%"
>
> which would return items 1 and 3
>
> However, you can reverse the situation:
>
> id food
> 1 %apple%
> 2 %tomato%
>
> And get a match on id 1 with:
>
> SELECT * from foods WHERE 'applesauce' like food
>
> But proper design of the database negates the need for such a kludge.
I did wonder if it would look lik that.
|
|
0
|
|
|
|
Reply
|
Paul
|
9/7/2007 9:17:42 PM
|
|
For the record, I did not design this database. :) Anyway, I found my
solution. It's a little unorthodox, but here it goes. (the
$foodString items are from my PHP code. You can replace this with a
string as long as all of the strings are the same throughout the
query.)
select food, ((length('$foodString')-
length(REPLACE(REPLACE(CONCAT('$foodString',food),food,''),
REPLACE(food,'%',''), '')))/(length(food) - 2)) foodcount from tblFood
where food like '$foodString';
Ack!!! Total confusion. But let me break it down for you all.
Basically I take a string like "applerific apple stuff" and place it
everywhere that you see $foodString. So I take its length and
subtract it with the length of it without the search string (I also
eliminated the % from the search string). The sum should equal the
amount of space that every instance of the search string takes up. So
I then divide the delta with the length of the search string (The -2
is due to the darn %s). That gives me the number of times that the
string appears. Now here's the tricky part. Mysql seems to retain
the replaced string for every row that it finds. So I concat it with
a row and then delete it. I'm sure that I'll delete only what I want
to thanks to those cursed %s. I hope this isn't too confusing.
Please note that this solution will only work on a problem very
similar to the one I was having.
On Sep 7, 3:49 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Paul Lautman wrote:
> > GameboyHippo wrote:
> >> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
> >> wrote:
> >>> GameboyHippo wrote:
> >>>> I have a column in a database. Let's say for this question it looks
> >>>> like this:
> >>>> tblFood.food
> >>>> ---------
> >>>> "%apple%"
> >>>> "%carrot%"
> >>>> "%grape%"
> >>>> "%chicken%"
> >>>> Now if I wanted to find out if there is a particular food in a
> >>>> string, I can make a query like this:
> >>>> select food from tblFood where "apple casserole and chicken delight"
> >>>> like food;
> >>>> Now I know that this string has an apple instance and a chicken
> >>>> instance.
> >>>> But what if I have something like "apple pie with apple salmon"? I
> >>>> want to know not only if a column is like tblFood.food, but how many
> >>>> times it matched. Is there a way to do this in mysql. I guess the
> >>>> desired result set would be.
> >>>> tblFood.food | num_of_matches
> >>>> --------- | ---------
> >>>> %apple% | 2
> >>>> Any ideas?
> >>> Why are the % signs surrounding the ingredient?
> >> Because that's the way the database I'm working on has it designed.
> >> The %s basically allow someone to take a string and like it with an
> >> entire column to find matches. I would have done it differently, but
> >> code monkeys can't be choosers sometimes. The database I'm actually
> >> working with does not use food at all, but it demonstrates what I'm
> >> struggling with without actually giving any proprietary information
> >> away.
>
> > Please don't top post!
>
> > I'm not getting it. Please show an example of a query that does this.
>
> Hi, Paul,
>
> He's has a little-used technique (maybe because it stinks) here.
>
> For instance, if the table contained:
>
> id food
> 1 applesauce
> 2 kumquats
> 3 carameled apples
> 4 tomatoes
>
> You could use something like:
>
> SELECT * FROM foods WHERE food like "%apple%"
>
> which would return items 1 and 3
>
> However, you can reverse the situation:
>
> id food
> 1 %apple%
> 2 %tomato%
>
> And get a match on id 1 with:
>
> SELECT * from foods WHERE 'applesauce' like food
>
> But proper design of the database negates the need for such a kludge.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
|
|
0
|
|
|
|
Reply
|
GameboyHippo
|
9/7/2007 9:18:08 PM
|
|
GameboyHippo wrote:
> On Sep 7, 3:49 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Paul Lautman wrote:
>>> GameboyHippo wrote:
>>>> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
>>>> wrote:
>>>>> GameboyHippo wrote:
>>>>>> I have a column in a database. Let's say for this question it looks
>>>>>> like this:
>>>>>> tblFood.food
>>>>>> ---------
>>>>>> "%apple%"
>>>>>> "%carrot%"
>>>>>> "%grape%"
>>>>>> "%chicken%"
>>>>>> Now if I wanted to find out if there is a particular food in a
>>>>>> string, I can make a query like this:
>>>>>> select food from tblFood where "apple casserole and chicken delight"
>>>>>> like food;
>>>>>> Now I know that this string has an apple instance and a chicken
>>>>>> instance.
>>>>>> But what if I have something like "apple pie with apple salmon"? I
>>>>>> want to know not only if a column is like tblFood.food, but how many
>>>>>> times it matched. Is there a way to do this in mysql. I guess the
>>>>>> desired result set would be.
>>>>>> tblFood.food | num_of_matches
>>>>>> --------- | ---------
>>>>>> %apple% | 2
>>>>>> Any ideas?
>>>>> Why are the % signs surrounding the ingredient?
>>>> Because that's the way the database I'm working on has it designed.
>>>> The %s basically allow someone to take a string and like it with an
>>>> entire column to find matches. I would have done it differently, but
>>>> code monkeys can't be choosers sometimes. The database I'm actually
>>>> working with does not use food at all, but it demonstrates what I'm
>>>> struggling with without actually giving any proprietary information
>>>> away.
>>> Please don't top post!
>>> I'm not getting it. Please show an example of a query that does this.
>> Hi, Paul,
>>
>> He's has a little-used technique (maybe because it stinks) here.
>>
>> For instance, if the table contained:
>>
>> id food
>> 1 applesauce
>> 2 kumquats
>> 3 carameled apples
>> 4 tomatoes
>>
>> You could use something like:
>>
>> SELECT * FROM foods WHERE food like "%apple%"
>>
>> which would return items 1 and 3
>>
>> However, you can reverse the situation:
>>
>> id food
>> 1 %apple%
>> 2 %tomato%
>>
>> And get a match on id 1 with:
>>
>> SELECT * from foods WHERE 'applesauce' like food
>>
>> But proper design of the database negates the need for such a kludge.
>>
> For the record, I did not design this database. :) Anyway, I found my
> solution. It's a little unorthodox, but here it goes. (the
> $foodString items are from my PHP code. You can replace this with a
> string as long as all of the strings are the same throughout the
> query.)
>
> select food, ((length('$foodString')-
> length(REPLACE(REPLACE(CONCAT('$foodString',food),food,''),
> REPLACE(food,'%',''), '')))/(length(food) - 2)) foodcount from tblFood
> where food like '$foodString';
>
> Ack!!! Total confusion. But let me break it down for you all.
>
> Basically I take a string like "applerific apple stuff" and place it
> everywhere that you see $foodString. So I take its length and
> subtract it with the length of it without the search string (I also
> eliminated the % from the search string). The sum should equal the
> amount of space that every instance of the search string takes up. So
> I then divide the delta with the length of the search string (The -2
> is due to the darn %s). That gives me the number of times that the
> string appears. Now here's the tricky part. Mysql seems to retain
> the replaced string for every row that it finds. So I concat it with
> a row and then delete it. I'm sure that I'll delete only what I want
> to thanks to those cursed %s. I hope this isn't too confusing.
> Please note that this solution will only work on a problem very
> similar to the one I was having.
>
(top posting fixed)
AAAAGH! I hope you never have to come back and troubleshoot that mess.
P.S. Please don't top post. Thanks.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|
|
0
|
|
|
|
Reply
|
Jerry
|
9/7/2007 9:58:47 PM
|
|
On Fri, 07 Sep 2007 12:04:05 -0700, GameboyHippo
<jasonwthompson@gmail.com> wrote:
>Because that's the way the database I'm working on has it designed.
>The %s basically allow someone to take a string and like it with an
>entire column to find matches. I would have done it differently, but
>code monkeys can't be choosers sometimes. The database I'm actually
>working with does not use food at all, but it demonstrates what I'm
>struggling with without actually giving any proprietary information
>away.
it's a very useful technique. It can be used to categorize an
items table according to a 'match' table. The match table
contains all kinds of patterns with '%' and '_' all over the
place, and provides the category to update the 'item' table.
Regards,
--
( Kees
)
c[_] Invalid thought detected. Close all
mental processes and restart body. (#409)
|
|
0
|
|
|
|
Reply
|
Kees
|
9/7/2007 11:04:53 PM
|
|
On 8 Sep, 00:04, Kees Nuyt <k.n...@nospam.demon.nl> wrote:
> On Fri, 07 Sep 2007 12:04:05 -0700, GameboyHippo
>
> <jasonwthomp...@gmail.com> wrote:
> >Because that's the way the database I'm working on has it designed.
> >The %s basically allow someone to take a string and like it with an
> >entire column to find matches. I would have done it differently, but
> >code monkeys can't be choosers sometimes. The database I'm actually
> >working with does not use food at all, but it demonstrates what I'm
> >struggling with without actually giving any proprietary information
> >away.
>
> it's a very useful technique. It can be used to categorize an
> items table according to a 'match' table. The match table
> contains all kinds of patterns with '%' and '_' all over the
> place, and provides the category to update the 'item' table.
>
> Regards,
> --
> ( Kees
> )
> c[_] Invalid thought detected. Close all
> mental processes and restart body. (#409)
http://www.artfulsoftware.com/infotree/queries.php#103 has this to say
about counting occurrences of one string inside another...
SET @str = "The quick brown fox jumped over the lazy dog";
SET @find = "the";
SELECT (LENGTH(@str) - LENGTH(REPLACE(LCASE(@str), @find, '')))/
LENGTH(@find) AS COUNT;
I guess you could create a stored procedure using this principle.
|
|
0
|
|
|
|
Reply
|
strawberry
|
9/8/2007 11:51:20 AM
|
|
On Sep 7, 4:58 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> GameboyHippo wrote:
> > On Sep 7, 3:49 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> Paul Lautman wrote:
> >>> GameboyHippo wrote:
> >>>> On Sep 7, 12:34 pm, "Paul Lautman" <paul.laut...@btinternet.com>
> >>>> wrote:
> >>>>> GameboyHippo wrote:
> >>>>>> I have a column in a database. Let's say for this question it looks
> >>>>>> like this:
> >>>>>> tblFood.food
> >>>>>> ---------
> >>>>>> "%apple%"
> >>>>>> "%carrot%"
> >>>>>> "%grape%"
> >>>>>> "%chicken%"
> >>>>>> Now if I wanted to find out if there is a particular food in a
> >>>>>> string, I can make a query like this:
> >>>>>> select food from tblFood where "apple casserole and chicken delight"
> >>>>>> like food;
> >>>>>> Now I know that this string has an apple instance and a chicken
> >>>>>> instance.
> >>>>>> But what if I have something like "apple pie with apple salmon"? I
> >>>>>> want to know not only if a column is like tblFood.food, but how many
> >>>>>> times it matched. Is there a way to do this in mysql. I guess the
> >>>>>> desired result set would be.
> >>>>>> tblFood.food | num_of_matches
> >>>>>> --------- | ---------
> >>>>>> %apple% | 2
> >>>>>> Any ideas?
> >>>>> Why are the % signs surrounding the ingredient?
> >>>> Because that's the way the database I'm working on has it designed.
> >>>> The %s basically allow someone to take a string and like it with an
> >>>> entire column to find matches. I would have done it differently, but
> >>>> code monkeys can't be choosers sometimes. The database I'm actually
> >>>> working with does not use food at all, but it demonstrates what I'm
> >>>> struggling with without actually giving any proprietary information
> >>>> away.
> >>> Please don't top post!
> >>> I'm not getting it. Please show an example of a query that does this.
> >> Hi, Paul,
>
> >> He's has a little-used technique (maybe because it stinks) here.
>
> >> For instance, if the table contained:
>
> >> id food
> >> 1 applesauce
> >> 2 kumquats
> >> 3 carameled apples
> >> 4 tomatoes
>
> >> You could use something like:
>
> >> SELECT * FROM foods WHERE food like "%apple%"
>
> >> which would return items 1 and 3
>
> >> However, you can reverse the situation:
>
> >> id food
> >> 1 %apple%
> >> 2 %tomato%
>
> >> And get a match on id 1 with:
>
> >> SELECT * from foods WHERE 'applesauce' like food
>
> >> But proper design of the database negates the need for such a kludge.
>
> > For the record, I did not design this database. :) Anyway, I found my
> > solution. It's a little unorthodox, but here it goes. (the
> > $foodString items are from my PHP code. You can replace this with a
> > string as long as all of the strings are the same throughout the
> > query.)
> >
> > select food, ((length('$foodString')-
> > length(REPLACE(REPLACE(CONCAT('$foodString',food),food,''),
> > REPLACE(food,'%',''), '')))/(length(food) - 2)) foodcount from tblFood
> > where food like '$foodString';
> >
> > Ack!!! Total confusion. But let me break it down for you all.
> >
> > Basically I take a string like "applerific apple stuff" and place it
> > everywhere that you see $foodString. So I take its length and
> > subtract it with the length of it without the search string (I also
> > eliminated the % from the search string). The sum should equal the
> > amount of space that every instance of the search string takes up. So
> > I then divide the delta with the length of the search string (The -2
> > is due to the darn %s). That gives me the number of times that the
> > string appears. Now here's the tricky part. Mysql seems to retain
> > the replaced string for every row that it finds. So I concat it with
> > a row and then delete it. I'm sure that I'll delete only what I want
> > to thanks to those cursed %s. I hope this isn't too confusing.
> > Please note that this solution will only work on a problem very
> > similar to the one I was having.
> >
>
> (top posting fixed)
>
> AAAAGH! I hope you never have to come back and troubleshoot that mess.
>
> P.S. Please don't top post. Thanks.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Not to sound ignorant, but what is this top posting that I'm guilty
of? I use groups.google.com to post in news groups. Is it how I post
or how I reply? I'm a little confused.
|
|
0
|
|
|
|
Reply
|
GameboyHippo
|
9/11/2007 8:15:45 PM
|
|
GameboyHippo <jasonwthompson@gmail.com> wrote in
news:1189541745.668093.216020@i13g2000prf.googlegroups.com:
>> P.S. Please don't top post. Thanks.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Not to sound ignorant, but what is this top posting that I'm guilty
> of? I use groups.google.com to post in news groups. Is it how I post
> or how I reply? I'm a little confused.
Top posting is when you type your response at the top of the message,
before all quoted elements.
You should post as you did now - after Jerry's quote. That way, people
can quickly get up to speed by reading all the quotes, *then* your new
response.
ie:
<old message info, point 1>
* your response *
<old message info, point 2>
* your response *
or
<old message info, point 1>
<old message info, point 2>
* your response to both *
..... just not:
* your response to both *
<old message info, point 1>
<old message info, point 2>
|
|
0
|
|
|
|
Reply
|
Good
|
9/11/2007 8:23:57 PM
|
|
|
11 Replies
218 Views
(page loaded in 0.216 seconds)
Similiar Articles: How many of one string in another - comp.databases.mysql ...I have a column in a database. Let's say for this question it looks like this: tblFood.food ----- "%apple%" "%carrot%" "%grape%" "%chicken%" No... How do I copy recordsets from one database table to another ...... forth is analogous to copying data from one file to another using the Copy file function rather than reading the entire contents of the file, converting the file string ... Helping combing into an array(?) numbers and characters - comp ...... and character data (letters) that I need to combine into one file for use in another ... of you for all your help ... if they appear in digit 1,2,3,4 ... character string ... Converting a cell array into a dataset - comp.soft-sys.matlab ...... names in the dataset, I basically have to do a replacedata into a new ... fetch: > data (R x C) - contains data with columns of doubles and strings > data_fields (C x 1 ... Relationship - finding one field based on value in another - comp ...Sum the value of all records in one field - comp.databases ... Count ... way of using a calculation field to tell me how many times a value ... Create a new relationship ... Some text processing questions - comp.lang.vhdlIf I say: vsr msg := string(1 to 5 ... constant names_mapping: string_array := (0 => "hi ", 1 => "bye "); Needless to say, this is ugly. Enlightened by a new ... String based hashCode - comp.lang.java.programmerEmployees from another building (building B)do not have employee ID's yet the ... characters total.>> Let's do some arithmetic.>> There is exactly one String ... How to concatenate two (mor more) commands on one line? - comp.os ...If you quote the command name and its arguments in one big string, it will look for an ... text.pdf ..... also the .NET port iTextSharp if you're more ... form to another ... vertical cell concatenation - comp.soft-sys.matlabhow do i concatenate all the strings in each column of a so i get a new cell that stores all the strings in it? example: new_cell = {{'a';'f';'c'} {'x'} {'b';'d'}} Iterating over a String - comp.lang.java.helpIt has bugged me that the for:each syntax would not let me write code of the form: String categories = "amq"; .... for ( char category: categori... How to count the number of unique entry of one field - comp ...Hi, I have one field that is not unique, How to define another field to count the number of unique entry. for example, have field Test, there are ... Passing data from one form to another - comp.lang.pascal.delphi ...The first from has an array >that I need to make available to the second form. This may also be the case >for another string variable. How do I pass this data ? Script to count occurrences - comp.unix.programmerOne way is awk '{c[$0 ... done I this fails if one IP address is a substring of another. ... be important when parsing strings in PHP, such as determining how many ... Show results in edit text GUI - comp.soft-sys.matlab... edit','string',v); > > us _____ Hi us, I found another solution: set(handles.edit4,'String',X ... Need to concatenate numeric values into one char value - comp.soft ...Help needed to Concatenate variables in SAS Dataset into a new ... Need to ... You need to ... into value labels for a numeric ... Concatenate string ... one char value ... How many of one string in another - comp.databases.mysql ...I have a column in a database. Let's say for this question it looks like this: tblFood.food ----- "%apple%" "%carrot%" "%grape%" "%chicken%" No... Count How Many Times a String Appears In Another String ...See Also: Main_Page - Transact SQL Code Library - String Manipulation Functions. Count appearance of a particular string within the outer string-- string manipulation ... 7/23/2012 4:14:59 PM
|