[SERVER-14537] is there any feature of aliasing fields and setting defaults value for a field in mongo db while fetching results without aggregations ? Created: 12/Jul/14  Updated: 10/Dec/14  Resolved: 14/Jul/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.0
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Delhivery Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

1) select f1 as field_one from table;
so f1 is aliased to field_one.

2) select decode(f1, 1,one, 2, two, 3, three, 'Not a valid range' ) from table.
so for value of f1 query returns
1 One
2 Two
3 Three
else
Not a valid range



 Comments   
Comment by Ramon Fernandez Marina [ 14/Jul/14 ]

Thanks for your report. The SERVER project is for reporting bugs or feature suggestions for the MongoDB server and tools. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group.

Generated at Thu Feb 08 03:35:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.