🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.databases
Article #201

Re: There must be a way..

#201
From: Ian Jennings
Date: Wed, 16 Oct 2002 05:35
39 lines
2416 bytes
"Ed Edwards, Jr." wrote:
> 
> This did seem simple at first, but I can't find an SQL statement that will
> do it all in one shot.
> 
> The best I could come up with was:
> 
> Create a temp table containing all the fields from TableA and TableB and
> then - insert into TableTemp select * from TableA, TableB
> 
> Then -
> select AName, BDate, CValue
> from TableTemp left join TableC
> on (TableA.Akey = TableC.Akey) and
>      (TableB.Bkey = TableC.Bkey)
> 
> I WOULD have expected a better way!
> 
> Ed

Hi Ed,

I've *sort* of done it with a work-around. I've created a proc on the
server that does the inserts into TableB and TableC and returns the key,
then I catch the 'insert' in the app, cancel, put the key into the
master table (TableB) TTable and set both tables to Edit.

It's not quite what I had in mind and I'm sure it's going to lead to
other problems later, a work-around usually does. :) 

Thanks for your help.

-- 
************************************************************
Ian Jennings
Microware Data Services Limited

This post is made entirely from recycled ones and noughts
************************************************************
Technical Details
Message-ID: <3DACFABA.6D91B30C@microwaredata.co.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!peer1.news.newnet.co.uk!not-for-mail
References: <3DAC3097.114A2197@microwaredata.co.uk> <aoi09v$qk1$1@bob.news.rcn.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,f8a8d7f2f6085c7b
X-Google-Attributes: gidffff5,public
X-Google-Thread: fb0ea,f8a8d7f2f6085c7b
X-Google-Attributes: gidfb0ea,public
X-Google-ArrivalTime: 2002-10-15 22:37:30 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!peer1.news.newnet.co.uk!not-for-mail
Message-ID: <3DACFABA.6D91B30C@microwaredata.co.uk>
Date: Wed, 16 Oct 2002 06:35:54 +0100
From: Ian Jennings <ij@microwaredata.co.uk>
Organization: Microware Data Services Ltd
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi.vcl.components.using
Subject: Re: There must be a way..
References: <3DAC3097.114A2197@microwaredata.co.uk> <aoi09v$qk1$1@bob.news.rcn.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 39
NNTP-Posting-Date: 16 Oct 2002 06:36:14 BST
X-Trace: DXC=XgMF:51U[k]3BH:3UjR70XLRVHVF@^OU]hQFj?h[^V4QEVSLhKkj0;VoCRJOJf:>]_f^Qk^FNZ]7Q
X-Complaints-To: news-abuse@newnet.co.uk (please include full headers)