If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
SQL
I decided to repost this question because the response i got didnt work, it
was giving me this error" Syntax error in the FROM clause". Lynn Trap, thanks(atleast I have i have an idea), please give me another syntax or check the syntax you gave me. I have two SQL statements, one is giving me the total Quantity available(from Stock table) and the other one is giving me the total number of Quantity sold out.(from Sales Table). All these are GROUPED BY Item Name e.g Handbags 3 Shoes 10 Is there a way of creating another SQL statement that will subtract the Quantity sold from the total Quantity available so that I know the STOCK REMAINING. I need the syntax |
#2
|
|||
|
|||
1) Make sure in both queries you have StockCode
2) Make new query and insert both queries, link by StockCode 3) Add fields to query: StockCode, QtyAvail, QtySold, (QtyAvail-QtySold) Evan Camilleri "Wantula" wrote in message ... I decided to repost this question because the response i got didnt work, it was giving me this error" Syntax error in the FROM clause". Lynn Trap, thanks(atleast I have i have an idea), please give me another syntax or check the syntax you gave me. I have two SQL statements, one is giving me the total Quantity available(from Stock table) and the other one is giving me the total number of Quantity sold out.(from Sales Table). All these are GROUPED BY Item Name e.g Handbags 3 Shoes 10 Is there a way of creating another SQL statement that will subtract the Quantity sold from the total Quantity available so that I know the STOCK REMAINING. I need the syntax |
#3
|
|||
|
|||
Can you post the exact SQL statement you tried so someone here can see what
the syntax error might be? -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Wantula" wrote in message ... I decided to repost this question because the response i got didnt work, it was giving me this error" Syntax error in the FROM clause". Lynn Trap, thanks(atleast I have i have an idea), please give me another syntax or check the syntax you gave me. I have two SQL statements, one is giving me the total Quantity available(from Stock table) and the other one is giving me the total number of Quantity sold out.(from Sales Table). All these are GROUPED BY Item Name e.g Handbags 3 Shoes 10 Is there a way of creating another SQL statement that will subtract the Quantity sold from the total Quantity available so that I know the STOCK REMAINING. I need the syntax |
#4
|
|||
|
|||
I've replied to Wantula's question in what I suspect is his original post - please don't post twice, as it gets confusing. You'd be much better off finding your original post and adding a new comment to it - then, people can see everyone's comments.
I think the problem here is that you're trying to do the whole thing in one step. I suspect it's possible, but it would lead to a very complex SQL statement. I personally think you would be better off saving your two SELECT statements as individual queries and then, as the others here and I suggest in the other thread, Join those and do your calculation there. ***************************************** * A copy of the whole thread can be found at: * http://www.accessmonster.com/Uwe/For...sdbdesign/6300 * * Report spam or abuse by clicking the following URL: * http://www.accessmonster.com/Uwe/Abu...a3d781fef5872e ***************************************** |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is Access SQL FROM Clause different from MS SQL Server SQL? | David Perkins | Running & Setting Up Queries | 1 | October 20th, 2004 08:26 PM |
Inconsistent square bracket in Query SQL | Christine | Running & Setting Up Queries | 8 | October 7th, 2004 03:49 AM |
Why is no one USING the product for small business? | jayceejay | New Users | 11 | September 15th, 2004 12:46 AM |
Using sql insert with memo field truncates text data | Graham Meredith | General Discussion | 1 | September 1st, 2004 03:11 AM |
Function isn't available in expressions in query expression | Reiner Harmgardt | General Discussion | 4 | July 21st, 2004 09:30 AM |