Не думаю, что стОит поверить YuraZ'у, иначе клиент СМ не посылал бы следующую серию запросов к базе для того чтобы показать мне товары из ассортимента '3.' внутри которого карточка с артикулом 019416
Код:
select distinct TMain.Article,TMain.Name,TMain.Accepted,TMain.DataType,TMain.DataSubType,TMain.ScaleLoad,TMain.CashLoad,TMain.ReceiptOk,TMain.CardComment
from Supermag.SMCard TMain,Supermag.SMCardAssort R1, Supermag.SACardAssort R2
where (R2.Tree='3.' and R2.ID=R1.IDAssort and
TMain.Article=R1.Article)
order by TMain.Article
select TMain.Article,TMain.GlobalArticle,TMain.ArrivedFrom,TMain.Name,TMain.ShortName,TMain.IDMeasurement,TMain.IDClass,TMain.Accepted,TMain.DataType,TMain.DataSubType,TMain.ScaleLoad,TMain.CashLoad,TMain.ReceiptOk,TMain.Storage,TMain.Deadline,TMain.Losses,TMain.Scrap,TMain.Waste,TMain.MesName,TMain.MesAbbrev,TMain.CardComment,TMain.Country,TMain.Flags,TMain.CutPriceDays,TMain.IDScale,TMain.SubArticle,TMain.MinProfit,TMain.SupplyPricePercentP,TMain.SupplyPricePercentM,TMain.IDThreeTorg,TMain.IDOneTorg,Supermag.SACardClass.Tree,Supermag.SACardClass.Name,nvl(TMain.MesName,Supermag.SAMeasurement.Name),nvl(TMain.MesAbbrev,Supermag.SAMeasurement.Abbrev),BornIn
from Supermag.SMCard TMain,Supermag.SACardClass,Supermag.SAMeasurement
where Supermag.SACardClass.ID=TMain.IDClass
and Supermag.SAMeasurement.ID=TMain.IDMeasurement
and TMain.Article=:V0001
select TMain.Article,TMain.GlobalArticle,TMain.ArrivedFrom,TMain.Name,TMain.ShortName,TMain.IDMeasurement,TMain.IDClass,TMain.Accepted,TMain.DataType,TMain.DataSubType,TMain.ScaleLoad,TMain.CashLoad,TMain.ReceiptOk,TMain.Storage,TMain.Deadline,TMain.Losses,TMain.Scrap,TMain.Waste,TMain.MesName,TMain.MesAbbrev,TMain.CardComment,TMain.Country,TMain.Flags,TMain.CutPriceDays,TMain.IDScale,TMain.SubArticle,TMain.MinProfit,TMain.SupplyPricePercentP,TMain.SupplyPricePercentM,TMain.IDThreeTorg,TMain.IDOneTorg,Supermag.SACardClass.Tree,Supermag.SACardClass.Name,nvl(TMain.MesName,Supermag.SAMeasurement.Name),nvl(TMain.MesAbbrev,Supermag.SAMeasurement.Abbrev),BornIn
from Supermag.SMCard TMain,Supermag.SACardClass,Supermag.SAMeasurement
where Supermag.SACardClass.ID=TMain.IDClass
and Supermag.SAMeasurement.ID=TMain.IDMeasurement
and TMain.Article=:V0001
select nvl(Article,'019416'),D.ID,D.Name,PropVal
from Supermag.SMCardProperties TMain,Supermag.SACardPropDef D
where TMain.PropID(+)=D.ID
and D.Status='1'
and TMain.Article(+)='019416'
order by D.Name
select TMain.Article,TMain.AltUnit,TMain.Rate
from Supermag.SMAltUnits TMain
where TMain.Article='019416'