You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Vamsavardhana Reddy (JIRA)" <de...@db.apache.org> on 2005/10/05 14:41:48 UTC
[jira] Created: (DERBY-602) SELECT statement does not return the first colum data correctly
SELECT statement does not return the first colum data correctly
---------------------------------------------------------------
Key: DERBY-602
URL: http://issues.apache.org/jira/browse/DERBY-602
Project: Derby
Type: Bug
Versions: 10.1.1.0
Environment: Win XP, Sun JDK 142
Reporter: Vamsavardhana Reddy
SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
I have created one table using the SQL given below:
CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
I have inserted one row into this table using the SQL given below:
INSERT INTO USERS VALUES ('user1', 'password1');
Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-602) SELECT statement does not return the
first colum data correctly
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=all ]
Kathey Marsden closed DERBY-602:
--------------------------------
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-602) SELECT statement does not return the first colum data correctly
Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=all ]
Rick Hillegas resolved DERBY-602:
---------------------------------
Resolution: Fixed
This is expected behavior. USER is a builtin system function which returns the authorization id of the current user. Please see the "Built-in functions" section of the Derby Reference Manual.
Note that you can create a column named USER only by double quoting it (called a 'quoted identifier' in SQL-speak). When referencing such a column in queries, you should always double quote the column name. The following query will return the results you want:
select "USER", "PASSWORD" from USERS;
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-602) SELECT statement does not return the first colum data correctly
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=comments#action_12331382 ]
Daniel John Debrunner commented on DERBY-602:
---------------------------------------------
Is 'Fixed' the correct resolution, 'Invalid' seems more applicable. I wonder why Jira does not seem to have a 'not a bug' resolution?
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-602) SELECT statement does not return the
first colum data correctly
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=all ]
Kathey Marsden resolved DERBY-602:
----------------------------------
Resolution: Invalid
It was established that this issue was not a bug.
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-602) SELECT statement does not return the first colum data correctly
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=comments#action_12331379 ]
Daniel John Debrunner commented on DERBY-602:
---------------------------------------------
USER is a functio/reserved word in Derby that returns the current user name, see http://db.apache.org/derby/docs/10.1/ref/rrefsqlj42476.html
Thus I think the statement is returning the correct values. In order to return the contents of the table you need to quote USER, like
SELECT "USER", PASSWORD FROM USERS
Just like you had to quote USER in the create table.
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Reopened: (DERBY-602) SELECT statement does not return the
first colum data correctly
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-602?page=all ]
Kathey Marsden reopened DERBY-602:
----------------------------------
> SELECT statement does not return the first colum data correctly
> ---------------------------------------------------------------
>
> Key: DERBY-602
> URL: http://issues.apache.org/jira/browse/DERBY-602
> Project: Derby
> Type: Bug
> Versions: 10.1.1.0
> Environment: Win XP, Sun JDK 142
> Reporter: Vamsavardhana Reddy
>
> SELECT statement does not return the first colum data correctly. Here is the scenario. I have used "ij" for executing SQL.
> I have used the EmbeddedDriver and created a database. JDBC URL: 'jdbc:derby:mydb;create=true'
> I have created one table using the SQL given below:
> CREATE TABLE "USERS" ("USER" CHAR(10), "PASSWORD" CHAR(10));
> I have inserted one row into this table using the SQL given below:
> INSERT INTO USERS VALUES ('user1', 'password1');
> Retrieving rows from this table using the SQL statement "SELECT * FROM USERS" returns the data properly. Where as "SELECT USER, PASSWORD FROM USERS" retuns a value 'APP' for USER column data.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira