473,385 Members | 1,890 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.

Find value in field

2
Hi,

I'm having troubles with the following:

I have 2 tables, Candidates and Attachments. In the Candidate there is a column called email1.

In the Attachment table, there is a column called Text filled with text. Somewhere in this text there is a email address mentioned (which is email1).

I want to find the records where candidate.email1 is mentioned in the attachment.text column.

I therefore tried the following query:

Expand|Select|Wrap|Line Numbers
  1. SELECT candidate_id FROM candidate, attachment WHERE email1 IN(attachment.text)
This is returing the correct value only if there isn't any other text in the attachment.text column, which is not the fact.

Anyone that can help me with this?
Mar 17 '08 #1
3 2404
Scott Price
1,384 Expert 1GB
You have your email1 and attachment.text swapped. The sql you have is looking IN email1 FOR attachment.text.

Regards,
Scott
Mar 17 '08 #2
missinglinq
3,532 Expert 2GB
Also, if you actually have a column/field named Text you need to change the name to something else; Text is a Reserved Word in Access, and sooner or later it'll cause you trouble.

Welcome to TheScripts!

Linq ;0)>
Mar 17 '08 #3
Friebo
2
Also, if you actually have a column/field named Text you need to change the name to something else; Text is a Reserved Word in Access, and sooner or later it'll cause you trouble.

Welcome to TheScripts!

Linq ;0)>
Thank you both, I've managed to accomplish it by extracting the email addresses out of the text in excel. However, when I want to run the query
Expand|Select|Wrap|Line Numbers
  1.  UPDATE attachment SET attachment.data_item_id= (SELECT Distinct candidate_id FROM candidate, attachment
  2. WHERE candidate.email1= attachment.email);
I'm getting the error "Operation must use an updateable query." I don't see what I'm doing wrong here. Both the attachment.data_item_id and Candidate.candidate_id are numeric and the tables are having a Primary Key.

Running the Select query apart from the Update query does return the expected value.
Mar 19 '08 #4

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

Similar topics

2
by: Graham Mattingley | last post by:
If I insert a value into a table what is the best way to find the Primary Field Value.. +--------------+---------------------+------+-----+ | Field | Type | Null | Key |...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
4
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
1
by: Lars E | last post by:
Hi all I have a small problem. I have a datatable with 8 columns. But it is only data in 5 of the columns. Data for the remaing 3 columns is in another dataset. I Want to run trough the...
1
by: BobM | last post by:
i read the thread entitled "Convert Field Value String to Actual Field in Expression" It appeared that the final solutions got moore complex not less complex MY PROBLEM IS: 1. get a value from...
1
by: BobM | last post by:
i read the thread entitled "Convert Field Value String to Actual Field in Expression" It appeared that the final solutions got moore complex not less complex MY PROBLEM IS: 1. get a value from...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
6
by: Wayne | last post by:
I'm using the following SQL statement to find the next highest autonumber value in a table where "CDUGActID is the autonumber field in the "CDUGActuals" table: SELECT CDUGActuals.CDUGActID,...
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
4
kcdoell
by: kcdoell | last post by:
Hello: I have the following afterupdate event: Private Sub GWP_AfterUpdate() 'Updates the Total calculation in the control "SumGWP" on the quick reference 'table that is located on the form...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
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...

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.