Bug 278414

Summary: Cannot switch to Query Data View when using Table Aliases
Product: [Applications] KEXI Reporter: Dimitrios T Tanis <dimitrios.tanis>
Component: KexiDBAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: normal CC: staniek
Priority: NOR    
Version: 2.4 alpha3 (Calligra 2.4 alpha3)   
Target Milestone: 2.9.11   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=340056
Latest Commit: Version Fixed In: 2.9.11

Description Dimitrios T Tanis 2011-07-24 20:15:11 UTC
Version:           2.4 alpha3 (Calligra 2.4 alpha3) (using KDE 4.6.0) 
OS:                Linux

Although in Bug 277869 Staniek stated that working with table aliases is implemented, there seems to be a problem.

Reproducible: Always

Steps to Reproduce:
Open query designer at SQL view. Write a Select statement assigning the table an alias.
Click Check query
Click Data View

Actual Results:  
Check query, reports the query as correct.
When trying to switch to data view, there is a message saying "Switching to other view failed (Data View).
At the SQL statement shown when clicking details, there is an extra column in the select statement "0ID" shown last that DOESN'T exist on that table.
Server result shows: 1 (SQLITE_OK)

Expected Results:  
There should be no problem working with aliases.

Working with column aliases works fine for this.
Comment 1 Jarosław Staniek 2012-04-24 19:59:04 UTC
Right, for example query 

SELECT name FROM table11 AS t WHERE name >= 'Mark'

Returns:

------8X------------
Query executing failed.
Error opening database cursor.
Message from server: no such column: table11.OID
SQL statement: SELECT name, table11.OID FROM table11 AS t WHERE name >= 'Mark'
Server result: 1 (SQLITE_OK)
------8X------------
Comment 2 Jarosław Staniek 2016-01-23 20:02:45 UTC
Checked again and works now. Depending or at least related to bug #340056, which is fixed in 2.9.11 so closing this one.