通过代码更改表中字段的数据类型 [英] Changing the data type of a field in a table thru code

查看:106
本文介绍了通过代码更改表中字段的数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我如何使用make table查询更改创建的表中字段的数据类型

?该字段是二进制文件,必须更改为文本。

在运行

make table查询时,是否有人知道如何指定字段类型?


谢谢,

Sven

解决方案

你不能改变数据的类型表中的字段。您必须使用您的更改创建一个新表

,加载数据并删除旧表。


-

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast

"彼得" < PE *** @ diel.co.za>在消息新闻中写道:br ********** @ ctb-nnrp2.saix.net ...

任何人都可以告诉我如何更改某个字段的数据类型使用make table查询创建表格?该字段是二进制文件,必须更改为文本。
交替有人知道如何在运行
生成表查询时指定字段类型吗?

谢谢, Sven



谢谢我的担心,但在sql语句中是否有任何方法可以指定

要添加到新表格中的字段的数据类型

Danny J. Lesandrini < DL ********* @ hotmail.com>在留言中写道

news:br *********** @ ID-82595.news.uni-berlin.de ...

你可以不要更改表中字段的数据类型。您必须使用您的更改创建
a新表,加载数据并删除旧表。

-
Danny J. Lesandrini
dl ********* @ hotmail.com
http://amazecreations.com/datafast

" Peter" < PE *** @ diel.co.za>在消息中写道



news:br ********** @ ctb-nnrp2.saix.net ...

有谁能告诉我如何更改使用make table查询创建的表
中字段的数据类型?该字段是二进制文件,必须更改为
文本。在运行
a make table查询时,还有人知道如何指定字段类型吗?

谢谢,
Sven




2003年12月10日星期三14:25:39 +0200,彼得 < PE *** @ diel.co.za>写道:

有人能告诉我如何使用make table查询更改创建的表中字段的数据类型吗?该字段是二进制文件,必须更改为文本。
交替有人知道如何在运行
make表查询时指定字段类型吗?




你需要在你的查询中改变它。


假设你的字段在表1中被称为bField,你的

"输出"字段可能类似于


sField:Str([Table1]。[bField])


我必须使用此转换数值来字符串和副词
$ b $反之亦然。


不知道它是否适合你的情况......

Tym


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~未经请求的电子邮件警告的nofollowhref =http://www.ictis.net/no_spam.htmltarget =_ blank> http://www.ictis.net/no_spam.html >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Can anyone tell me how to change the data type of a field in a table created
with a make table query? The field is a binary and must be changed to text.
alternately does anyone know how to specify the field type when running a
make table query?

Thanks,
Sven

解决方案

You can''t change the data type of a field in a table. You have to create a new table
with your changes, load the data and drop the old table.

--
Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
"Peter" <pe***@diel.co.za> wrote in message news:br**********@ctb-nnrp2.saix.net...

Can anyone tell me how to change the data type of a field in a table created
with a make table query? The field is a binary and must be changed to text.
alternately does anyone know how to specify the field type when running a
make table query?

Thanks,
Sven



Thanks I feared as much, but is there any way in a sql statement to specify
the data-types of the fields being added into a new table
"Danny J. Lesandrini" <dl*********@hotmail.com> wrote in message
news:br***********@ID-82595.news.uni-berlin.de...

You can''t change the data type of a field in a table. You have to create a new table with your changes, load the data and drop the old table.

--
Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
"Peter" <pe***@diel.co.za> wrote in message


news:br**********@ctb-nnrp2.saix.net...

Can anyone tell me how to change the data type of a field in a table created with a make table query? The field is a binary and must be changed to text. alternately does anyone know how to specify the field type when running a make table query?

Thanks,
Sven




On Wed, 10 Dec 2003 14:25:39 +0200, "Peter" <pe***@diel.co.za> wrote:

Can anyone tell me how to change the data type of a field in a table created
with a make table query? The field is a binary and must be changed to text.
alternately does anyone know how to specify the field type when running a
make table query?



You need to alter it in your Query.

Presuming that your field is called bField in table Table1, your
"output" field could be something like

sField: Str([Table1].[bField])

I have to use this converting numeric values to string ones , and vice
versa.

Don''t know if it will work with your case though...

Tym

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
See http://www.ictis.net/no_spam.html for unsolicited email warning
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~


这篇关于通过代码更改表中字段的数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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