[sqlite] About Joining Multiple Tables

2011-12-31 Thread Sushil Dudhalkar


You are right :-) The lengths are different. I will correct that. Thank you 
Simon. Will remember this for the rest of my life.  
  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] About Joining Multiple Tables

2011-12-31 Thread Sushil Dudhalkar

Try doing a lookup which goes straight from the PO to the Suppliers table:

SELECT 
PO.Po_ID,
PO.Po_Date,
PO.QuoteNum,
PO.PayTerms,
PO.DeliveryDate,
PO.VAt,
PO.SrvcTax,
PO.Amount,
Suppliers.SName,
Suppliers.Address1,
Suppliers.Address2,
Suppliers.City,
FROM PO
LEFT JOIN Suppliers 
ON PO.SuppID = Suppliers.SID 

and see whether that works and does return the data that would correspond to 
the transaction P-1001.

Simon.
Thanks Simon. I did the lookup which goes straight from the PO to the Suppliers 
table. But again the same result. All the fields from the PO table are returned 
but nothing from the Suppliers table. Where could i be wrong? 
Thanks again for your reply.

  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] About Joining Multiple Tables

2011-12-30 Thread Sushil Dudhalkar

Hi! Need Help.

I have these 5 tables

1. PO (Purchase Order)
2. Transactions
3. Items
4. Suppliers
5. Customers

To print my purchase order i Need the Below data

Transactions.DocID,
Transactions.Quantity,
Transactions.Rate,
Items.ItemName,
Items.Unit,
PO.Po_ID,
PO.Po_Date,
PO.QuoteNum,
PO.PayTerms,
PO.DeliveryDate,
PO.VAt,
PO.SrvcTax,
PO.Amount,
Suppliers.SName,
Suppliers.Address1,
Suppliers.Address2,
Suppliers.City,
Customers.CName, 
Customers.Address1,
Customers.Address2,
Customers.City 

My query returns everything but the corresponding Supplier and customer 
records. The query is as under. 

SELECT 
Transactions.DocID,
Transactions.Quantity,
Transactions.Rate,
Items.ItemName,
Items.Unit,
PO.Po_ID,
PO.Po_Date,
PO.QuoteNum,
PO.PayTerms,
PO.DeliveryDate,
PO.VAt,
PO.SrvcTax,
PO.Amount,
Suppliers.SName,
Suppliers.Address1,
Suppliers.Address2,
Suppliers.City,
Customers.CName, 
Customers.Address1,
Customers.Address2,
Customers.City 
FROM Transactions INNER JOIN Items 
ON Transactions.ItemID = items.ItemID 
LEFT JOIN PO 
ON Transactions.DocID = PO.Po_ID 
LEFT JOIN Suppliers 
ON PO.SuppID = Suppliers.SID 
LEFT JOIN Customers 
ON PO.CustID = Customers.CustID 
where Transactions.DocID = "P-1001"

I am a newbie and would be obliged if anyone can guide me. Using SQLite3.

Many thanks and regards
  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-25 Thread Sushil
Hi Nicholas, Dr. David,

Thanks for help.

I got it working by using the /opt/apps/SunStudio11/SUNWspro/bin/cc compiler

with "-xarch=v9 -xcode=abs64" as CFLAGS.


Regards,
Sushil.



On Thu, Jun 24, 2010 at 10:26 PM, Nicolas Williams <
nicolas.willi...@oracle.com> wrote:

> On Thu, Jun 24, 2010 at 01:37:50PM +0530, Sushil wrote:
> > I am looking for 64 bit libsqlite for AIX and Solaris. Is there a
> > place from where I can get them pre-built ?
>
> For OpenSolaris you can find SQLite3 packages, including a 64-bit build
> of the library, in the OpenSolaris IPS /release package repository.
>
> > I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it.
> > But I don't see any option in configure to build it for 64 bits. Will
> > the default library built be 64 bits. ?  If not, then how to build
> > them ?
>
> SQLite3 has no option for building both, 32- and 64-bit objects, nor
> does it have an option to build either.  Which of 32- or 64-bit objects
> you get depends on your compiler's defaults and your CFLAGS.
>
> So, to build SQLite3 in 32- and 64-bit you need to build it twice, and
> one of those times at lease you'll have to add "CFLAGS=..." to your
> ./configure command-line, with <...> replaced with whatever options your
> compiler needs in order to produce whichever of 32- or 64-bit object
> code you want.
>
> Nico
> --
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Sushil
Hi,

I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place from
where I can
get them pre-built ?

I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it. But I
don't see any
option in configure to build it for 64 bits. Will the default library built
be 64 bits. ?
If not, then how to build them ?


Thanks,
Sushil.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users