Solved

Select for sql 2008

Posted on 2011-09-09
4
268 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 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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 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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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