3 Access problems

  • Thread starter Thread starter Jack B.
  • Start date Start date
J

Jack B.

Hi,
I have three problems, so please help me if you can:

a) I have Table/querie with 2 columns. I'd like to create third column with
constant text like "server1"

b) Column 1 contains text "properties for server1". I would like get just
"server1" (remove "properties for ")

c) Merge Querie 1 (column 1, column 2) with Querie 2 (column 1, column 2) to
third Querie 3 which contains column 1(Querie1 and Querie2) and column
2(Querie 1 and Queri 2)

Thnx a lot!
 
Jack B. said:
Hi,
I have three problems, so please help me if you can:

a) I have Table/querie with 2 columns. I'd like to create third column with
constant text like "server1"

Create the column and set it's default value property to "server1". This
will default the value for every new record.
b) Column 1 contains text "properties for server1". I would like get just
"server1" (remove "properties for ")

How do you want to get it and what do you want to do with it. Do you want to
update the table so it only says "server1". If so, just create an Update
query that does the update.
c) Merge Querie 1 (column 1, column 2) with Querie 2 (column 1, column 2) to
third Querie 3 which contains column 1(Querie1 and Querie2) and column
2(Querie 1 and Queri 2)

It sounds like you need a UNION query. Try something like this:

SELECT Column1, Column2 FROM Query1
UNION
SELECT Column1, Column2 FROM Query2;

Barry
 
Barry Gilbert said:
Create the column and set it's default value property to "server1". This
will default the value for every new record.

Perfect for new records, but I would like to replace previously column /
create "third" column with "server1" text for all currently fields (not just
for new one)

How do you want to get it and what do you want to do with it. Do you want
to
update the table so it only says "server1". If so, just create an Update
query that does the update.

Hm. I need to use "updated query" for next query (UNION). Could you decribe
more details this Update?


It sounds like you need a UNION query. Try something like this:

SELECT Column1, Column2 FROM Query1
UNION
SELECT Column1, Column2 FROM Query2;

Barry

Great, thnx for UNION command!
 
b) Column 1 contains text "properties for server1". I would like get
Hm. I need to use "updated query" for next query (UNION). Could you
decribe more details this Update?

Where I can put Replace criteria: between Select and For?
 
Create the column and set it's default value property to "server1". This
Perfect for new records, but I would like to replace previously column /
create "third" column with "server1" text for all currently fields (not just
for new one)

This needs an Update Query as well. To create one, create a new query with
the one table you want to update. Choose the field you want to update. In the
Query menu, change the query type from Select Query to Update Query. This
inserts a new row called Update To. The value you put in this row is the
value that will be updated in the selected column. Run the query by by
clicking the exclamation point(!) button.

Hm. I need to use "updated query" for next query (UNION). Could you decribe
more details this Update?

See above. I'm not sure how the update query relates to the union query, but
union queries are only for selecting data.
 
Back
Top