🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.envbeh-l
1 messages
1 total messages Started by it2000china Sun, 01 Dec 2002 18:07
how can I build 2 queries in 1 query (VB SQL query)
#35
Author: it2000china
Date: Sun, 01 Dec 2002 18:07
36 lines
1712 bytes
I am thinking to build a query in Ms VB to sort the database

I have 2 tables in Ms access database, 


table1
id1  name
1    abcd
2    defg
3    ghij
4    xhxk
5    fgdj


table2
id2  add1   add2
100  fsjs   jfkh
200  dfgg   ghfg
300  dfgh   jyuj
400  yuuy   jghj
500  jlas   adad


can I use VB SQL query to link this 2 table, set table1.id1*100=table2.id2

I tried below query, but doesn't work.

query1= select table1.id1,table1.name, [id1]*100 as id100 from table1

    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select (query1).name, table2.add1, table2.add2
from (query1) inner join table2 on (query1).idd100=table2.id2"
  Set obj1 = Adodc1.Recordset

anybody can help to build this query in VB. please also forward a message to me at it2000china@yahoo.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads