on 02-10-2007 9:35 PM
Hello,
I am currently experiencing a problem with a trivial SELECT statement.
I have a table "blog" which contains several rows.
Column uid is the pk.
A "select * from blog where<b> uid </b>= 1700" returns "no result".
I definitely have a row with that uid.
A "select * from blog where<b> blog.uid</b>=1700" returns that row.
So, it seems like I have to prefix the column with the table name.
What's wrong with the first statement ?
If something is wrong with the statement, why is there no error message ?
The problem is that I use a tool to query the database that generates the select statement WITHOUT the table prefix.
Log:
++++ Execute +++++++++++++++++++++++++++++++
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
select * from blog where uid=1700
<b>Statement successfully executed. No Result <===================================</b>
Execution Time: 23:33:42.765 - 23:33:42.765 (00.000 sec)
++++ Execute +++++++++++++++++++++++++++++++
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
select * from blog where blog.uid=1700
<b>Statement successfully executed. <===================================</b>
Execution Time: 23:33:26.296 - 23:33:26.296 (00.000 sec)
I am using MAXDB 7.6.00.34 on Linux.
Thanks
Andre
Hello Andre,
UID (UserID) is a reserved keyword in MaxDB. You can select the UID with
select UID from dual. So in the first statement you check if the UID (not your blob.uid) is 1700.
If you have a column named UID you have to prefix it with the table name. Like you do in the second statement.
Regards
Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.