Solved

Select for sql 2008

Posted on 2011-09-09
4
221 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
  • 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 250 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 250 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now