New Query writer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.. I'm in need of assistance in writing a query. My table has four
columns, id, name, default and all connects. How can I extract all the ids
that are connected to the same group of connects? Need to find similar users
that share the same connects.

Many thanks..
 
In a REPORT, you can group by "CONNECTS" and then list all the IDs under
that group heading.

In a query, you'd sort first by CONNECTS and then all the ID's for a
particular connect would be together in the report.
 
C said:
Hello.. I'm in need of assistance in writing a query. My table has four
columns, id, name, default and all connects. How can I extract all the
ids
that are connected to the same group of connects? Need to find similar
users
that share the same connects.

If you have Connect1, Connect2, Connect3, etc. in your table, I would
suggest you create two tables:

Main Table
ID, Name, Default

Connect Table
ID, Connect

Make ID the primary key in the Main Table and a non-unique index in the
Connect Table
link the tables on ID creating a one-to-many relationship.

Now you can add as many connects as you want to a given ID
without changing the format of the tables.

Now create a query to get all those who have a certain connect (I used
"*Bob*" in my example):

SELECT [Main Table].ID, [Main Table].Name, [Main Table].Default, [Connect
Table].Connect
FROM [Main Table] LEFT JOIN [Connect Table] ON [Main Table].ID = [Connect
Table].ID
WHERE ((([Connect Table].Connect) Like "*Bob*"));

Tom Lake
 
Thank you Tom... I'll give it a try!
--
C


Tom Lake said:
C said:
Hello.. I'm in need of assistance in writing a query. My table has four
columns, id, name, default and all connects. How can I extract all the
ids
that are connected to the same group of connects? Need to find similar
users
that share the same connects.

If you have Connect1, Connect2, Connect3, etc. in your table, I would
suggest you create two tables:

Main Table
ID, Name, Default

Connect Table
ID, Connect

Make ID the primary key in the Main Table and a non-unique index in the
Connect Table
link the tables on ID creating a one-to-many relationship.

Now you can add as many connects as you want to a given ID
without changing the format of the tables.

Now create a query to get all those who have a certain connect (I used
"*Bob*" in my example):

SELECT [Main Table].ID, [Main Table].Name, [Main Table].Default, [Connect
Table].Connect
FROM [Main Table] LEFT JOIN [Connect Table] ON [Main Table].ID = [Connect
Table].ID
WHERE ((([Connect Table].Connect) Like "*Bob*"));

Tom Lake
 
Tom,
just noticed your 'where' statement. I'm not looking for specific connects,
but a listing of all '=' connects between ids. So, I'll try where
((([connect table] = [connect table].connect));

Although I have doubts whether it would produce the desired result.
--
C


Tom Lake said:
C said:
Hello.. I'm in need of assistance in writing a query. My table has four
columns, id, name, default and all connects. How can I extract all the
ids
that are connected to the same group of connects? Need to find similar
users
that share the same connects.

If you have Connect1, Connect2, Connect3, etc. in your table, I would
suggest you create two tables:

Main Table
ID, Name, Default

Connect Table
ID, Connect

Make ID the primary key in the Main Table and a non-unique index in the
Connect Table
link the tables on ID creating a one-to-many relationship.

Now you can add as many connects as you want to a given ID
without changing the format of the tables.

Now create a query to get all those who have a certain connect (I used
"*Bob*" in my example):

SELECT [Main Table].ID, [Main Table].Name, [Main Table].Default, [Connect
Table].Connect
FROM [Main Table] LEFT JOIN [Connect Table] ON [Main Table].ID = [Connect
Table].ID
WHERE ((([Connect Table].Connect) Like "*Bob*"));

Tom Lake
 
Back
Top