不明确的列名称错误 [英] Ambiguous Column Names Error

查看:74
本文介绍了不明确的列名称错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试选择存储团聚ID的列的最大值,以便在以其他形式提交时始终可以传递该值。出勤,人名等



这里的代码是



Hi, I''m trying to select the Max of a column that stores an Id of reunions so it can pass that value always when submitting in other forms Attendance, names of people etc

Here''s the code

("SELECT MAX(ASAM_ID_ASAMBLEA) AS ASAM_ID_ASAMBLEA FROM tblCOOPERATIVA " & _
                                                      "JOIN tblASAMBLEA  ON tblASAMBLEA.ASAM_ID_ASAMBLEA = tblCOOPERATIVA.ASAM_ID_ASAMBLEA", conn)





请帮忙。谢谢,如果您需要更多信息,请告诉我



主列名是ASAM_ID_ASAMBLEA然后在其他表上我有相同的列名



我只是想将第一个ASAM_ID_ASAMBLEA值传递给另一个,并始终将MAX(或最后一个寄存器)放入我的其他表



Please Help. Thank you, if you need any more info let me know

The main column name is ASAM_ID_ASAMBLEA then on the other tables I have the same Column name

I just want to pass that first ASAM_ID_ASAMBLEA value into the other and always looking the MAX (or last one register) into my other tables

推荐答案

MAX(ASAM_ID_ASAMBLEA)部分查询现在不从哪个表中获取该字段。你需要在字段前面指定表名。



所以要么使用
The MAX(ASAM_ID_ASAMBLEA) part of your query does not now from which table to take the field. You need to specify the table name in front of the field.

So either use
MAX(blASAMBLEA.ASAM_ID_ASAMBLEA)

MAX(tblCOOPERATIVA.ASAM_ID_ASAMBLEA)


这篇关于不明确的列名称错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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