Requête SQL migration vers Postgre
Edit: j'ai trouvé la réponse à mon problème ici:
http://forums.devshed.com/postgresql...at-254989.html
Bonjour,
Je suis en train de migrer une BDD depuis MySQL vers PostgreSQL et j'ai le problème suivant sur cette requête (qui fonctionnait bien avant):
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
SELECT id,
SUBSTRING(title,1,60) AS title,
description,
DAY(date_login) AS day,
MONTH(date_login) AS month,
YEAR(date_login) AS year,
HOUR(date_login) AS hour,
MINUTE(date_login) AS minute,
SECOND(date_login) AS second
FROM table_users
WHERE user_id=10
ORDER BY ranking ASC |
Citation:
ERROR: function day(timestamp without time zone) does not exist
LINE 4: DAY(due_date) AS jour,
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Comment devrais-je adapter ma requête pour qu'elle soit acceptée par Postgre?
Merci pour votre aide