float to string dalam script MsSQL Server

berikut adalah script float ke sql di Microsoft SQL Server

contoh

DECLARE @nomer FLOAT
SET @nomer = 12345.4867
SELECT STR(@nomer,10,0)

hasil execute
12345

contoh lain

select STR([kode peserta],20,0) from [Biodata]


Posting Lebih Baru Posting Lama

Leave a Reply