Author |
Topic |
Jmepoltcn
Starting Member
3 Posts |
Posted - 2013-03-14 : 02:29:24
|
Write a SELECT statement that returns four columns:VendorName From the Vendors tableInvoiceNumber From the Invoice tableInvoiceDate From the Invoice tableBalance InvoiceTotal minus the sum of PaymentTotal and CreditTotalThe result set should have one row for each invoice with a non-zero balance. Sort the result by VendorName in ascending order. |
|
chadmat
The Chadinator
1974 Posts |
Posted - 2013-03-14 : 13:47:06
|
Homework? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-15 : 13:03:10
|
show us what you tried so farThis is not a site for spoonfeeding homework answers!------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2013-03-15 : 13:28:43
|
quote: Originally posted by visakh16 show us what you tried so farThis is not a site for spoonfeeding homework answers!
Yes, that would be these sites:http://www.spoonfeedSQLhomework.com/http://www.domySQLhomeworkforme.com/Let's see how long those domains remain unregistered. |
|
|
Jmepoltcn
Starting Member
3 Posts |
Posted - 2013-03-15 : 16:43:32
|
well the thing is I don't have a database to try it out on all I can do is type out the answer and submit it via MOS word and hope that I get the right answer. This is what I have so far;SELECT VendorName, InvoiceNumber, InvoiceDate, BalanceFROM Vendors JOIN InvoicesWHERE ORDER BY I don't understand the balance and how to do it especially for multiple tablesP.S. fake URLs... funny... I knew just by reading them |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-03-15 : 16:59:34
|
>>all I can do is type out the answer ... and hope that I get the right answerI think there is another option. You could review your study materials, read the text, and look at, and try to understand, the examples.Finally, if all else fails, ask robvolk specifically to help you. I think he was this close to giving you the answer.Be One with the OptimizerTG |
|
|
Jmepoltcn
Starting Member
3 Posts |
Posted - 2013-03-16 : 02:39:12
|
okay, yeah I have read all of the material, watched the videos, the Power point presentations and searched the internet, and although I am fairly computer savvy this database/sql stuff is like trying to understand chinese... I have probably 6-8 hours into this one question and it sounds to me as though you all don't even know how to do it either so why do you even have this forum if you don't know how to do this stuff either |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-03-16 : 14:22:18
|
Can download SQL Server Express Edition. Free.http://www.microsoft.com/en-us/download/details.aspx?id=29062 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-03-18 : 11:39:00
|
quote: Originally posted by Jmepoltcn okay, yeah I have read all of the material, watched the videos, the Power point presentations and searched the internet, and although I am fairly computer savvy this database/sql stuff is like trying to understand chinese... I have probably 6-8 hours into this one question and it sounds to me as though you all don't even know how to do it either so why do you even have this forum if you don't know how to do this stuff either
Well, in a way you are right. We don't know how to solve your problem because we don't know what tables are in your model how they relate to each other. It's like calling someone for directions and asking, "how do I get home?". If they don't know where you are and where you live then even Atlas himself can't help you. I suspect you have at least two problems: How, syntactically, to form a SELECT statement from multiple tables. And how is your data model organized to store invoice, payments, and vendor information.For help with the syntax Books online is a great resource. Also, you can probably randomly select any topic on this forum site to see examples. For help with your data model you would need to provide specific details to us as to the tables, their structure including the primary keys and foreign keys.Be One with the OptimizerTG |
|
|
Vinothkumar
Starting Member
8 Posts |
Posted - 2013-03-20 : 02:15:36
|
Hi Jmepoltcn,Could you show your table structure and what are the column using in your table.RegardsVinoth |
|
|
|