473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Check field for two values

102 64KB
Background:
MS SQL Server 2005

How do check a field for one of two values? I have a field Status in SQL that can a "A" or "I" or "W". I want to check it for a "A" or "I". How can I do that?

Thanks.
Jan 27 '17 #1
1 1468
Luk3r
300 256MB
Expand|Select|Wrap|Line Numbers
  1. Select * From TableName where ColumnName = 'Value1' or ColumnName = 'Value2'
Jan 27 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Wishing I was skiing mom | last post by:
In form1, which is an item master maintenance screen, I have a button which launches form2. Form2 contains an item master datagrid. After the user double-clicks the desired item record in form2 I...
1
by: Megan | last post by:
I have 2 tables, CASE and ISSUE. My table, CASE, stores the issues pertaining to that particular case. The table, CASE, was designed with 2 fields, IssueID and IssueDesc. Right now, all of the...
1
by: Richard Dixson | last post by:
Under ASP.NET (C#) I want to create a page that people can use to submit questions. This page will consist of a table with several rows of information, like: Name: Bill Smith Job title:...
2
by: Richard Dixson | last post by:
Under ASP.NET (C#) I want to create a page that people can use to submit questions. This page will consist of a table with several rows of information, like: Name: Bill Smith Job title:...
0
by: rlueneberg | last post by:
I am having difficulty with preserving field values in a DetailsView control after clicking the insert button event. protected void DetailsView1_ItemInserted(object sender,...
5
by: mehere | last post by:
Please excuse me if I am posting in wrong NG. Can someone explain how I can use javascript (I am assuming this is the best way to do it) to add two field values together. I.e. field 1 plus field...
5
by: sklett | last post by:
I'm not real experienced with asp.net so this may be obvious. I've got a situation where some of my client side javascript is causing my posted form's controls to lose their values. In other...
9
ADezii
by: ADezii | last post by:
There are basically 4 Methods that you can use to access the values of Fields in Recordsets. For the purposes of this demonstration, I'll be using a Table called tblEmployees, a Field named , and a...
3
by: Bjorn Sagbakken | last post by:
What is the best way to read single field values from a dataset? The dataset is populated with a customer record, showing well in a gridview. But I also want to read the single field values, like...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.