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

sql string questions

I'm having a few problems with strings and I think it's as to how they're
compared.

for example this query:

update [addresses]
set [country code] = ""
where [country code] not in (select countrycode from country)

does not update any records, despite the fact I know there are country code
entries in the addresses table that are not in the country table.
Also, should the following not equal comparator work as is obviously
intended? It doesn't seem to work for me!

where field <> 'whatimlookingfor'

This is just using SQL in the query window, not within vba.

Cheers all,
Chris

Nov 12 '05 #1
2 4042

"Chris L Humphreys" <cl*********@toofgib.moc> scribbled in message
news:bk**********@ucsnew1.ncl.ac.uk...
I'm having a few problems with an update query.....
update [addresses]
set [country code] = ""
where [country code] not in (select countrycode from country)

does not update any records, despite the fact I know there are country code entries in the addresses table that are not in the country table.

Also, should the following not equal comparator work as is obviously
intended? It doesn't seem to work for me!

where field <> 'whatimlookingfor'

This is just using SQL in the query window, not within vba.

Cheers all,
Chris


Hi Chris,

update [addresses] Set [country code] = "" this updates the addresses table,
either you typo'd your question or I read it wrong. Which table are you
trying to update?
For where field <> 'whatimlookingfor'

use where field <'whatimlookingfor' OR where field > 'whatimlookingfor' NOT
on the same line in the Access QBE grid, use 2 seperate lines

HTH,

Regards,

Andy.
Nov 12 '05 #2
"Andy" <sy************@NOSPAM.ntlworld.com> wrote in message
news:Bw****************@newsfep4-winn.server.ntli.net...
"Chris L Humphreys" <cl*********@toofgib.moc> scribbled in message
news:bk**********@ucsnew1.ncl.ac.uk...
update [addresses]
set [country code] = ""
where [country code] not in (select countrycode from country)

update [addresses] Set [country code] = "" this updates the addresses table, either you typo'd your question or I read it wrong. Which table are you
trying to update?
the addresses has a country code field, which should be a code which is also
present in the country table, under countrycode.
Many codes are incorrect and I want them removed.
For where field <> 'whatimlookingfor'

use where field <'whatimlookingfor' OR where field > 'whatimlookingfor' NOT on the same line in the Access QBE grid, use 2 seperate lines


cheers. Is is normal for <> to not work with strings?

Thanks,
Chris
Nov 12 '05 #3

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

Similar topics

3
by: Robert | last post by:
Hello, Can anyone help with this code? I need to split a long piece of text from a textarea box into small chunks, then POST these chunks to my credit-card provider, whereupon he will POST...
6
by: lkrubner | last post by:
Last year I asked a bunch of questions about character encoding on this newsgroup. All the answers came down to using ord() in creative ways to try to make guesses about multi-byte characters. I...
0
by: ani | last post by:
I have a questionaire page , which basically has questions with multiple choice answers. I need to accomplish paging on this and there are few questions that are gender specific. According the...
6
by: Nemok | last post by:
Hi, I am new to STD so I have some questions about std::string because I want use it in one of my projects instead of CString. 1. Is memory set dinamicaly (like CString), can I define for...
7
by: millerm | last post by:
I'm obviously new to C, and have been trying different things to get this done, but I'm at the end of the line and need some suggestions. I am reading a string in from a user, in the form of a...
14
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I took a C course some time ago, but I'm only now beginning to use it, for a personal pet project. My current stumbling-block is finding an efficient way to find a match between the beginning of a...
6
by: Gidi | last post by:
Hi, I'm writing a C# Windows Application and i have 3 questions: 1. I have a string which i want to write into file but i want to write it in ASCII format, how can i do it? 2. I need my...
5
by: Mart | last post by:
Hi everybody, I plan to have a LOT of SQL string in my app. So I need your advice for this. Is it a good idea to store all my SQL string in the app.config file? For a maintenance point of...
4
by: Harro de Jong | last post by:
(absolute beginner here, sorry if this seems basic) Section 7.10 of 'How to Think Like a Computer Scientist' contains this discussion of string.find and other string functions: (quote) We can...
28
by: pradeep | last post by:
Hello friends: I know some people here don't like to answer C++ questions, but I believe this is really about the underlying C code. Anyway I have posted as well to the other group someone...
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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.