Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362188

Summary: SQL - incorrect validation on get a, b, c from rs
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jvincens, mheitz, pharmon, svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
library for loading database for test program
none
Test case none

Description Paul Hoffman CLA 2011-10-27 09:09:56 EDT
Validation prevents get from a result set into list of primitive scalars with following validation message:

Description	Resource	Path	Location	Type
IWN.VAL.8518.e 41/8 The with clause is required when the action target is a list of expressions that map to columns of zero or multiple tables in a data base.	GetFromRSntoScalarsValidationError.egl	/test.edt.sql.test/EGLSource/sql/test/defects	line 41	EDT Problem

With get from rs, the with clause is specified on the open, not the get.

I am not sure why the check is needed even for get from ds.    It's just as easy to code an incorrect primitive into list with a with clause as without one.
Comment 1 Paul Hoffman CLA 2011-10-27 09:10:29 EDT
Created attachment 206070 [details]
library for loading database for test program
Comment 2 Paul Hoffman CLA 2011-10-27 09:11:25 EDT
Created attachment 206071 [details]
Test case
Comment 3 Justin Spadea CLA 2011-10-27 14:11:56 EDT
Tim, can you verify that what Paul says is true? This check was made based on a conversation we had a few weeks ago. The update to the spec can be seen in bug 360021 comment 14:

"For GET statements: If the targets are primitives mapping to columns and they
do not all map to a single table, then the WITH clause is required."
Comment 4 Joseph Vincens CLA 2012-03-23 11:14:07 EDT
When the from is an SQLResultSet the scalars don't need to map to a table because we don't need to create SQL, the rs already contains the data.
Comment 5 Matt Heitz CLA 2013-01-03 10:48:52 EST
Moving old fixed bugs from the RESOLVED state to CLOSED.