SQL splitting cell

Hello

I am New to this forum. Thanks for all current and future help
I have SQL(2019) table

Name Amount
Jon 1,000,000.00
Greg 8,000.00

I Would like the Result to shoot out like this

|Name|Amount|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Jon |99999.99|
|Greg | (899,999.91)|

In the excel one use the min formulae. Any help would be nice.

Thanks

Welcome!

Could you explain the logic behind this? Why does Jon have 9 and Greg only has 1

1 Like

Hello

My ERP system only will allowed me entry up 5 character . This cause me have split the amount into different amount.

Thanks

still have no idea what you are talking about. In your table what data type is Amount.

declare @shootout table(Name nvarchar(50), Amount varchar(50)  )

insert into @shootout 

select 'Jon', '1,000,000.00' union
select 'Greg', '8,000.00'

select header
  from 
  (
select '|Name|Amount|' as header, -1 wizwaz union
select '|' + Name + '|' + Amount + '|', 999
from @shootout
) a
order by wizwaz
1 Like

Hi

Please see

SQL server

NTILE function

Hello

This what i was try to do

Thanks

Prin 1 Min(Escrow,9999.99)
Prin 2 MIN(Escrow-[Esc min 1],9999.99)
Prin 3 MIn(Escrow-[Esc min 1]-[Esc Min2],9999.99)
Prin 4 MIn(Escrow-[Esc min 1]-[Esc Min 2]-[Esc Min 3],9999.99)
Prin 5 MIn(Escrow-[Esc min 1]-[Esc Min 2]-[Esc Min 3]-[Esc Min 4],9999.99)