You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var states =
from fts in DataContext.GetTable<FirmToState>()
orderby fts.StateChangeDate descending
select fts;
var query =
from f in DataContext.GetTable<Firm>()
select new
{
FirmID = (long?)f.ID,
StateID = states.Where(s => s.FirmID == f.ID)
.Select(s => (long?)s.StateID)
.FirstOrDefault(),
};
Classes of metadata:
public class FirmToState
{
public DateTime StateChangeDate { get; set; }
public long FirmID { get; set; }
public long StateID { get; set; }
}
public class Firm
{
public long ID { get; set; }
}
query formatted in oracle as:
SELECT
f.ID,
(
SELECT tn11.*
-- should be: SELECT tn11.STATE_ID
FROM
(
SELECT tn1.*, ROWNUM as rnn1
FROM
(
SELECT
s.STATE_ID
FROM
VFIRM_TO_STATES s
WHERE
s.FIRM_ID = f.ID
ORDER BY
s.STATE_CHANGE_DATE DESC
) tn1
) tn11
WHERE
tn11.rnn1 <= 1
) as c1
FROM
VFIRMS f
Oracle reports error ORA-00913: too many values
When "SELECT tn11.*" is replaced with "SELECT tn11.STATE_ID" , the query executes without errors.
The text was updated successfully, but these errors were encountered:
I tried this query:
Classes of metadata:
query formatted in oracle as:
Oracle reports error ORA-00913: too many values
When "SELECT tn11.*" is replaced with "SELECT tn11.STATE_ID" , the query executes without errors.
The text was updated successfully, but these errors were encountered: