Article View: dk.edb.database
Article #1InSQL-calls to 2 databases
From: Peder
Date: Tue, 17 Jul 2001 15:36
Date: Tue, 17 Jul 2001 15:36
53 lines
3083 bytes
3083 bytes
Dear group, I hope someone can help me out... I call a SQL-database to get starttime and endtime for a process on a given product (=LotID) To find the starttime: SELECT LotID, Lot.Transaction, Route, Resource.Time FROM Lot, Resource WHERE LotId like '0105M3' AND Route=1 AND Lot.time=Resource.time The result could be: LotID Transaction Route Time 0105M3 START 1 22-06-01 13:14:34 To find the endtime: SELECT LotID, Lot.Transaction, Route, Resource.Time FROM Lot, Resource WHERE LotId like '0105M3' AND Lot.Transaction='COMPLETE' AND Lot.time=Resource.time The result of this could be: LotID Transaction Route Time 0105M3 COMPLETE 2 22-06-01 14:10:53 Then I use these times (Time) to call another database on the same server. For this I need to use ODBC: SELECT * FROM OpenQuery(INSQL," SELECT DateTime, B1G, B1S, B2W, B3G FROM Runtime.dbo.AnalogWideHistory WHERE DateTime >= '22-06-01 13:14:34' AND DateTime <= '22-06-01 14:10:53' AND wwresolution=100 ") The result are the columns of data that I need: DateTime B1G B1S B2W B3G I need to do this maneuvre in one go, and not via many calls. Is there a way to do this? mvh Peder / www.nst.com
Technical Details
Message-ID:
<jYY47.156$XK6.25220@news.get2net.dk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news1.ebone.net!news.ebone.net!newsrouter.euroconnect.net!newsfeed1.uni2.dk!news.get2net.dk!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b2b7,760b37ad7aa63bbf,start X-Google-Attributes: gid10b2b7,public X-Google-Thread: f6a8b,760b37ad7aa63bbf,start X-Google-Attributes: gidf6a8b,public X-Google-Thread: fcdf9,760b37ad7aa63bbf,start X-Google-Attributes: gidfcdf9,public X-Google-Thread: ff75c,760b37ad7aa63bbf,start X-Google-Attributes: gidff75c,public X-Google-Thread: f5cad,760b37ad7aa63bbf,start X-Google-Attributes: gidf5cad,public X-Google-Thread: ff0ac,760b37ad7aa63bbf,start X-Google-Attributes: gidff0ac,public X-Google-Thread: 10f47b,760b37ad7aa63bbf,start X-Google-Attributes: gid10f47b,public X-Google-Thread: 10de66,760b37ad7aa63bbf,start X-Google-Attributes: gid10de66,public X-Google-ArrivalTime: 2001-07-17 08:38:03 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news1.ebone.net!news.ebone.net!newsrouter.euroconnect.net!newsfeed1.uni2.dk!news.get2net.dk!not-for-mail Newsgroups: dk.edb.database,borland.public.delphi.database.ado,borland.public.delphi.database.desktop,borland.public.delphi.database.sqlservers,comp.databases.filemaker,comp.databases.ibm-db2,comp.databases.informix,comp.databases.ms-access,comp.databases.ms-sqlserver,comp.databases.oracle.misc Subject: InSQL-calls to 2 databases From: psh@nst.com (Peder) Organization: NST User-Agent: Xnews/2.11.08 Followup-To: poster Lines: 53 Message-ID: <jYY47.156$XK6.25220@news.get2net.dk> Date: Tue, 17 Jul 2001 15:36:47 GMT NNTP-Posting-Host: 129.142.144.252 X-Complaints-To: abuse@uni2.dk X-Trace: news.get2net.dk 995384207 129.142.144.252 (Tue, 17 Jul 2001 17:36:47 MET DST) NNTP-Posting-Date: Tue, 17 Jul 2001 17:36:47 MET DST