CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Sql UPPER function

Print topic Send  topic

Author Message
Dante S.
Posted: 06/05/2002, 10:51 PM

Hello everyone.

I am using ASP 3.0 & template. I built two pages, a search page and a
result page (which is a grid). My search and result pages work correctly.
My question is how can I put and UPPER function in the where section of the
grid? I wanna know because sometimes the user inputs the search fields in
lower case letters or mixed case.

Hope someone can point me to a right solution.

Thanks,
Dante S.

RonB
Posted: 06/06/2002, 6:36 AM

Just put it into the sql statement.
"where UPPER(database_field) like UPPER('%{some_parameter}%') "
I think
Ron

"Dante S." <disandigan@loyolaplans.com> schreef in bericht
news:admt9c$395$1@news.codecharge.com...
> Hello everyone.
>
> I am using ASP 3.0 & template. I built two pages, a search page and a
> result page (which is a grid). My search and result pages work correctly.
> My question is how can I put and UPPER function in the where section of
the
> grid? I wanna know because sometimes the user inputs the search fields in
> lower case letters or mixed case.
>
> Hope someone can point me to a right solution.
>
> Thanks,
> Dante S.
>
>

Dante S.
Posted: 06/06/2002, 8:22 AM

Thanks Ron.

Upon further searching for a solution, I read that putting the UPPER
function in the where clause of an SQL statement is inefficient, especially
if the no. of records is large.

Is there a way of converting this field to uppercase and then send it as
parameter to the result grid page?

Thanks again,
Dante

"RonB" <r.borkent@123chello.nl> wrote in message
news:adnogk$nd8$1@news.codecharge.com...
> Just put it into the sql statement.
> "where UPPER(database_field) like UPPER('%{some_parameter}%') "
> I think
> Ron
>
> "Dante S." <disandigan@loyolaplans.com> schreef in bericht
>news:admt9c$395$1@news.codecharge.com...
> > Hello everyone.
> >
> > I am using ASP 3.0 & template. I built two pages, a search page and a
> > result page (which is a grid). My search and result pages work
correctly.
> > My question is how can I put and UPPER function in the where section of
> the
> > grid? I wanna know because sometimes the user inputs the search fields
in
> > lower case letters or mixed case.
> >
> > Hope someone can point me to a right solution.
> >
> > Thanks,
> > Dante S.
> >
> >
>
>

RonB
Posted: 06/06/2002, 8:56 AM

I dont think this would help. You want to make sure that results get back
in whatever way the user types in the keyword. this means you not only need
to convert the searchstring to upper but also the result set in wich the
query searches. Otherwise the search would look for "KEYWORD" in a resultset
that only contains "keyword" and would come up empty.
With mysql as a database you do not have to worry for speed, it is very
fast. Furthermore nothing works faster then your database, it saves data
from being transmitted to your server and having to be sorted there.

Ron

"Dante S." <disandigan@loyolaplans.com> schreef in bericht
news:adnums$4je$1@news.codecharge.com...
> Thanks Ron.
>
> Upon further searching for a solution, I read that putting the UPPER
> function in the where clause of an SQL statement is inefficient,
especially
> if the no. of records is large.
>
> Is there a way of converting this field to uppercase and then send it as
> parameter to the result grid page?
>
> Thanks again,
> Dante
>
> "RonB" <r.borkent@123chello.nl> wrote in message
>news:adnogk$nd8$1@news.codecharge.com...
> > Just put it into the sql statement.
> > "where UPPER(database_field) like UPPER('%{some_parameter}%') "
> > I think
> > Ron
> >
> > "Dante S." <disandigan@loyolaplans.com> schreef in bericht
> >news:admt9c$395$1@news.codecharge.com...
> > > Hello everyone.
> > >
> > > I am using ASP 3.0 & template. I built two pages, a search page and a
> > > result page (which is a grid). My search and result pages work
> correctly.
> > > My question is how can I put and UPPER function in the where section
of
> > the
> > > grid? I wanna know because sometimes the user inputs the search
fields
> in
> > > lower case letters or mixed case.
> > >
> > > Hope someone can point me to a right solution.
> > >
> > > Thanks,
> > > Dante S.
> > >
> > >
> >
> >
>
>

Dave Rexel
Posted: 06/06/2002, 9:32 AM

Dante,
Using the VBS
new_string=ucase(mixed_original_string)
and then testing for new_string in SQL
as per Rons tip
should save wear and tear on the DB server.

Greetings
Dave

"Dante S." <disandigan@loyolaplans.com> wrote in message
news:adnums$4je$1@news.codecharge.com...
> Thanks Ron.
>
> Upon further searching for a solution, I read that putting the UPPER
> function in the where clause of an SQL statement is inefficient,
especially
> if the no. of records is large.
>
> Is there a way of converting this field to uppercase and then send it as
> parameter to the result grid page?
>
> Thanks again,
> Dante
>
> "RonB" <r.borkent@123chello.nl> wrote in message
>news:adnogk$nd8$1@news.codecharge.com...
> > Just put it into the sql statement.
> > "where UPPER(database_field) like UPPER('%{some_parameter}%') "
> > I think
> > Ron
> >
> > "Dante S." <disandigan@loyolaplans.com> schreef in bericht
> >news:admt9c$395$1@news.codecharge.com...
> > > Hello everyone.
> > >
> > > I am using ASP 3.0 & template. I built two pages, a search page and a
> > > result page (which is a grid). My search and result pages work
> correctly.
> > > My question is how can I put and UPPER function in the where section
of
> > the
> > > grid? I wanna know because sometimes the user inputs the search
fields
> in
> > > lower case letters or mixed case.
> > >
> > > Hope someone can point me to a right solution.
> > >
> > > Thanks,
> > > Dante S.
> > >
> > >
> >
> >
>
>

Dante S.
Posted: 06/06/2002, 9:36 AM

Hello again Ron and thanks for the explanation.

I forgot to tell you that the result set that the query searches are in
ALLCAPS/UPPERCASE so there's no need to convert the result set. What I'm
figuring out is how to convert the searchstring to uppercase and include it
in the url parameter for the grid page. I hope i'm more clear right now.

- Dante


"RonB" <r.borkent@123chello.nl> wrote in message
news:ado0n3$8lh$1@news.codecharge.com...
> I dont think this would help. You want to make sure that results get back
> in whatever way the user types in the keyword. this means you not only
need
> to convert the searchstring to upper but also the result set in wich the
> query searches. Otherwise the search would look for "KEYWORD" in a
resultset
> that only contains "keyword" and would come up empty.
> With mysql as a database you do not have to worry for speed, it is very
> fast. Furthermore nothing works faster then your database, it saves data
> from being transmitted to your server and having to be sorted there.
>
> Ron


Dave Rexel
Posted: 06/06/2002, 10:02 AM

Hi there Dante
I found the function in CCS help
CCRegExpTest(TestValue, RegExpMask, IgnoreCase, GlobalTest)
The IgnoreCase is the useful bit for you.

The functions and other programmatic gadgets in CCS have me in a sort of
trance.
Haven't stopped reading the help file for days
Hope this is better help
Dave

"Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
news:ado2rl$d15$1@news.codecharge.com...
> Dante,
> Using the VBS
> new_string=ucase(mixed_original_string)
> and then testing for new_string in SQL
> as per Rons tip
> should save wear and tear on the DB server.
>
> Greetings
> Dave
>
> "Dante S." <disandigan@loyolaplans.com> wrote in message
>news:adnums$4je$1@news.codecharge.com...
> > Thanks Ron.
> >
> > Upon further searching for a solution, I read that putting the UPPER
> > function in the where clause of an SQL statement is inefficient,
> especially
> > if the no. of records is large.
> >
> > Is there a way of converting this field to uppercase and then send it as
> > parameter to the result grid page?
> >
> > Thanks again,
> > Dante
> >
> > "RonB" <r.borkent@123chello.nl> wrote in message
> >news:adnogk$nd8$1@news.codecharge.com...
> > > Just put it into the sql statement.
> > > "where UPPER(database_field) like UPPER('%{some_parameter}%') "
> > > I think
> > > Ron
> > >
> > > "Dante S." <disandigan@loyolaplans.com> schreef in bericht
> > >news:admt9c$395$1@news.codecharge.com...
> > > > Hello everyone.
> > > >
> > > > I am using ASP 3.0 & template. I built two pages, a search page and
a
> > > > result page (which is a grid). My search and result pages work
> > correctly.
> > > > My question is how can I put and UPPER function in the where section
> of
> > > the
> > > > grid? I wanna know because sometimes the user inputs the search
> fields
> > in
> > > > lower case letters or mixed case.
> > > >
> > > > Hope someone can point me to a right solution.
> > > >
> > > > Thanks,
> > > > Dante S.
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Shawn Mason
Posted: 06/06/2002, 11:26 AM

> Haven't stopped reading the help file for days <

Have you printed out a "bathroom" copy yet? <vbg>

Shawn Mason


Dave Rexel
Posted: 06/06/2002, 11:42 AM

LOL
print? how primitive...
how about PDF on PDA
works in the dark!
;-)

"Shawn Mason" <shawn@issda.com> wrote in message
news:ado9ha$qcr$1@news.codecharge.com...
> > Haven't stopped reading the help file for days <
>
> Have you printed out a "bathroom" copy yet? <vbg>
>
> Shawn Mason
>
>
>

RonB
Posted: 06/06/2002, 2:17 PM

Hi,

still think you should let the database do that for you, it is faster then
any asp or php function and saves webserver resources so something like:
select bla from blabla where searchfield like upper('%{searchparameter}%')
Also: now the only thing being converted is the search parameter so the
argument of things getting slower wouldn't be valid anyway because the
database doesn't have to convert many rows but only the one parameter. It is
also a lot less work then coding some event function :-)

Ron

"Dante S." <disandigan@loyolaplans.com> schreef in bericht
news:ado31t$dbk$1@news.codecharge.com...
> Hello again Ron and thanks for the explanation.
>
> I forgot to tell you that the result set that the query searches are in
> ALLCAPS/UPPERCASE so there's no need to convert the result set. What I'm
> figuring out is how to convert the searchstring to uppercase and include
it
> in the url parameter for the grid page. I hope i'm more clear right now.
>
> - Dante
>
>
> "RonB" <r.borkent@123chello.nl> wrote in message
>news:ado0n3$8lh$1@news.codecharge.com...
> > I dont think this would help. You want to make sure that results get
back
> > in whatever way the user types in the keyword. this means you not only
> need
> > to convert the searchstring to upper but also the result set in wich the
> > query searches. Otherwise the search would look for "KEYWORD" in a
> resultset
> > that only contains "keyword" and would come up empty.
> > With mysql as a database you do not have to worry for speed, it is very
> > fast. Furthermore nothing works faster then your database, it saves data
> > from being transmitted to your server and having to be sorted there.
> >
> > Ron
>
>
>

Dante S.
Posted: 06/06/2002, 6:00 PM

Wow! Thanks to all of you for the help. Will try to combine all your
suggestions.

Best regards,
Dante

"Shawn Mason" <shawn@issda.com> wrote in message
news:ado9ha$qcr$1@news.codecharge.com...
> > Haven't stopped reading the help file for days <
>
> Have you printed out a "bathroom" copy yet? <vbg>
>
> Shawn Mason
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.