jdm 4
New Member
Hello,
I'm attempting to query a pricing table (part_price), and I want to return all products (part) whose price (price) is extended out by three or more decimal places (.xxx). For example I want the product whose price is 10.765 (or 100.5327) to be returned, but I don't want the product whose price is 11.23 (or 7.2, or 28) to be returned. Can anyone offer any insight into my conundrum?
Thanks,
JDM
7 1995
Kindly post the database thet you are using for the purpose.
Also post your table structure.
jdm 4
New Member
Oracle 8i
Column Data Type Null?
PART VARCHAR2 (20) N
PRICE NUMBER (22,7) N
- No PRIMARY KEY
Regards,
JDM
Question moved to Oracle Forum.
Oracle 8i
Column Data Type Null?
PART VARCHAR2 (20) N
PRICE NUMBER (22,7) N
- No PRIMARY KEY
Regards,
JDM
Make use of INSTR,SUBSTR and LENGTH to achieve this!!
Select *
From
Part_price
Where
Price=
Decode(
Sign(
Length(substr(p rice,instr(pric e,'.')+1,length (price)))-2),1,price)
-
Select *
-
From
-
Part_price
-
Where
-
Price=
-
Decode(
-
Sign(
-
Length(substr(price,instr(price,'.')+1,length(price)))-2),1,price)
-
nramrits,
Please make us of the code tags when ever you post any code in the forum which will make the code very clear and readable
jdm 4
New Member
Thank you very very much...EXTREMEL Y HELPFUL.
JDM
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Oswald |
last post by:
Hey,
how can I set the number of decimals?
Example:
5 decimals 2.12345
2 decimals 2.12
I've found something about NumberFormat in the API, but without an example I
can't solve this...
|
by: westjon64 |
last post by:
i am fairly new to c++, i need to know how to make it so you can input
decimals into a file using the cin >> a command instead of just being
able to input whole numbers and also how to make it so that it outputs
decimals and not just rounded off whole numbers
|
by: AP |
last post by:
We commonly use this method to "pivot/crosstab" table results. For
example lets say there are two offices, and we want the total sales
for each ofice in its own column(Next to each other). We do not want
to use a crosstab query so please do not recommend it.
Typically we do this. If the data is structured as follows
Office Sales ...
|
by: aaronm49 |
last post by:
I have created an append query and I am having a problem with the
format of the number column when it appends. For example. 4.5 appends
as 4,a value of .5 appends as 0. I have adjusted the append query to
standard format three decimal places and have done the same for the
field that is being appended to in the table but nothing has worked....
|
by: Donal McWeeney |
last post by:
Hi,
Is there a way to specify on the predefined format strings like P and N that
you want displayed all the decimals in the number...
for example
3 will display 3
2.1 will display 2.1
3.21 will display 3.21
| |
by: sshafer1 |
last post by:
Hi.
I have a query that I would like to run periodically to drop the data in an existing table and re-write the table with the query information.
However, when I do this, some of my field formatting for calculated query fields are dropped.
For example. In the query, the FIELD1= $4,500 but when the make table query is run, the FIELD1 =...
|
by: Warren Thai |
last post by:
I am using Access 2003. I need to export data from a query to a .txt file. I
know how to do this but however there is a problem with my data being
rounded. The numbers in the data have 3 decimal places but when I export the
data, the numbers in the text file are rounded to 2 decimal places. How do I
stop this rounding?
Warren
|
by: CNiall |
last post by:
I am very new to Python (I started learning it just yesterday), but I
have encountered a problem.
I want to make a simple script that calculates the n-th root of a given
number (e.g. 4th root of 625--obviously five, but it's just an example
:P), and because there is no nth-root function in Python I will do this
with something like x**(1/n)....
|
by: Edwin.Madari |
last post by:
for nth square root: use math.sqrt n times for example
... num = math.sqrt(num)
...
5.0
all comparisons work fine for arbitrary floating point numbers...
For readability print them with required precision. for example
True
(0.20000000000000001, 0.20000000000000001)
('0.20', '0.20')
|
by: =?Utf-8?B?a2FyaW0=?= |
last post by:
Hello All,
why is this code is not showing the result in this format: 0.00 and
showing it as only 0
Private Sub btn1_Click
Debug.Print(Format$(Rnd() * 100, "0.00"))
Dim d As Double = Math.Round(2250.0, 3)
txt2.Text = txt1.Text \ d
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |