Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T-SQL uses DATEFROMPARTS function instead of DATE_FROM_PARTS function. #4558

Closed
rajat-wisdom opened this issue Jan 2, 2025 · 1 comment · Fixed by #4563
Closed

T-SQL uses DATEFROMPARTS function instead of DATE_FROM_PARTS function. #4558

rajat-wisdom opened this issue Jan 2, 2025 · 1 comment · Fixed by #4563

Comments

@rajat-wisdom
Copy link

rajat-wisdom commented Jan 2, 2025

Description
The issue exists in the latest version 26.0.1. T-SQL uses DATEFROMPARTS function instead of DATE_FROM_PARTS function. Please see snippet and T-SQL documentation below.

Fully reproducible code snippet

>>> from sqlglot import exp as glot
>>> glot.DateFromParts(year="2012", month="4", day="21").sql(dialect="tsql")
'DATE_FROM_PARTS(2012, 4, 21)'

Official Documentation
DATEFROMPARTS in T-SQL

Thank you for the amazing work that you do

@geooo109
Copy link
Contributor

geooo109 commented Jan 5, 2025

Thank you @rajat-wisdom for pointing it out.
I am working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants