UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Query Help(sqlite)    
 
   
Kamulegeya
post Oct 22 2014, 03:24 AM
Post#1



Posts: 1,767
Joined: 5-September 10
From: Kampala,Uganda The Pearl of Africa


Hello Community,
I have tables Apartments(id,Number),Tenancy(id,apartmentid),Invoices(id,tenancyid),Payments(id
,invoiceid,amount,paymentdate)
I want to list all payments for a given Apartment number
CODE
SELECT Apartments.Number,Payments.paymentdate,Payments.amount
               from Payments
    inner join Invoices  on Invoices._id=Payments.invoiceid    
       inner join Tenancy on Tenancy.apartmentid= Apartments.id

There is no query designer interface....but i get an error (no such column Apartments.Number) but it is there.
So i suspect an error with the joins..any suggestion?
Go to the top of the page
 
ranman256
post Oct 22 2014, 07:25 AM
Post#2



Posts: 788
Joined: 25-April 14



If the APT.NUMBER is there it will work BUT you could be getting a mis-directed error....via
Why do you have an underscore in Invoices._id ?
Go to the top of the page
 
Kamulegeya
post Oct 22 2014, 07:36 AM
Post#3



Posts: 1,767
Joined: 5-September 10
From: Kampala,Uganda The Pearl of Africa


Hello,
See the attached image for the actual table names and fields
Attached File(s)
Attached File  db.png ( 161.86K )Number of downloads: 9
 
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    15th December 2017 - 08:59 AM