货币数据类型 [英] currency data type

查看:150
本文介绍了货币数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果[field] = null那么我有一个声明说


然后[field] = 0


将字段从可能的空值更改为0


该字段是一种类型货币,当它运行时它不会将其更改为0


我的计算需要消除字段的值,而且它们是无效的,因为它是空的。我可以稍后更改信息但是它在

a查询中并且不知道如何在以后更改。

-

消息发布通过AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200507/1

推荐答案

" Mark Carlyle通过AccessMonster.com < FO *** @ AccessMonster.com>写在

新闻:51 *********** @ AccessMonster.com:
"Mark Carlyle via AccessMonster.com" <fo***@AccessMonster.com> wrote in
news:51***********@AccessMonster.com:

我有一个声明,如果[field] = null然后[field] = 0
将字段从可能的null更改为0

该字段是一种类型的货币,当它运行时它不会改变为

我有计算需要解决该领域的价值和
他们将无法正常工作因为它是空的。我可以稍后更改信息
但它在查询中并且不知道如何在以后更改。

I have a statement that says

if [field]=null then [field]=0

to change the field from a possible null to a 0

the field is a type currency and when it runs it will not change it to
a 0

I have calculations that needs to work off the value of the field and
they will not work since it is a null. I could change the info later
but it is in a query and do not know how to do that later change.




没有字段是空的。 Null意味着未知,没有给出。它不是一个值。


Null不等于Null。没有什么等于Null。通常我们测试

Null,断言是Null。


我们不应该使用零作为null。零不是空的。对于Null使用零的
通常是有缺陷的。


GUI接受默认Null代替默认零缺乏严格。


***


但是


在你的计算中你可以使用:


Nz(Field,0)


您可以在Access / VBA帮助中查找Nz以了解它。



No field is a Null. Null means unknown, not given. It is not a value.

Null is not equal to Null. Nothing is equal to Null. Generally we test for
Null with the assertion Is Null.

We should not use zero for null. Zero is not Null. Mathemtical calculations
which use zero for Null are often flawed.

GUIs which accept default Null in place of default zero lack rigor.

***

But

In your calculations you could use:

Nz(Field, 0)

You could look up Nz in Access/VBA help to learn about it.


Mark Carlyle通过AccessMonster.com < FO *** @ AccessMonster.com>写在

新闻:51 *********** @ AccessMonster.com:
"Mark Carlyle via AccessMonster.com" <fo***@AccessMonster.com> wrote in
news:51***********@AccessMonster.com:

我有一个声明,如果[field] = null然后[field] = 0
将字段从可能的null更改为0

该字段是一种类型的货币,当它运行时它不会改变为

我有计算需要解决该领域的价值和
他们将无法正常工作因为它是空的。我可以稍后更改信息
但它在查询中并且不知道如何在以后更改。

I have a statement that says

if [field]=null then [field]=0

to change the field from a possible null to a 0

the field is a type currency and when it runs it will not change it to
a 0

I have calculations that needs to work off the value of the field and
they will not work since it is a null. I could change the info later
but it is in a query and do not know how to do that later change.




没有字段是空的。 Null意味着未知,没有给出。它不是一个值。


Null不等于Null。没有什么等于Null。通常我们测试

Null,断言是Null。


我们不应该使用零作为null。零不是空的。对于Null使用零的
通常是有缺陷的。


GUI接受默认Null代替默认零缺乏严格。


***


但是


在你的计算中你可以使用:


Nz(Field,0)


您可以在Access / VBA帮助中查找Nz以了解它。



No field is a Null. Null means unknown, not given. It is not a value.

Null is not equal to Null. Nothing is equal to Null. Generally we test for
Null with the assertion Is Null.

We should not use zero for null. Zero is not Null. Mathemtical calculations
which use zero for Null are often flawed.

GUIs which accept default Null in place of default zero lack rigor.

***

But

In your calculations you could use:

Nz(Field, 0)

You could look up Nz in Access/VBA help to learn about it.


2005年7月15日星期五17:34:25 GMT,Mark Carlyle来自AccessMonster.com

< fo *** @ AccessMonster.com>写道:
On Fri, 15 Jul 2005 17:34:25 GMT, "Mark Carlyle via AccessMonster.com"
<fo***@AccessMonster.com> wrote:

我有一个声明说

if [field] = null然后[field] = 0

将字段从可能的空值更改为0

该字段是一种类型货币,当它运行时它不会将其更改为0

我有计算这需要消除字段的价值,他们将无法工作,因为它是空的。我可以稍后更改信息,但它在
查询中,不知道以后如何更改。

-
通过AccessMonster.com发布的消息
http://www.accessmonster .com / Uwe / For ... ccess / 200507/1




在帮助中查找功能Nz。特别是如果x是
null则Nz(x,0)为零,否则等于x(在后一种情况下不确定类型)。


In尽管Lyle推荐Access将null视为一个值,但

将它与任何东西进行比较的特殊属性给出了

的答案为false,并使用特殊函数isnull()和(在SQL中)是

NULL。


理想情况下null不存在(!)但在外部无法避免
$例如,b $ b加入。



Look up the function Nz in help. In particular Nz(x,0) is zero if x is
null and equals x otherwise (not sure about types in the latter case).

In spite of what Lyle recommends Access treats null as a value, with
the special properties that comparing it with anything gives the
answer false, and with the special function isnull() and (in SQL) IS
NULL.

Ideally null wouldn''t exist (!) but it cannot be avoided in outer
joins, for example.


这篇关于货币数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