$customHeader
Skip to end of banner
Go to start of banner

Text & .CSV Data Sources Technical Details

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

SQL for the ETL+ Extract SQL Statement Panel required for data accessed with the ETL+ Source Driver for Text Files (.CSV).

  • DATEADD('d”,-7,DATE()) as [last-week]

Date()

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()

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

SELECT Now() AS Expr1 FROM ProductSales GROUP BY Now();

Returns the current system "Date and Time" in the default system Time format and displays in the column Expr1.

SELECT Now() AS CurrentDateandTime FROM ProductSales GROUP BY Now();

Returns the current system "Date and Time" in the default system Time format and displays in the column CurrentDateandTime.

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

SQL for Text (.CSV) Data Driver

Related Pages

External Pages on SQL for Text (.CSV) Data Sources

  • No labels