Re: Help With Multiple Tables, Fields and 'query' -
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Thu, 14 Sep 2006 15:14:16 -0400
Best book I know of is
Sql Queries For Mere Mortals by Hernandez and Viescas. It is a general text
and not specifically aimed at Access.
I don't understand what you want to do when you say CLEAR or DELETE
unpopulated fields from a table? Do you want to delete the field from the
structure permanently if there is no data in that field in any record in the
entire database?
Since you are working with tables exported from another source, I would tend
to leave the tables alone.
This is getting beyond what I can support on a volunteer basis. If I were
you, I would see if I could find a consultant (locally) or a class.
"Doc" <pc-dc-doc@xxxxxxxxxxx> wrote in message
news:4509a3e0$0$24213$9a6e19ea@xxxxxxxxxxxxxxxxxxxxxxx
John Spencer typed this:SNIP
You need to enter in brackets the tablename a period and in brackets the
fieldname
So now you need something like the structure below for the LastName
Field: TheFieldToPopulate
Table: TheTableToPopulate
Update To:
TRIM(MID([TheTableToPopulate].[TheSourceField],1+Instr(1,[TheTableToPopulate].[TheSourceField],"~")))
Where: "Name"
Let's try this a slightly different way.
Create a query that selects the data and shows the fields you want to
update as
well as the source fields.
Switch to SQL view (View: SQL)
Post the SQL Statement
I will try to rewrite that SQL statement and post it. Then you can copy
the
SQL, paste it into a query (SQL View) and then switch back to the grid
view to
see what it looks like.
John,
This is what I did - so far, so good.
added 3 new fields to said table: LAST, FIRST, ORGANIZATION
Created an Update query:
UPDATE Table1 SET for the last name:
IIf([name] Like "*~*",RTrim(Left([name],InStr(1,[name],"~")-1)))
for the first name:
IIf([name] Like "*~*",LTrim(Mid([name],InStr(1,[name],"~")+1)))
to pull the 'organizations' out:
IIf([name] Not Like "*~*",[name]);
Ran the Update Query -
ASIDE from ACCESS saying 'not enough memory to reverse' the changes, it
went well.
CAN YOU suggest a similar "query" to CLEAR or DELETE UN-POPULATED FIELDS
from a TABLE?
WOULD you be able to suggest a book on QUERY language that I person a bit
above beginner could understand?
MANY thanks!
Doc
.
- Follow-Ups:
- References:
- Help With Multiple Tables, Fields and 'query' -
- From: Doc
- Re: Help With Multiple Tables, Fields and 'query' -
- From: John Spencer
- Re: Help With Multiple Tables, Fields and 'query' -
- From: Doc
- Re: Help With Multiple Tables, Fields and 'query' -
- From: John Spencer
- Re: Help With Multiple Tables, Fields and 'query' -
- From: Doc
- Re: Help With Multiple Tables, Fields and 'query' -
- From: John Spencer
- Re: Help With Multiple Tables, Fields and 'query' -
- From: Doc
- Help With Multiple Tables, Fields and 'query' -
- Prev by Date: Re: Help With Multiple Tables, Fields and 'query' -
- Next by Date: Re: searchable keywords in Access
- Previous by thread: Re: Help With Multiple Tables, Fields and 'query' -
- Next by thread: Re: Help With Multiple Tables, Fields and 'query' -
- Index(es):
Relevant Pages
|