创建表? [英] Create Table?

查看:50
本文介绍了创建表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一张包含以下字段的表格; LName,FName和MName。还有

表中还有其他字段。我需要创建另一个表格,其中

这些字段组合为Trim([LName]&""& [FName]&""& [MName])。我可以如何创建这张桌子?


提前致谢...

GCM

Hi,

I have a table that has the following fields; LName, FName and MName. Also
there are other fields in the table. I need to create another table with
those fields combined as "Trim([LName] & " " & [FName] & " " & [MName]). How
can I create this table?

Thanks in advance...
GCM

推荐答案

GCM写道:
GCM wrote:




我有一张桌子具有以下字段; LName,FName和MName。

表中还有其他字段。我需要创建另一个

表,其中这些字段合并为Trim([LName]&""& [FName]&"

" ;& [MName])。我怎样才能创建这张桌子?


提前致谢...

GCM
Hi,

I have a table that has the following fields; LName, FName and MName.
Also there are other fields in the table. I need to create another
table with those fields combined as "Trim([LName] & " " & [FName] & "
" & [MName]). How can I create this table?

Thanks in advance...
GCM



SELECT(Trim(LName)&''''& Trim(FName)&''''& Trim(MName))AS FullName

INTO NewTable

FROM ExistingTable

WHERE ...


SELECT (Trim(LName) & '' '' & Trim(FName) & '' '' & Trim(MName)) AS FullName
INTO NewTable
FROM ExistingTable
WHERE ...


" DFS" < nospam@dfs_.com写在消息中

新闻:49 ******************* @ bignews6.bellsouth.net。 ..
"DFS" <nospam@dfs_.comwrote in message
news:49*******************@bignews6.bellsouth.net. ..

GCM写道:
GCM wrote:

>

我有一个表有以下字段; LName,FName和MName。
表中还有其他字段。我需要创建另一个表,其中这些字段组合为Trim([LName]&""& [FName]&"
"& [MName])。如何创建此表?

提前致谢...
GCM
>Hi,

I have a table that has the following fields; LName, FName and MName.
Also there are other fields in the table. I need to create another
table with those fields combined as "Trim([LName] & " " & [FName] & "
" & [MName]). How can I create this table?

Thanks in advance...
GCM




SELECT(Trim( LName)&''''& Trim(FName)&''''& Trim(MName))AS FullName

INTO NewTable

FROM ExistingTable

在哪里......



SELECT (Trim(LName) & '' '' & Trim(FName) & '' '' & Trim(MName)) AS FullName
INTO NewTable
FROM ExistingTable
WHERE ...



但为什么要这么麻烦?标准化系统会谨慎地存储名称

并在运行时在查询中连接。


基思。
www.keithwilby.com


DFS写道:
DFS wrote:

GCM写道:
GCM wrote:




我有一张桌子有以下领域; LName,FName和MName。

表中还有其他字段。我需要创建另一个

表,其中这些字段合并为Trim([LName]&""& [FName]&"

" ;& [MName])。我怎样才能创建这张桌子?


提前致谢...

GCM
Hi,

I have a table that has the following fields; LName, FName and MName.
Also there are other fields in the table. I need to create another
table with those fields combined as "Trim([LName] & " " & [FName] & "
" & [MName]). How can I create this table?

Thanks in advance...
GCM




SELECT(Trim(LName)&''''& Trim(FName)&''''& Trim(MName))AS FullName

INTO NewTable
FROM ExistingTable

WHERE ...



SELECT (Trim(LName) & '' '' & Trim(FName) & '' '' & Trim(MName)) AS FullName
INTO NewTable
FROM ExistingTable
WHERE ...



多年前SELECT(修剪(LName)&''''& ;修剪(FName)&''''&'修剪(MName))

可能会导致两个空格在某些情况下字段为空或保持

a零长度字符串。我不知道是否已经是这种情况了,但是这里已经多次讨论过

解决方案,如下所述:

http://groups.google.ca/group/comp.d...07ea4bc514ad10


其中Arvin写道:


"尝试:


= [Street1 ]& ("," + [Street2])& (",+ [Town])& ("," + [县])&

(",

" + [PostCode])


+运算符不会与null连接,而&运算符不会与null连接。将来。


无论如何,我和基思在一起想知道这张桌子是否是原来的海报作为你的查询的第一部分是否真的需要
br />
给出了新表格给出的所有内容。

Years ago SELECT (Trim(LName) & '' '' & Trim(FName) & '' '' & Trim(MName))
might result in two spaces in some cases where a field was null or held
a zero length string. I don''t know if that is the case anymore but a
solution has been discussed many times here as in:

http://groups.google.ca/group/comp.d...07ea4bc514ad10

where Arvin writes:

"Try:

=[Street1] & (", " + [Street2]) & (", " + [Town]) & (", " + [County]) &
(",
" + [PostCode])

The "+" operator will not concatenate with a null, while the "&" will."

Regardless, I am with Keith in wondering if creatig this table is
REALLY necessaryfor the original poster as the first part of your query
gives all that the new table gives.


这篇关于创建表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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