Bug 1221051

Summary: Inconsistent results of RIGHT function for different datasources
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: vhalbert
Target Milestone: ER3Keywords: QA-Closed
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 08:53:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Duráni 2015-05-13 08:45:26 UTC
The RIGHT function returns different results for different datasources. Some of those results are inconsistent with definition of the RIGHT(x,y) function.
=======
*Query: SELECT intkey, RIGHT(intkey, 1) FROM table ORDER BY intkey*
*Teradata, SQLServer, Sybase, Ingres, MySQL, Oracle (this result is OK):*
0	0
1	1
2	2
...
10	0
11	1
...
100	0
101	1
*Postgres:*
0	0
1	1
2	2
...
10	10
11	11
...
100	100
101	101
*DB2:*
0	" "
1	" "
2	" "
...
10	" "
11	" "
...
100	" "
101	" "
=====

Query:SELECT intkey, RIGHT(intkey, 2) FROM table ORDER BY intkey
*SQLServer, Sybase, Ingress, MySQL, Teradata (this result is OK):*
0	0
1	1
...
10	10
11	11
...
100	00
101	01
*Oracle:*
0	<null>
1	<null>
2	<null>
...
10	10
11	11
...
100	00
101	01
*Postgres:*
0	0
1	1
2	2
...
10	10
11	11
...
100	100
101	101
*DB2:*
0	"  "
1	"  "
2	"  "
...
10	"  "
11	"  "
...
100	"  "
101	"  "

Comment 1 JBoss JIRA Server 2015-05-13 14:16:19 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3474 to Resolved

Comment 2 JBoss JIRA Server 2015-06-22 15:22:57 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3474 to Closed