decimal places (asp or SQL)

# Thread: decimal places (asp or SQL)

1. Member
Join Date
Dec 1969
Posts
57

## decimal places (asp or SQL)

im using SQL query like this: <BR>s0="SELECT (pog*100)/(13*kol) as price FROM rezultati"<BR>Sql returns result like number with 10 or more decimals (like: 12.3645310398) How to get number in this format 12.36? With asp or SQL functions? <BR>Thanx on help<BR>

2. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## Use cdbl in ASP <eop>

.

3. Senior Member
Join Date
Dec 1969
Posts
1,431

## I think not

cdbl will have no effect, round function<BR><BR>eg<BR><BR>myNum = round(myNum,2)

4. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## The problem with you is

that you think too much <BR><BR>hehehe<BR><BR><BR>yep Round and NOT cdbl...<BR><BR>Never used that usaly let the SQL do it for me.

5. Senior Member
Join Date
Dec 1969
Posts
1,431

## Yeah why write another line

of code when it&#039;s unnecessary, I&#039;m with you. But I almost forgot about the round function I was going to answer him with a round function of my own, whew<BR><BR>Function KranksRound(dblNumIn, intDecimalPlaces)<BR>dim dblTempResult, objBankTransfer, dblTransferAmt<BR>Const caymanIslandsBankAc = "############3456"<BR><BR>dblTempResult = dblNum * 10^(intDecimalPlaces+1)<BR>dblTransferAmount = (dblTempResult-intdblTempResult)/(10^(intDecimalPlaces+1))<BR>dblTempResult = dblTempresult/10<BR>dblTempResult = int(dblTempresult+.5)/(10^intDecimalPlaces)<BR><BR>Set objBankTransfer = Server.CreateObject("Illegal.BankTransfer")<BR>obj BankTransfer.doIllicitTransfer(caymanIslandsBankAc , dblTransferAmt)<BR>Set objBankTransfer = Nothing<BR>KranksRound = dblTempResult<BR>End Function<BR><BR><BR>whata think, nice little scheme ehh, hahahahahahahah<BR><BR><BR><BR>

6. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## hehehe....yeah

I read somewhere about someone who did this and was transfering everythign after the 3rd digit to his account ...got caught in the end though.<BR><BR>

7. Senior Member
Join Date
Dec 1969
Posts
1,431

## It wasn't me I swear

heheheeh I never got caught at least anyways

8. Senior Member
Join Date
Dec 1969
Posts
10,852

## That was the plot....

To the movie Office Space.

9. Member
Join Date
Dec 1969
Posts
57

## RE: decimal places (asp or SQL)

Thanx on help, i solve that...<BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•