- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_НАЦ' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.Percent' + R + ' AR_Percent';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_КАТ' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.ID_ArtCat' + R + ' AR_ID_ArtCat';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_ВЕС' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.Weight' + R + ' AR_Weight';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_ОБЪЕМ' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.Capacity' + R + ' AR_Capacity';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'МИННАЦ' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.MinDiscount' + R + ' AR_MinDiscount';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_МИНКОЛ' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.MinQuantity' + R + ' AR_MinQuantity';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_СТАТУС' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.Status' + R + ' AR_Status';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_ГТД' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'AR.GTD' + R + ' AR_GTD';
if (TableData = 1) or ((TableData = 2) and
(Pos(FieldDelim + 'Т_СТРАНА' + FieldDelim, OpArtFields) > 0)) then
sSelect := sSelect + ', ' + LMax + 'CO.Name' + R + ' AR_Country';
Собирание SQL - запроса для выборки полей. И это маленький кусочек :)
Серьёзная контора с миллиардными оборотами!