dbTalk Databases Forums  

relations codebase

comp.databases.xbase.codebase comp.databases.xbase.codebase


Discuss relations codebase in the comp.databases.xbase.codebase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
beboprich@gmail.com
 
Posts: n/a

Default relations codebase - 07-10-2012 , 11:54 AM






We've a doubt about using relations in codebase:

We have a relationship between a couple of tables, Producto and PromocionSucursal. Into Producto we have a complete serie of records (about 23,000). Into PromocionSucursal we only have part of those records (6,300 records). In Transact SQL to get all the records of table Producto and also to know which of them have a relationship with ProductoSucursal, we execute the next script:

Select p.idProducto, ps.idPromocion
From Producto p, PromocionSucursal ps
Where p.idPRoducto *= ps.idPRoducto
And ps.idSucursal = 1

If we don't use the operator *= in this script, we only get the 6,300 records we have into the table PromocionSucursal.
Using the operator *= we get 23,000 records, some of them comes with nullvalues on the field idPromocion that implies that those records has not relation.

In code base we donīt know how to reply the same behavior, I mean, to usetwo different tables and make a join to recover all values with the same script, considering that one of the tables are not going to have all world of records that we have in the other.

We appreciate any suggestions.

Regards

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.