qb icon indicating copy to clipboard operation
qb copied to clipboard

default values - valueraw, min, max, sum

Open Daemach opened this issue 2 years ago • 0 comments

I would like to use max() to find a max taskID, but I need some kind of value to increment, even if there is no return. I would start with 0 in that case. The code below is a workaround, but the default value isn't working, with or without named arguments. I will coalesce for now, but I think this is a regression

base.taskID = qb .from( "holdings" ) .where( "jobID", base.jobID ) .valueRaw( "max(taskID)", 0, false, { datasource : "FTDIOpto" } ) + 1;

Daemach avatar Mar 01 '23 23:03 Daemach