Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
Differents DataBases in one SELECT |
Wed, Mar 29 2006 12:46 PM | Permanent Link |
Assoes | Hi
It's possible to use diferents Databases in one SELECT With BDE SELECT Articles.Codi,Clients.Nom FROM "Articles",":NewBase:Clients" WHERE Articles.Codi="000001" AND Articles.Codi=Clients.Codi This use the Table Articles in Database indicate in Query Componen and Table Clients indicate in DataBase NewBase (NewBase is the name of componen DataBase) Is Possible do this in DbiSam ? Regards Robert |
Wed, Mar 29 2006 2:17 PM | Permanent Link |
"GP" | I have a similar problem, I have the following sql script assigned to the
SQL strings of a TDBISAMQuery. However, in the first sql, ("from myTable1") myTable1 resides in a Database/remotedatabasedirectory which is a different location from the (CompanyCodes) in the second query. select userid, if(substring(appldata,6,2)='' then '00' else substring(appldata,6,2)) as Affiliate, if(substring(appldata,8,3)='' then '000' else substring(appldata,8,3)) as ISO into "\Memory\tempfile" from myTable1 where applid=101 and substring(appldata,1,5)='X7000'; select a.userid, a.affiliate, a.ISO, b.AffiliateName, b.IsoName from "\Memory\tempfile" as a, CompanyCodes as b where a.affiliate=b.affiliate and a.iso=b.iso; Any suggestion, anyone? Thanks, George Patena "Assoes" <assoes@assoes.com> wrote in message news:9AB9FF06-F09B-4EF9-98B6-CF1A51C58FD5@news.elevatesoft.com... > Hi > > It's possible to use diferents Databases in one SELECT > > With BDE > > SELECT Articles.Codi,Clients.Nom > FROM "Articles",":NewBase:Clients" > WHERE Articles.Codi="000001" AND Articles.Codi=Clients.Codi > > This use the Table Articles in Database indicate in Query Componen and > Table Clients indicate in DataBase NewBase (NewBase is the name of > componen DataBase) > > Is Possible do this in DbiSam ? > > > Regards > Robert |
Wed, Mar 29 2006 4:14 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Robert,
<< It's possible to use diferents Databases in one SELECT >> Yes, just specify the path in the FROM clause: SELECT * FROM "c:\temp\mytable" INNER JOIN "c:\mydata\temp" ........ or for remote databases, drop the drive designator and just use the database name: SELECT * FROM "\temp\mytable" INNER JOIN "\mydata\temp" ........ -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Mar 29 2006 4:34 PM | Permanent Link |
"GP" | Looking at my problem and your previous post, I found a possible solution,
just prefix the tablename with the databasename, like "databasename\tablename", so in your case, it will be something like: SELECT Articles.Codi, Clients.Nom FROM "Articles","NewBase\Clients" WHERE Articles.Codi="000001" AND Articles.Codi=Clients.Codi "GP" <gp@usa.com> wrote in message news:939BE508-21C8-45C2-93F5-7963E2DA82EC@news.elevatesoft.com... >I have a similar problem, I have the following sql script assigned to the >SQL strings of a TDBISAMQuery. However, in the first sql, ("from >myTable1") myTable1 resides in a Database/remotedatabasedirectory which is >a different location from the (CompanyCodes) in the second query. > > select userid, > if(substring(appldata,6,2)='' then '00' else substring(appldata,6,2)) as > Affiliate, > if(substring(appldata,8,3)='' then '000' else substring(appldata,8,3)) as > ISO > into "\Memory\tempfile" > from myTable1 > where applid=101 and substring(appldata,1,5)='X7000'; > > select a.userid, a.affiliate, a.ISO, > b.AffiliateName, b.IsoName > from "\Memory\tempfile" as a, CompanyCodes as b > where a.affiliate=b.affiliate and a.iso=b.iso; > > Any suggestion, anyone? > > Thanks, > George Patena > > "Assoes" <assoes@assoes.com> wrote in message > news:9AB9FF06-F09B-4EF9-98B6-CF1A51C58FD5@news.elevatesoft.com... >> Hi >> >> It's possible to use diferents Databases in one SELECT >> >> With BDE >> >> SELECT Articles.Codi,Clients.Nom >> FROM "Articles",":NewBase:Clients" >> WHERE Articles.Codi="000001" AND Articles.Codi=Clients.Codi >> >> This use the Table Articles in Database indicate in Query Componen and >> Table Clients indicate in DataBase NewBase (NewBase is the name of >> componen DataBase) >> >> Is Possible do this in DbiSam ? >> >> >> Regards >> Robert > > |
This web page was last updated on Monday, May 6, 2024 at 01:09 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |