Article View: borland.public.interbase.sql
Article #703SQL Query - subquery ?
From: RL912
Date: Thu, 26 Jul 2007 10:37
Date: Thu, 26 Jul 2007 10:37
18 lines
1519 bytes
1519 bytes
Hello, I have a table containing Order Data. For this case significant are Article_no, order_date and price. The order records are generated from customers orders, so that the order "5 pcs of 12345, ordered on 01.01.2000 for 12,50$" is translated into "1 of 5 of 12345 from 01.01.2000 for 12,50$;2 of 5 of 12345 from 01.01.2000 for 12,50$;3 of 5 of 12345 from 01.01.2000 for 12,50$" and so forth. Now I need to query price changes from this table in a way, that I get a list containing article_no, order_date, price where order_date is the date, this price is used for this article for the first time. I am not really used to sql and did not find a solution. TIA Rolf
Technical Details
Message-ID:
<46a8795d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,6e40cb137d867437,start X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 26 Jul 2007 12:37:18 +0200 From: RL912 <rl@werkstatt22.de> User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: borland.public.interbase.sql Subject: SQL Query - subquery ? Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.143.197.27 Message-ID: <46a8795d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1185446237 80.143.197.27 (26 Jul 2007 03:37:17 -0700) Lines: 18 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail