query returning empty row

query returning empty row

am 17.01.2010 10:00:51 von bharani kumar

--001636e0a70f38e0cc047d58790f
Content-Type: text/plain; charset=ISO-8859-1

SELECT updateDate,cHospital,cHospital1,cHospital2 FROM med_patient WHERE
cCurstatus!='completed' AND cMmrcashworker = '2' AND
(cHospital = '1234' OR cHospital1 = '1234' OR cHospital2 ='1234') AND
updateDate between '2010-01-01' and '2010-01-28' order by id desc

I have one patient entry,and his updateDate is 2010-01-17 ,

but my above query return empty row , Why ?


( Note --> my updateDate field is varchar type)



Thanks

--001636e0a70f38e0cc047d58790f--

Re: query returning empty row

am 18.01.2010 01:36:48 von Dan Nelson

In the last episode (Jan 17), bharani kumar said:
> SELECT updateDate,cHospital,cHospital1,cHospital2 FROM med_patient WHERE
> cCurstatus!='completed' AND cMmrcashworker = '2' AND
> (cHospital = '1234' OR cHospital1 = '1234' OR cHospital2 ='1234') AND
> updateDate between '2010-01-01' and '2010-01-28' order by id desc
>
> I have one patient entry,and his updateDate is 2010-01-17 ,
>
> but my above query return empty row , Why ?
>
> ( Note --> my updateDate field is varchar type)

Perhaps his hospital ID is not 1234, or cMmrcashworker is not 2, or
cCurstatus = 'complete'. Try

SELECT updateDate,cCurstatus,cMmrcashworker,cHospital,cHospital1,cH ospital2
FROM med_patient WHERE updateDate between '2010-01-01' and '2010-01-28'
order by id desc

and verify that the other fields in your WHERE clause have the values you
think they do.

--
Dan Nelson
dnelson@allantgroup.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: query returning empty row

am 18.01.2010 04:13:10 von bharani kumar

--001636e0a6ecad3aa9047d67bbfb
Content-Type: text/plain; charset=ISO-8859-1

thanks for reply, problem fixed,



On Mon, Jan 18, 2010 at 6:06 AM, Dan Nelson wrote:

> In the last episode (Jan 17), bharani kumar said:
> > SELECT updateDate,cHospital,cHospital1,cHospital2 FROM med_patient WHERE
> > cCurstatus!='completed' AND cMmrcashworker = '2' AND
> > (cHospital = '1234' OR cHospital1 = '1234' OR cHospital2 ='1234') AND
> > updateDate between '2010-01-01' and '2010-01-28' order by id desc
> >
> > I have one patient entry,and his updateDate is 2010-01-17 ,
> >
> > but my above query return empty row , Why ?
> >
> > ( Note --> my updateDate field is varchar type)
>
> Perhaps his hospital ID is not 1234, or cMmrcashworker is not 2, or
> cCurstatus = 'complete'. Try
>
> SELECT
> updateDate,cCurstatus,cMmrcashworker,cHospital,cHospital1,cH ospital2
> FROM med_patient WHERE updateDate between '2010-01-01' and '2010-01-28'
> order by id desc
>
> and verify that the other fields in your WHERE clause have the values you
> think they do.
>
> --
> Dan Nelson
> dnelson@allantgroup.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=bharanikumariyerphp@gmail .com
>
>


--
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/

--001636e0a6ecad3aa9047d67bbfb--

Regarding storing non-english chars in mysql

am 18.01.2010 08:31:54 von Ningappa Koneri

Dear all,

I have a problem in migrating a GUI app(displays multi lingual data like Ar=
abic) which currently uses oracle as backend db to mysql (5.1). Currenly in=
oracle I am using NVARCHAR datatype to store the Arabic chars. How do I in=
corporate the same functionality in mysql ? I have tried a sample servlet/j=
sp to insert the arabic chars into mysql by creating a table having two col=
umns of NATIONAL VARCHAR type, but it's not displaying Arabic chars instead=
only questions marks are there.

One more thing in sample example is that before inserting I am converting t=
o UTF-8.

Regards,
Ningappa Koneri
mLifestyle | www.comviva.com


