Information générale
Catégorie:
Formulaires Web
I don't actually pull from 2 tables separately, I do use the join....here is the method which I access from the BP_RQAC_BO business object.
public DataSet GetRecordsForItemWithOrderQty(string building, string requisitioner, string majorCategory,string subMajorCategory, string minorCategory, string item)
{
// Added bldg, reqnr, maj cat to dataset... 04/07/04 (ps)
return this.GetDataSet("SELECT bp_rqac.*, bo_bldg as building, bo_reqnr as requisitioner, bo_maj as majorCategory, bo_smaj as subMajorCategory, bo_min as minorCategory, bo_item as item, bp_bidod.bo_invqty, bp_bidod.bo_invunit, bp_bidod.bo_delqty, bp_bidod.bo_delunit FROM FINSYS!bp_rqac LEFT OUTER JOIN FINSYS!bp_bidod ON ra_maj = bo_maj AND ra_reqnr = bo_reqnr WHERE ra_reqnr = '" + requisitioner + "' AND ra_maj = '" + majorCategory + "' AND ra_acct = bo_acct AND bo_bldg = '"+ building + "' AND bo_item = '" + item +"' ORDER BY ra_acct");
}
**Disregard the syntax if you catch extra (+) or ("") as I just copied & pasted it in here. This select statement gets me the correct data records.
If you need anymore information that will help, please just let me know. Thanks!
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement