Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Select for sql 2008

Posted on 2011-09-09
4
Medium Priority
?
280 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:Curtis Long
  • 2
4 Comments
 

Author Comment

by:Curtis Long
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:Curtis Long
ID: 36514424
Thanks!!
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

972 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