This e-mail and all material transmitted with it are for the use of the int=
ended recipient(s) ONLY and contains confidential and/or privileged informa=
tion. If you are not the intended recipient, please contact the sender by r=
eply e-mail and destroy all copies and the original message. Any unauthoriz=
ed review, use, disclosure, dissemination, forwarding, printing or copying =
of this email or any action taken pursuant to the contents of the present e=
-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its managem=
ent or directors, are unable to exercise control or ensure the integrity ov=
er /of the contents of the information contained in e-mail. Any views expre=
ssed herein are those of the individual sender only and no binding nature o=
f the contents shall be implied or assumed unless the sender does so expres=
sly with due authority of Comviva Technologies Limited. E-mail and any cont=
ents transmitted with it are prone to viruses and related defects despite a=
ll efforts to avoid such by Comviva Technologies Limited.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

RE: Regarding storing non-english chars in mysql

am 18.01.2010 20:44:20 von Gavin Towey

http://dev.mysql.com/doc/refman/5.0/en/charset.html


-----Original Message-----
From: Ningappa Koneri [mailto:ningappa.koneri@comviva.com]
Sent: Sunday, January 17, 2010 11:32 PM
To: mysql@lists.mysql.com
Subject: Regarding storing non-english chars in mysql

Dear all,

I have a problem in migrating a GUI app(displays multi lingual data like Ar=
abic) which currently uses oracle as backend db to mysql (5.1). Currenly in=
oracle I am using NVARCHAR datatype to store the Arabic chars. How do I in=
corporate the same functionality in mysql ? I have tried a sample servlet/j=
sp to insert the arabic chars into mysql by creating a table having two col=
umns of NATIONAL VARCHAR type, but it's not displaying Arabic chars instead=
only questions marks are there.

One more thing in sample example is that before inserting I am converting t=
o UTF-8.

Regards,
Ningappa Koneri
mLifestyle | www.comviva.com


This e-mail and all material transmitted with it are for the use of the int=
ended recipient(s) ONLY and contains confidential and/or privileged informa=
tion. If you are not the intended recipient, please contact the sender by r=
eply e-mail and destroy all copies and the original message. Any unauthoriz=
ed review, use, disclosure, dissemination, forwarding, printing or copying =
of this email or any action taken pursuant to the contents of the present e=
-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its managem=
ent or directors, are unable to exercise control or ensure the integrity ov=
er /of the contents of the information contained in e-mail. Any views expre=
ssed herein are those of the individual sender only and no binding nature o=
f the contents shall be implied or assumed unless the sender does so expres=
sly with due authority of Comviva Technologies Limited. E-mail and any cont=
ents transmitted with it are prone to viruses and related defects despite a=
ll efforts to avoid such by Comviva Technologies Limited.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgtowey@ffn.com


This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089,=
USA, FriendFinder.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Regarding storing non-english chars in mysql

am 18.01.2010 22:05:06 von Tom Worster

you can specify the character encoding (called CHARSET in mysql) and
collation on a per column, per table or per database level. e.g.

CREATE DATABASE foo CHARACTER SET utf8 COLLATE utf8_general_ci;

or

CREATE TABLE foo ( ... ) CHARACTER SET utf8 COLLATE utf8_general_ci;

or

CREATE TABLE foo (
bar varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL);

mysql's default character encoding is latin1.

for mysql's collations, see: http://www.collation-charts.org/

i wouldn't use utf8 indiscriminately, only for columns that need it --
indexes need 3 bytes per character on utf8 columns. (utf16 would be better
in that regard!)

don't forget to set session system variables, e.g. using SET NAMES or with
your api.


On 1/18/10 2:44 PM, "Gavin Towey" wrote:

