Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

How to convert this SQL in to my script?

Hello,

I have the below SQL statement;

CONVERT(DECIMAL(5,2),convert(float, replace(proj.[POC], '%',''))/100) [Current POC],

How to include this in my script to load the data?

thanks

Bhavesh

3 Replies
vishsaggi
Champion III
Champion III

May be this? If this does not work can you share some sample data with your expected output.

Num(Replace(proj.[POC], '%','')/100, '#,###0.00') AS [Current POC]

bhaveshp90
Creator III
Creator III
Author

This is my Data looks like :

POC
9670.00%
130.00%
8150.00%

When I add your code in the script = Num(Replace(proj.[POC], '%','')/100, '#,###0.00') AS [Current POC] 


this is my result :

1.PNG

My Expected result should be: 96.70 %, 1.30%, 81.50%

vishsaggi
Champion III
Champion III

Try this?

Num(Replace(POC, '%','')/100, '###0.00')&'%'