rif. https://i.imgur.com/Mvp40nW.png
(ref. 4, Apr and following)
the standard output is good, but it displays two un-needed decimals (it's a quantity)
(ref. 1, Prev & Jan)
I tried convert(int, x): decimals disappear, zeroes disappear, but the
number is left aligned
(ref. 2, Feb)
I tried format(x, '0'): decimals disappear, zeroes are visible, but - as above - the number is left aligned
(ref. 3, Mar)
I tried format(x, 'n'): decimals are back, zeroes are visible, but - again
- the number is left aligned
how can I set the standard output to no-decimals for this query only?
you could try FLOOR(x), this will still be a numeric value
rif. https://i.imgur.com/Mvp40nW.png
(ref. 4, Apr and following)
the standard output is good, but it displays two un-needed decimals (it's a quantity)
(ref. 1, Prev & Jan)
I tried convert(int, x): decimals disappear, zeroes disappear, but the
number is left aligned
(ref. 2, Feb)
I tried format(x, '0'): decimals disappear, zeroes are visible, but - as above - the number is left aligned
(ref. 3, Mar)
I tried format(x, 'n'): decimals are back, zeroes are visible, but - again
- the number is left aligned
how can I set the standard output to no-decimals for this query only?
TIA
What about TRUNCATE(x, 0); ?
Il giorno Mon 17 Aug 2020 01:28:43p, *J.O. Aho* ha inviato su comp.databases.mysql il messaggio news:hpv7vbFhh8mU1@mid.individual.net. Vediamo cosa ha scritto:
you could try FLOOR(x), this will still be a numeric value
yes, I gave it a try, but it keeps the decimals
SQL Server FLOOR() Function https://www.w3schools.com/sql/func_sqlserver_floor.asp
The FLOOR() function returns the largest integer value that is smaller than or equal to a number.
Il giorno Mon 17 Aug 2020 08:10:08p, *Jerry Stuckle* ha inviato su comp.databases.mysql il messaggio news:rheh6k$jqs$1@jstuckle.eternal- september.org. Vediamo cosa ha scritto:
What about TRUNCATE(x, 0); ?
I tried it: SAP B1 gives an error so I used round(x, 0) but the result
didn't change
I tried it: SAP B1 gives an error so I used round(x, 0) but the result
didn't change
What error does it give?
Il giorno Thu 20 Aug 2020 07:44:55p, *Jerry Stuckle* ha inviato su comp.databases.mysql il messaggio news:rhmcqf$dej$1@jstuckle.eternal- september.org. Vediamo cosa ha scritto:
I tried it: SAP B1 gives an error so I used round(x, 0) but the result
didn't change
What error does it give?
syntax error, truncate does not exist in the SLQ I'm using, that's NOT
MySql but MS Sql
Msg 156, Level 15, State 1, Line 43
Incorrect syntax near the keyword 'truncate'.
My hope was to find a solution that worked on both systems
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 67:47:34 |
Calls: | 6,915 |
Files: | 12,379 |
Messages: | 5,431,814 |