Reply to Re: change of value at the time of insertion

Your name:

Reply:


Posted by DickChristoph on 10/01/72 11:42

Hi Lucky

A column of type bit can hold the values 0 or 1. Depending on the client
side programming language it may interpret 0 as false and 1 as true. For
example in VB.Net you could bind this to a boolean (logical) field in a
ADO.Net datatable.

Within T-sql you could say:

select item, case when state = 0 then 'false' else 'true' end as state1
from test10

But in this case, from an application's (such as one written in VB.Net)
point of view the 'true' or 'false' returned are character strings not
boolean (logical) values.

--
-Dick Christoph
"lucky" <j.v.s.s.baba@gmail.com> wrote in message
news:1142488231.981434.27360@p10g2000cwp.googlegroups.com...
> Hai,
> Here is a query that i am creating a table
>
> create table test10 (item varchar(10),state bit)
>
>
> now at the time of insertion i will enter like this
>
>
> insert into test10 values ('book' ,1)
>
>
> but at the time of display in the table i want
>
>
> item state
> book true
>
>
> from above i want to ask that when i am going to insert 1 i want to
> get true and 0 as false.I never enter true or false in the insert
> command. please help me in coding.
> thankyou,
> lucky.
>
>
> Reply
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация