SQL formating

I have a textbox bound to this SQL query:
SELECT TOP 1 “{Root Container.MotorID}” FROM dbo.motorrun ORDER BY t_stamp DESC

which will select a float8 value from my table.
I want to change the format of this value for the text box to something like ####.##
I have looked into format(…, “####.##”) but can’t figure out where I would put this…
Any ideas?

Also, I am looking for a SQL code to INSERT multiple rows into my table.
I have an expression item inside a group that looks like…

if({ShiftReset}=1, executeUpdateQuery(“INSERT INTO motorrun (t_stamp) VALUES (CURRENT_TIMESTAMP)” ),0)

I’d like this to INSERT several rows like this all at the same time.

If you use a numeric text box (property: decimal format) or a numeric label (property: number format pattern), you can change the pattern to whatever you like using the property editor. They both are set to a default of two decimal places, which is what you need.

For the SQL issue, if you want to insert several rows at the same time, you can comma separate values for the rows via parentheses. So for your example, if you wanted to enter 4 rows:


However, this will just enter the same timestamp into the database into 4 different rows. Did you need the timestamps to be different?

ah yes, Thanks
Both issues solved.