3 ms·
Show HN: Never write SQL again – Text to SQL, automatic and for free
- vba616 4y agoThis is fascinating. I selected Oracle 11g, and entered the following: Select employee separation date, and convert the date to text so that it sorts the same as the original date. Do not use an order by clause. Response: SELECT CONVERT(VARCHAR(10), separation_date, 101) AS separation_date_text FROM employees Point 1: Converting to date format 101 appears to be a SQL Server idiom, not Oracle. Point 2: Format 101 appears to be mm/dd/yyyy, while I hope it is clear to any human reader I was looking for a format along the lines of yyyy-mm-dd. If I had selected SQL Server and if it had chosen format 102, I think that would've worked. So close!