SQL for the ETL+ Extract SQL Statement Panel required for data accessed with the ETL+ Source Driver for Text Files (.CSV).
SQL Syntax for Text (.CSV) Data Sources
Date() {datetime}
Returns Source Data Type on EL+ Design page of “datetime”.
See https://support.microsoft.com/en-us/office/date-function-dd7a1f27-d957-4969-ab35-01e0bfbfed76
|
Expression |
Results |
|
SELECT Date() AS Expr1 FROM ProductSales GROUP BY Date(); |
Returns the current system "date" for in short date format. Result: "dd/mm/yyyy". |
|
SELECT Date()-[DateofSale] AS DaysSinceSale FROM ProductSales; |
Returns the difference between current system "Date" and date values of the field "DateofSale" as number and displays the results in column "DaySinceSale". |
Now() {datetime}
Returns Source Data Type on EL+ Design page of “datetime”.
Returns the current date and time according your computer's system date and time. https://support.microsoft.com/en-us/office/now-function-671467d4-aed0-4a78-b533-b7b87a533b5a
|
Expression |
Results |
|
|
Source Data Type on Design page of “datetime”.
|
|
|
Returns the current system "Date and Time" in the default system Time format and displays in the column CurrentDateandTime. |
DATEADD()
DATEADD("d",-7,DATE()) as [last-week]
PxPlus Reference Manual
Key sections in the https://manual.pvxplus.com/
Miscellaneous
|
|
|
|
|---|---|---|
|
SQL Expression |
Compatibility Text File Source Driver |
|
|
123 AS <name> |
OK |
|
|
CAST |
No |
|
|
GETDATE() |
No |
|
|
NULL AS <name> |
1️⃣ Problem with T-SQL Expression on Design page during load. |
|
|
DATE() |
Current system date in short date format: "dd/mm/yyyy". |
|
|
DATEADD() |
Yes |
|
|
NOW() |
Yes |
|
|
|
|
|