on 02-06-2019 6:53 AM
In a .CDS query I can derive a property in a view like so
case
PROPERTY_NAME when 'SPECIAL VALUE' then 'Information'
else 'None'
end as RowHighlight,
In the DB it gets mapped to the following type which is not an allowable type
View Column SQL Date Type
ROWHIGHLIGHT VARCHAR(11)
Error: Element "Service.RowHighlight" does not have a type: Elements of ODATA entities must have a type
In a query how would i cast RowHighlight to an allowable SQL Type say NVARCHAR(11) ?
Hi John,
You should be able to explicitly type your "case" element using a colon and the required type i.e. add ": String" after RowHighLight
case
PROPERTY_NAME when 'SPECIAL VALUE' then 'Information'
else 'None'
end as RowHighlight : String,
Check out the Type Definiton section on the following page:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.