PC Review


Reply
Thread Tools Rate Thread

3 Access problems

 
 
Jack B.
Guest
Posts: n/a
 
      6th Sep 2006
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!


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmFycnkgR2lsYmVydA==?=
Guest
Posts: n/a
 
      6th Sep 2006
"Jack B." wrote:

> 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
 
Reply With Quote
 
Jack B.
Guest
Posts: n/a
 
      6th Sep 2006

"Barry Gilbert" <(E-Mail Removed)> wrote in message
news:14058916-F1AB-4F4E-B6AC-(E-Mail Removed)...
> "Jack B." wrote:
>
>> 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.


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)


>> 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.


Hm. I need to use "updated query" for next query (UNION). Could you decribe
more details this 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


Great, thnx for UNION command!



 
Reply With Quote
 
Jack B.
Guest
Posts: n/a
 
      6th Sep 2006
>>> 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.

>
> 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?


 
Reply With Quote
 
=?Utf-8?B?QmFycnkgR2lsYmVydA==?=
Guest
Posts: n/a
 
      6th Sep 2006
> > 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)


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.


> >> 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.

>
> 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.

>
> >> 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

>
> Great, thnx for UNION command!
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Forms No-Touch Deployment problems using DAO on User-Level Secured Access DB to access groups James Microsoft Dot NET Framework Forms 4 19th Nov 2003 03:15 PM
Windows Forms No-Touch Deployment problems using DAO on User-Level Secured Access DB to access groups 1 James Microsoft VB .NET 0 16th Nov 2003 06:49 PM
Problems, problems, problems...Access 2002 into Access 2000 Marcin Wlazlo Microsoft Access VBA Modules 3 29th Oct 2003 03:49 PM
problems opening Access 2000 german database in Access XP english bodo Microsoft Access Forms 0 6th Sep 2003 07:11 PM
bumped up Re: Problems opening Access 2000 file in Access 2002 Margaret Microsoft Access 2 28th Aug 2003 02:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:14 PM.