CREATE FUNCTION dbo.myweekday (@input datetime)
RETURNS int
AS BEGIN
RETURN datepart(weekday, @Input)
END
select dbo.myweekday(current_timestamp)
==> returns 6 (Friday)
q.result.add(q.functions.custom('dbo.myweekday',q.columns.startdatetime));
ERROR com.servoy.j2db.util.Debug - Not a valid sql name: dbo.datepart_year
application.output(databaseManager.getSQL(query));
var q = 'SELECT dbo.datepart_dayofyear(o.orderdate) FROM orders as o'
var ds = databaseManager.getDataSetByQuery('servoy_test_mssql',q,null,10);
Users browsing this forum: No registered users and 7 guests