> http://dev.mysql.com/doc/refman/5.0/en/charset.html
>
>
> -----Original Message-----
> From: Ningappa Koneri [mailto:ningappa.koneri@comviva.com]
> Sent: Sunday, January 17, 2010 11:32 PM
> To: mysql@lists.mysql.com
> Subject: Regarding storing non-english chars in mysql
>
> Dear all,
>
> I have a problem in migrating a GUI app(displays multi lingual data like
> Arabic) which currently uses oracle as backend db to mysql (5.1). Currenly in
> oracle I am using NVARCHAR datatype to store the Arabic chars. How do I
> incorporate the same functionality in mysql ? I have tried a sample
> servlet/jsp to insert the arabic chars into mysql by creating a table having
> two columns of NATIONAL VARCHAR type, but it's not displaying Arabic chars
> instead only questions marks are there.
>
> One more thing in sample example is that before inserting I am converting to
> UTF-8.
>
> Regards,
> Ningappa Koneri
> mLifestyle | www.comviva.com
>
>
> This e-mail and all material transmitted with it are for the use of the
> intended recipient(s) ONLY and contains confidential and/or privileged
> information. If you are not the intended recipient, please contact the sender
> by reply e-mail and destroy all copies and the original message. Any
> unauthorized review, use, disclosure, dissemination, forwarding, printing or
> copying of this email or any action taken pursuant to the contents of the
> present e-mail is strictly prohibited and is unlawful.
> The recipient acknowledges that Comviva Technologies Limited or its management
> or directors, are unable to exercise control or ensure the integrity over /of
> the contents of the information contained in e-mail. Any views expressed
> herein are those of the individual sender only and no binding nature of the
> contents shall be implied or assumed unless the sender does so expressly with
> due authority of Comviva Technologies Limited. E-mail and any contents
> transmitted with it are prone to viruses and related defects despite all
> efforts to avoid such by Comviva Technologies Limited.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=gtowey@ffn.com
>
>
> This message contains confidential information and is intended only for the
> individual named. If you are not the named addressee, you are notified that
> reviewing, disseminating, disclosing, copying or distributing this e-mail is
> strictly prohibited. Please notify the sender immediately by e-mail if you
> have received this e-mail by mistake and delete this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or contain viruses. The sender therefore does not accept liability
> for any loss or damage caused by viruses or errors or omissions in the
> contents of this message, which arise as a result of e-mail transmission.
> [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA,
> FriendFinder.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=fsb@thefsb.org
>



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: Regarding storing non-english chars in mysql

am 19.01.2010 08:19:34 von Ningappa Koneri

Solved... :)

What I did is:
1.I changed the selected columns charset to utf8 but other columns, table a=
nd database where using default charset.
2.Before doing a simple insert of parameters received from browser into mys=
ql, I executed "set names 'utf8'" on the same connection and again while se=
lecting as well.
3.It worked even after removing tag from the head tag as well <-- pl=
z through some light y it got displayed at the browser ?


@fsb thanks a lot for ur valuable i/p
@Gavin I wrote my stub refering to that link only cheers!

Regards,
Ningappa Koneri
mLifestyle | www.comviva.com



-----Original Message-----
From: fsb [mailto:fsb@thefsb.org]
Sent: Tuesday, January 19, 2010 2:35 AM
To: Ningappa Koneri; mysql@lists.mysql.com
Subject: Re: Regarding storing non-english chars in mysql

you can specify the character encoding (called CHARSET in mysql) and
collation on a per column, per table or per database level. e.g.

CREATE DATABASE foo CHARACTER SET utf8 COLLATE utf8_general_ci;

or

CREATE TABLE foo ( ... ) CHARACTER SET utf8 COLLATE utf8_general_ci;

or

CREATE TABLE foo (
bar varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL);

mysql's default character encoding is latin1.

for mysql's collations, see: http://www.collation-charts.org/

i wouldn't use utf8 indiscriminately, only for columns that need it --
indexes need 3 bytes per character on utf8 columns. (utf16 would be better
in that regard!)

don't forget to set session system variables, e.g. using SET NAMES or with
your api.


On 1/18/10 2:44 PM, "Gavin Towey" wrote:

