473,387 Members | 1,530 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,387 software developers and data experts.

WHERE Statement Help

Hi,

cant get to grips with this problem, need to select from dbo.booking_form
all records that meet 2 statements. 1st allocated='completed' and 2nd
account is not 'CASH' , i.e. all records that don't contain the word CASH in
the field 'ACCOUNT' Below is the beginning just don't know the syntax for
NOT, have tried several option but to no avail.

Pricing.Source = "SELECT * FROM dbo.booking_form WHERE allocated =
'COMPLETED' AND

Thanks in advance.

Simon
Jun 18 '06 #1
2 1189

Simon Gare wrote:
Hi,

cant get to grips with this problem, need to select from dbo.booking_form
all records that meet 2 statements. 1st allocated='completed' and 2nd
account is not 'CASH' , i.e. all records that don't contain the word CASH in
the field 'ACCOUNT' Below is the beginning just don't know the syntax for
NOT, have tried several option but to no avail.

Pricing.Source = "SELECT * FROM dbo.booking_form WHERE allocated =
'COMPLETED' AND

Thanks in advance.

Simon


Pricing.Source = "SELECT * FROM dbo.booking_form WHERE allocated =
'COMPLETED' AND accounts <> 'CASH'

--
Mike Brind

Jun 18 '06 #2
Thanks Mike

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...

Simon Gare wrote:
Hi,

cant get to grips with this problem, need to select from dbo.booking_form all records that meet 2 statements. 1st allocated='completed' and 2nd
account is not 'CASH' , i.e. all records that don't contain the word CASH in the field 'ACCOUNT' Below is the beginning just don't know the syntax for NOT, have tried several option but to no avail.

Pricing.Source = "SELECT * FROM dbo.booking_form WHERE allocated =
'COMPLETED' AND

Thanks in advance.

Simon


Pricing.Source = "SELECT * FROM dbo.booking_form WHERE allocated =
'COMPLETED' AND accounts <> 'CASH'

--
Mike Brind

Jun 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: G.J. v.d. Kamp | last post by:
Hi all, I have one for all the blackbelters out there: is there a way i can make a stored procedure where i can control the where statement with variables? I have to do some complex...
4
by: Tom Walker | last post by:
I cannot get the WHERE statement to work correctly unless I use a literal with the LIKE. I want to use a working storage data name so that I can vary the WHERE statement. Example that works: ...
9
by: Peter | last post by:
My problem is the last bit of coding below, the like statement does not work. what I have is a product options field and in it is stored characters i.e. "avcy" etc what the query does is...
2
by: NathanV | last post by:
I need some help with a SQL statement (SQL Server 2k). I have three tables, an Artists table which holds user info, a Types table which holds the TypeID and Description for different types (I.e....
0
by: vbnetprogramer | last post by:
How Can I Ignore Accsents and diacritical marks in WHERE statement? i use sql statment for searching and i wont to search in text filds where some accent and diacritical marks have been enterd. ...
3
by: dhutton | last post by:
SQL Server 2000 How do you write your query to check for blank (empty) cells? Need to check 3 columns. ColumnA, ColumnB and ColumnC. I need to grab the data in ColumnA ONLY if ColumnB and...
9
imrosie
by: imrosie | last post by:
Hello Experts, It's going to take one to figure this out. My Order form is supported by a query of two tables (Customers and Orders). There is a subform within the Form for entering in the new...
0
by: feeblemind | last post by:
Hi everyone, I am having problem/troubles with creating an sql inline statement for our application. How do I create a statement/query that selects list of servers with defined date ranges, but...
8
reginaldmerritt
by: reginaldmerritt | last post by:
Hi, I have two report layouts that are used to run 12 different reports using where statement. for example DoCmd.OpenReport "SomeReport", _ acViewPreview, _ ...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.