•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 426,450 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,347 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 8069 | Replies: 10 | Solved
![]() |
try doing your calculations before your sql statment
Dim i As Double Dim MySql as string i = 50 / 100 Mysql="Select " & i & " FROM table;" rs.open MySQl,conn,3,3,1
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
irc://irc.rizon.net/#itf
It will work fine as long as one of the numbers in division is a float or similar.
Try
This will work with any numeric data.
Try
SQL Syntax (Toggle Plain Text)
SELECT (cast(50 AS float)/100)
![]() |
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Computer Architecture Reference (Computer Science and Software Design)
- Factorial of a number (C)
- Prime Numbers - Help its for college (Visual Basic 4 / 5 / 6)
- Cannot get PAIR::big to just display greater number (C++)
Other Threads in the MS SQL Forum
- Previous Thread: SQL Syntax
- Next Thread: Nested Queries


Linear Mode