sql data type vs vb data type

sql data type vs vb data type

Post by webmoo » Wed, 12 Sep 2001 21:15:06



sql        vbscript
===================
bit        boolean
tinyint    byte
smallint   int
int        long
money      currency
bigint     ??????
 
 
 

sql data type vs vb data type

Post by Ilya Margoli » Wed, 12 Sep 2001 21:43:12


very long...


Quote:> sql        vbscript
> ===================
> bit        boolean
> tinyint    byte
> smallint   int
> int        long
> money      currency
> bigint     ??????


 
 
 

sql data type vs vb data type

Post by sloa » Fri, 14 Sep 2001 01:08:52


i think  a bit in sql is 0 or 1

i think a boolean in vb is 0 or -1

i use "small int" in sql for this reason.

and i always write my checks on boolean for

= 0

or

<> 0

(i never check for = to 1 or = to -1)

..


Quote:> sql        vbscript
> ===================
> bit        boolean
> tinyint    byte
> smallint   int
> int        long
> money      currency
> bigint     ??????

 
 
 

sql data type vs vb data type

Post by Joe Celk » Fri, 14 Sep 2001 01:51:33


Standard SQL does not have bit, byte, Boolean or currency datatypes  The first two are too low level and physical for a high level language.  Boolean makes a real mess in the SQL model because of NULLs and three value logic.  The diffrent national laws and  rules for computing with currencies varied too much to be part of a standard when the Standard was written.  

There are also subtle differences between FLOAT and REAL, and between NUMERIC and DECIMAL datatypes in SQL-92.  

Be careful about what you decide to use, if you want to get or receive data from outside sources.  

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, datatypes, etc. in your schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

sql data type vs vb data type

Post by Tibor Karasz » Fri, 14 Sep 2001 17:40:12


Joe, of course, refers to SQL-92.
It might be worth noticing that SQL:1999 has some of these datatypes: bit and boolean
(as I remember it).

--
Tibor Karaszi, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com


Standard SQL does not have bit, byte, Boolean or currency datatypes  The first two are
too low level and physical for a high level language.  Boolean makes a real mess in
the SQL model because of NULLs and three value logic.  The diffrent national laws and
rules for computing with currencies varied too much to be part of a standard when the
Standard was written.

There are also subtle differences between FLOAT and REAL, and between NUMERIC and
DECIMAL datatypes in SQL-92.

Be careful about what you decide to use, if you want to get or receive data from
outside sources.

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys, constraints,
Declarative Referential Integrity, datatypes, etc. in your schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!