This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I use LightSpeed Query to build dynamic queries. Is that possible to get a projection from a sub-query and preserve the sub-query's sort? Simple example: The initial query
SELECT Order.Id FROM Order WHERE Order.OVERRIDE_BY LIKE '%a%' ORDER BY Order.STATUS_ID
I want to recieve SELECT DISTINCT Id from (SELECT Order.Id FROM Order WHERE Order.OVERRIDE_BY LIKE '%a%' ORDER BY Order.STATUS_ID)
I cannot apply projection to the sub-query itself due to I will lose sorting.
Another question. Oracle NUMBER data type maps to Int32. NUMBER defaults to 38 significant digits and scale 0. Is that correct mapping?
Thank you in advance!
|
|
|
Small correction
Initial query
SELECT * FROM Order The desired quesry SELECT DISTINCT Id from
|
|
|
1. I don't think this is currently possible -- sorry! 2. We believe this is a reasonable default because most developers don't set up specific precisions when creating NUMBER columns to hold integers, even though they don't actually need the full 38 significant figures. If a precision is specified, we respect that and infer Boolean, Int32 or Int64 according to the precision; but if no precision is specified we reckon a simple integer is more likely than a long or a 'bignum.' If you are using very large integers then you can always edit the column type through the Properties window, or just specify a precision explicitly in your database schema. |
|