> http://dev.mysql.com/doc/refman/5.0/en/charset.html
>
>
> -----Original Message-----
> From: Ningappa Koneri [mailto:ningappa.koneri@comviva.com]
> Sent: Sunday, January 17, 2010 11:32 PM
> To: mysql@lists.mysql.com
> Subject: Regarding storing non-english chars in mysql
>
> Dear all,
>
> I have a problem in migrating a GUI app(displays multi lingual data like
> Arabic) which currently uses oracle as backend db to mysql (5.1). Currenl=
y in
> oracle I am using NVARCHAR datatype to store the Arabic chars. How do I
> incorporate the same functionality in mysql ? I have tried a sample
> servlet/jsp to insert the arabic chars into mysql by creating a table hav=
ing
> two columns of NATIONAL VARCHAR type, but it's not displaying Arabic char=
s
> instead only questions marks are there.
>
> One more thing in sample example is that before inserting I am converting=
to
> UTF-8.
>
> Regards,
> Ningappa Koneri
> mLifestyle | www.comviva.com
>
>
> This e-mail and all material transmitted with it are for the use of the
> intended recipient(s) ONLY and contains confidential and/or privileged
> information. If you are not the intended recipient, please contact the se=
nder
> by reply e-mail and destroy all copies and the original message. Any
> unauthorized review, use, disclosure, dissemination, forwarding, printing=
or
> copying of this email or any action taken pursuant to the contents of the
> present e-mail is strictly prohibited and is unlawful.
> The recipient acknowledges that Comviva Technologies Limited or its manag=
ement
> or directors, are unable to exercise control or ensure the integrity over=
/of
> the contents of the information contained in e-mail. Any views expressed
> herein are those of the individual sender only and no binding nature of t=
he
> contents shall be implied or assumed unless the sender does so expressly =
with
> due authority of Comviva Technologies Limited. E-mail and any contents
> transmitted with it are prone to viruses and related defects despite all
> efforts to avoid such by Comviva Technologies Limited.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgtowey@ffn.com
>
>
> This message contains confidential information and is intended only for t=
he
> individual named. If you are not the named addressee, you are notified t=
hat
> reviewing, disseminating, disclosing, copying or distributing this e-mail=
is
> strictly prohibited. Please notify the sender immediately by e-mail if y=
ou
> have received this e-mail by mistake and delete this e-mail from your sys=
tem.
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late=
or
> incomplete, or contain viruses. The sender therefore does not accept liab=
ility
> for any loss or damage caused by viruses or errors or omissions in the
> contents of this message, which arise as a result of e-mail transmission.
> [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA=
,
> FriendFinder.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dfsb@thefsb.org
>



This e-mail and all material transmitted with it are for the use of the int=
ended recipient(s) ONLY and contains confidential and/or privileged informa=
tion. If you are not the intended recipient, please contact the sender by r=
eply e-mail and destroy all copies and the original message. Any unauthoriz=
ed review, use, disclosure, dissemination, forwarding, printing or copying =
of this email or any action taken pursuant to the contents of the present e=
-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Comviva Technologies Limited or its managem=
ent or directors, are unable to exercise control or ensure the integrity ov=
er /of the contents of the information contained in e-mail. Any views expre=
ssed herein are those of the individual sender only and no binding nature o=
f the contents shall be implied or assumed unless the sender does so expres=
sly with due authority of Comviva Technologies Limited. E-mail and any cont=
ents transmitted with it are prone to viruses and related defects despite a=
ll efforts to avoid such by Comviva Technologies Limited.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Regarding storing non-english chars in mysql

am 19.01.2010 16:15:17 von Tom Worster

On 1/19/10 2:19 AM, "Ningappa Koneri" wrote:

> 3.It worked even after removing tag from the head tag as well <-- plz
> through some light y it got displayed at the browser ?

this is not a mysql question. but see:

http://www.w3.org/TR/1999/REC-html401-19991224/charset.html# h-5.2.2

the likelihood is that either your web server is sending a correct
Content-Type header or your web browser is choosing the right one either by
guesswork (eg http://www.mozilla.org/projects/intl/chardet.html) or by
confg/default.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: Regarding storing non-english chars in mysql

am 19.01.2010 18:01:45 von Jerry Schwartz

Another tidbit about this:

Windows-based browsers apparently translate between CP-1252 and UTF-8
automatically. This generally doesn't cause trouble, but it cost me a lot of
sweat and tears to figure out.

I never looked to see what *nix-based browsers do, I ran out of time and
energy.

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org