Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Select for sql 2008

Posted on 2011-09-09
4
Medium Priority
?
273 Views
Last Modified: 2012-08-13
I need to select all data associated with a certain grower in sql.

I have farmer 1, farmer 2 and farmer 3

I ahve a column named contract_information_grower and need to select all data from the table that is associated with farmer 1.
0
Comment
Question by:HDM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:HDM
ID: 36514340
I also need to know how to take the decimals out of a number.

Right now it shows 9998.912

Would like it to show 9,999 when it shows up in excel.

Thanks!!

0
 
LVL 21

Accepted Solution

by:
JestersGrind earned 1000 total points
ID: 36514366
You can use CEILING(YourColumn) to round the number up to the next whole number.

For your query:
select *
from yourtable
where contact_information_grower ='farmer 1'

Greg
0
 
LVL 4

Assisted Solution

by:AgeOfEmpires
AgeOfEmpires earned 1000 total points
ID: 36514381
SELECT * FROM tablename WHERE contract_information_grower = 'farmer 1'

SELECT round(numberfield,0) FROM tablename
0
 

Author Closing Comment

by:HDM
ID: 36514424
Thanks!!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question