由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Codes Re: 求教: Join 两个query (data)
相关主题
Re: Recordset - I stuck! Help!ORACLE+VC产生巨大临时文件
aks a simple SQL question这句SQL怎么写?
请教关于下面这个sql code地解释can I create a recordset with cursor?
如何做到?不可不看access 2000 的问题,虚心请教!
can i ...?纪录查找问题
Any suggestion on Access database learning?[转载] ASP古怪问题
ADO & DAO &SQL...Help...Question about ADO's Recordset
Is "Dim mydb as database" a user-defined datatype问一个简单的Query
相关话题的讨论汇总
话题: dbo话题: hrpeople11话题: hrpeople话题: type
进入Database版参与讨论
1 (共1页)
w******i
发帖数: 1476
1
OK, the following are the source codes. Actually I think they make the
problems more complicated. Thanks a million for your help!
Subquery 1 (works right) -- name of "hr_contact_add"
function: produce the address list of the people
SELECT [dbo_HRPEOPLE11].[PERSON_ID], [dbo_HRPEOPLE11].[NAME_LAST],
[dbo_HRPEOPLE11].[NAME_FIRST], [dbo_HRPEOPLE11].[NAME_MIDDLE],
[dbo_HRPEOPLE11].[NAME_PREFERRED], [dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
[dbo_HRPEOPLE_ADDRESSES11].[ADR_STREET1],
[dbo_HRPEOPLE_ADDR
n****f
发帖数: 905
2
Which Field is you just added?
Are you sure that[hr_contact_add].[PERSON_ID]
and [hr_contact_phone].[PERSON_ID] are both UNIQUE ?

[dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
[dbo_HRPEOPLE_ADDRESSES11].[ADR_STATE],
((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

【在 w******i 的大作中提到】
: OK, the following are the source codes. Actually I think they make the
: problems more complicated. Thanks a million for your help!
: Subquery 1 (works right) -- name of "hr_contact_add"
: function: produce the address list of the people
: SELECT [dbo_HRPEOPLE11].[PERSON_ID], [dbo_HRPEOPLE11].[NAME_LAST],
: [dbo_HRPEOPLE11].[NAME_FIRST], [dbo_HRPEOPLE11].[NAME_MIDDLE],
: [dbo_HRPEOPLE11].[NAME_PREFERRED], [dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
: [dbo_HRPEOPLE_ADDRESSES11].[ADR_STREET1],
: [dbo_HRPEOPLE_ADDR

aw
发帖数: 127
3
Or ([dbo_HRPEOPLE11].[PRIMARY_PHONE_TYPE]=Null)
这是你TYPE的还是COPY来的,至少=NULL不对。

[dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
[dbo_HRPEOPLE_ADDRESSES11].[ADR_STATE],
((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

【在 w******i 的大作中提到】
: OK, the following are the source codes. Actually I think they make the
: problems more complicated. Thanks a million for your help!
: Subquery 1 (works right) -- name of "hr_contact_add"
: function: produce the address list of the people
: SELECT [dbo_HRPEOPLE11].[PERSON_ID], [dbo_HRPEOPLE11].[NAME_LAST],
: [dbo_HRPEOPLE11].[NAME_FIRST], [dbo_HRPEOPLE11].[NAME_MIDDLE],
: [dbo_HRPEOPLE11].[NAME_PREFERRED], [dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
: [dbo_HRPEOPLE_ADDRESSES11].[ADR_STREET1],
: [dbo_HRPEOPLE_ADDR

w******i
发帖数: 1476
4
I add "NAME_PREFERRED" in "hr_contact_add" table and the error message shows
up. I don't know whether it is exactly the problem. But yesterday this query
(Query 3) didn't give me any problem and I even used its results for another
two higher-level queries.
Yup, they are both unique since they are primary keys in their individual
tables.
Correct me if I were wrong here. thanks a lot!

((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T
([dbo_HRPEOPLE_PHONES11].[PHONE_TY

【在 n****f 的大作中提到】
: Which Field is you just added?
: Are you sure that[hr_contact_add].[PERSON_ID]
: and [hr_contact_phone].[PERSON_ID] are both UNIQUE ?
:
: [dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
: [dbo_HRPEOPLE_ADDRESSES11].[ADR_STATE],
: ((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

w******i
发帖数: 1476
5
COPY, what is wrong? "=Null" and "IS NULL" both work, I think...but
i didn't check the reference and wrote it days ago. it didn't give me the
wrong results, so... I will check it.
thanks!

((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T
([dbo_HRPEOPLE_PHONES11].[PHONE_TYPE]=[dbo_HRPEOPLE11].[PRIMARY_PHONE_TYPE])

【在 aw 的大作中提到】
: Or ([dbo_HRPEOPLE11].[PRIMARY_PHONE_TYPE]=Null)
: 这是你TYPE的还是COPY来的,至少=NULL不对。
:
: [dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE],
: [dbo_HRPEOPLE_ADDRESSES11].[ADR_STATE],
: ((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

aw
发帖数: 127
6
i don't know access, but = null is wrong in sql server.
another thing you can try is to copy the first table and remove the new
column, run the same query and see if it can work fine as before.

((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

【在 w******i 的大作中提到】
: COPY, what is wrong? "=Null" and "IS NULL" both work, I think...but
: i didn't check the reference and wrote it days ago. it didn't give me the
: wrong results, so... I will check it.
: thanks!
:
: ((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T
: ([dbo_HRPEOPLE_PHONES11].[PHONE_TYPE]=[dbo_HRPEOPLE11].[PRIMARY_PHONE_TYPE])

w******i
发帖数: 1476
7
i tried it and it could NOT work fine as b4...
the invalid operation msg shows as
"Invalid operation. (Error 3219)
Possible causes:
1. You tried to write to a read-only property. See the Help topic for the
property to determine whether it is read/write.
2. You tried to use a method or property on a type of Recordset object that
the method or property does not apply to. See the Recordset object summary
topic to determine which methods and properties apply to a given type of
Recordset object.
3. Y

【在 aw 的大作中提到】
: i don't know access, but = null is wrong in sql server.
: another thing you can try is to copy the first table and remove the new
: column, run the same query and see if it can work fine as before.
:
: ((([dbo_HRPEOPLE_ADDRESSES11].[ADDRESS_TYPE])=[dbo_HRPEOPLE11].[PRIMARY_MAIL_T

n****f
发帖数: 905
8
无依无系,
您如何发现这些错误信息的?
从SQL SERVER 还是您的 APPLICATION?
好象您是在运行某个应用程序是有错误.

that
the
the

【在 w******i 的大作中提到】
: i tried it and it could NOT work fine as b4...
: the invalid operation msg shows as
: "Invalid operation. (Error 3219)
: Possible causes:
: 1. You tried to write to a read-only property. See the Help topic for the
: property to determine whether it is read/write.
: 2. You tried to use a method or property on a type of Recordset object that
: the method or property does not apply to. See the Recordset object summary
: topic to determine which methods and properties apply to a given type of
: Recordset object.

w******i
发帖数: 1476
9
I run it from Access2000 (Query) SQL View. Should it be the application?
thanks!

that

【在 n****f 的大作中提到】
: 无依无系,
: 您如何发现这些错误信息的?
: 从SQL SERVER 还是您的 APPLICATION?
: 好象您是在运行某个应用程序是有错误.
:
: that
: the
: the

n****f
发帖数: 905
10

NO. 有没有可能发这个ACCESS文件给我?

【在 w******i 的大作中提到】
: I run it from Access2000 (Query) SQL View. Should it be the application?
: thanks!
:
: that

相关主题
Any suggestion on Access database learning?ORACLE+VC产生巨大临时文件
ADO & DAO &SQL...Help...这句SQL怎么写?
Is "Dim mydb as database" a user-defined datatypecan I create a recordset with cursor?
进入Database版参与讨论
aw
发帖数: 127
11
try to rebuild the queries.

the
summary
object
new
me

【在 w******i 的大作中提到】
: I run it from Access2000 (Query) SQL View. Should it be the application?
: thanks!
:
: that

w******i
发帖数: 1476
12
I am afraid I cannot do that. It is a protected file and it is beyond 20M. :(

【在 n****f 的大作中提到】
:
: NO. 有没有可能发这个ACCESS文件给我?

w******i
发帖数: 1476
13
i will do them tomorrow morning. thanks for your help.

of
"
think...but

【在 aw 的大作中提到】
: try to rebuild the queries.
:
: the
: summary
: object
: new
: me

n****f
发帖数: 905
14
We don't need the data.
You can send us the table structure with some fake rows.
So we can help you out.

【在 w******i 的大作中提到】
: I am afraid I cannot do that. It is a protected file and it is beyond 20M. :(
w******i
发帖数: 1476
15
Thanks! I tried another way to do the nested queries and the problem got
solved.

application?

【在 n****f 的大作中提到】
: We don't need the data.
: You can send us the table structure with some fake rows.
: So we can help you out.

1 (共1页)
进入Database版参与讨论
相关主题
问一个简单的Querycan i ...?
Help needed: MS Access 2000Any suggestion on Access database learning?
sql questionADO & DAO &SQL...Help...
Help on Oracle QueryIs "Dim mydb as database" a user-defined datatype
Re: Recordset - I stuck! Help!ORACLE+VC产生巨大临时文件
aks a simple SQL question这句SQL怎么写?
请教关于下面这个sql code地解释can I create a recordset with cursor?
如何做到?不可不看access 2000 的问题,虚心请教!
相关话题的讨论汇总
话题: dbo话题: hrpeople11话题: hrpeople话题: type