Text & .CSV Data Sources Technical Details

SQL for the https://dataself.atlassian.net/wiki/spaces/DS/pages/1928527873 required for data accessed with the https://dataself.atlassian.net/wiki/spaces/DS/pages/2005532673.

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.

Expression

Results

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

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 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.

DATEADD()

DATEADD("d",-7,DATE()) as [last-week]

PxPlus Reference Manual

Miscellaneous

 

 

SQL Expression

Compatibility Text File Source Driver

 

123 AS <name>

OK

 

CAST

No

 

GETDATE()

No

 

NULL AS <name>

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

 

External Documentation