DB select (read)
AccessRights.pas:    q.SQL.Add('SELECT *');
AccessRights.pas:    q.SQL.Add('FROM tUser');
AccessRights.pas:        q.SQL.Add('SELECT *');
AccessRights.pas:        q.SQL.Add('FROM tUserFunction');
AdminCharges.pas:  qryStringList.Add('DELETE FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (tTransaction INNER JOIN tTransactionType '+
AdminCharges.pas:  qryStringList.Add('SELECT ParmNumber FROM tParameter');
AdminCharges.pas:  qryStringList.Add('SELECT id FROM tStatus');
AdminCharges.pas:  qryLook.SQL.Add('SELECT id, description FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tCustomer ' +
AdminCharges.pas://  if qryTN['RentFrom'] <> Null then begin
AdminCharges.pas:  if qryTN['FromDate'] <> Null then begin
AdminCharges.pas:    sListFields := sListFields+ 'FromDate,';
AdminCharges.pas:      StandardDateString(qryTN.FieldByName('FromDate').AsDateTime) +''',';
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  qryStringList.Add('SELECT Count(*) AS TotalCount');
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add(' FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('SELECT TN.*, tDiscount.DiscountRate');
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add('  Min(tTransaction.FromDate) AS "FromDate",');
AdminCharges.pas://    'THEN tTransaction.FromDate END) AS RENTFROM,');
AdminCharges.pas:  qryStringList.Add(' FROM (tTransaction');
AdminCharges.pas:var                                 // processed in a single SELECT statement.
AdminCharges.pas:  // Must gather the data from the tTransaction table - it is best to
AdminCharges.pas:    SQL.Add('SELECT ParmNumber');
AdminCharges.pas:    SQL.Add('FROM tParameter');
AdminCharges.pas:      SQL.Add('SELECT tBatchType.EarlyRevenue');
AdminCharges.pas:      SQL.Add('FROM tBatch');
AdminCharges.pas:    qryStringList.Add('SELECT *');
AdminCharges.pas:    qryStringList.Add('FROM (SELECT (TN2.RENT + TN2.CALL + TN2.OTHER) AS TOTAL, TN2.*,'+
AdminCharges.pas:    qryStringList.Add('FROM ((SELECT TN1.ServiceID,' +
AdminCharges.pas:    qryStringList.Add('  Min(TN1.FromDate) AS "FromDate",');
AdminCharges.pas://      ' TN1.FromDate END) AS RENTFROM,');
AdminCharges.pas:    qryStringList.Add(' FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:    qryStringList.Add('   tTransaction.FromDate, tTransaction.ToDate,');
AdminCharges.pas:    qryStringList.Add('  FROM tTransaction LEFT JOIN ');
AnnualCharges.pas:  sFromDate : string;
AnnualCharges.pas:  sFromDate := FormattedDateString(dStartDate);
AnnualCharges.pas:  sMonth := IntToStr(Month(dStartDate));   // Query selects annual charge month.
AnnualCharges.pas:  qryDC.SQL.Add('SELECT ID, Description');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tTransactionType');
AnnualCharges.pas:  qryDC.SQL.Add('SELECT ID');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tCustomer');
AnnualCharges.pas:  qryDC.SQL.Add('SELECT ID');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tSystem');
AnnualCharges.pas:    Add('SELECT AC.*');
AnnualCharges.pas:    Add('FROM (SELECT tServiceID.ServiceID, tServiceID.Description, '+
AnnualCharges.pas:    Add('FROM (((tServiceID');
AnnualCharges.pas:      sListFields := sListFields + 'FromDate,';
AnnualCharges.pas:      sListValues := sListValues +''''+ sFromDate +''',';
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
AnnualCharges.pas:      qryStringList.Add('FROM ((tDataCollection');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
AnnualCharges.pas:      qryStringList.Add('FROM tDataCollection');
AnnualCharges.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
AnnualData.pas:    SQL.Add('DELETE FROM tFaultDetails');
AnnualData.pas:    SQL.Add('Select Call.CallNumber, Call.LastName, Call.FirstName,');
AnnualData.pas:    SQL.Add('FROM Call');
AnnualData.pas:      SQL.Add('FROM (SELECT tBatchType.Description');
AnnualData.pas:      SQL.Add('FROM tBatchType');
AnnualData.pas:    SQL.Add('SELECT ID');
AnnualData.pas:    SQL.Add('FROM tFaultDetails');
AnnualData.pas:          'from Quetzal?', mtConfirmation, [mbYes, mbNo], 0) = mrYes) then begin
AnnualData.pas://      SQL.Add('FROM (SELECT DC.ID, CAST(fd.Availability AS varchar) AS Var02');
AnnualData.pas://      SQL.Add('	FROM tFaultDetails fd');
AnnualData.pas:      SQL.Add('FROM (SELECT TmpDC.ID, TmpDC.Var02');
AnnualData.pas:      SQL.Add('	FROM (SELECT TOP 10000 DC.ID, CAST(fd.Availability AS varchar) AS Var02, '+
AnnualData.pas:      SQL.Add('  FROM tDataCollection dc');
AnnualData.pas:      SQL.Add('	FROM tDataCollection dc');
AnnualData.pas:      SQL.Add(' FromDate, ToDate, BatchID, Var01, Var02)');
AnnualData.pas:      SQL.Add('SELECT DC.SequenceNo, DC.ServiceID, DC.ServiceType,');
AnnualData.pas:      SQL.Add(' DC.FromDate, DC.ToDate, DC.BatchID,');
AnnualData.pas:      SQL.Add('FROM tDataCollection DC');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) '+
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT COUNT(*) AS "InvoiceNo"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "TotalCredits"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
CodeFile.pas:  qryString.Add('SELECT TN1.RentAmt, TN1.CallAmt, TN1.OtherAmt, '+
CodeFile.pas:  qryString.Add('FROM ((((((((((SELECT TXN.ServiceID, TXN.ServiceTypeID, '+
CodeFile.pas:  qryString.Add('FROM ('+TransactionTable+' TXN');
CodeFile.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
CodeFile.pas:      SQL.Add('FROM tBatch');
CodeFile.pas:          SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:          SQL.Add('SELECT COUNT(*) AS TotalAll');
CodeFile.pas:          SQL.Add('FROM tTransaction');
CodeFile.pas:              SQL.Add('SELECT ParmText FROM tParameter');
ConstantValues.pas:  // Program BatchType selections.
CriticalTests.pas:  // Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('SELECT * FROM tCriticalCheck');
CriticalTests.pas:    qryStringList.Add('FROM tCriticalCheck');
CriticalTests.pas:// Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryDC.SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:    qryStringList.Add('SELECT COUNT(*) AS MissedNum');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:    qryStringList.Add('LEFT JOIN (SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:      qryStringList.Add('SELECT SID.ServiceID, SID.AccountNo');
CriticalTests.pas:      qryStringList.Add('FROM (SELECT tServiceID.ServiceID, '+
CriticalTests.pas:      qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:      qryStringList.Add('LEFT JOIN (SELECT tDataCollection.ServiceID');
CriticalTests.pas:      qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:          ' Services Omitted From The Invoice');
CriticalTests.pas:  qryStringList.Add('SELECT DC2.*');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:  qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:    qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT DC2.ServiceID, DC2.SID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT tBatch.BatchTypeID');
CriticalTests.pas:  qryStringList.Add('FROM tBatch');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT DC2.ServiceID, DC2.SID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT *');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT ServiceID,');
CriticalTests.pas:  qryStringList.Add('FROM tServiceSplit');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ID AS SID, DC.ServiceID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT DC.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('SELECT tBatchType.*, tBatch.BatchStatusID');
CriticalTests.pas:  qryStringList.Add('FROM tBatchType INNER JOIN tBatch');
CurrentRentCalls.pas:// Called when tTransaction transactions are created from tDataCollection data.
CurrentRentCalls.pas:    Add(' (SELECT DISTINCT tTransaction.ServiceID');
CurrentRentCalls.pas:    Add(' FROM tTransaction');
CurrentRentCalls.pas:    Add('FROM (SELECT tTransaction.ServiceID, tTransaction.ServiceTypeID,');
CurrentRentCalls.pas:    Add('FROM ((tTransaction');
DateFunctions.pas:{ Some general functions first to simplify the transition from dBase to Delphi4.}
DateFunctions.pas:  // An error happens if the day for this month is invalid.  Then, select
DateFunctions.pas:  // An error happens if the day for this month is invalid.  Then, select
DateFunctions.pas:  // An error happens if the day for this month is invalid.  Then, select
DateFunctions.pas:// Retrieve the month name from the stringlist slMonth,
DateFunctions.pas:// Retrieve the month number from the stringlist slMonth,
DubiousTests.pas:    Add('SELECT * FROM tDubiousResult');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('SELECT TN2.*');
DubiousTests.pas:    Add('FROM (SELECT tTransaction.ServiceID, '+
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('SELECT TN2.*');
DubiousTests.pas:    Add('FROM ((SELECT tTransaction.ServiceID, ' +
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('SELECT BatchTypeID');
DubiousTests.pas:    SQL.Add('FROM tBatch');
DubiousTests.pas:    SQL.Add('SELECT PARMNUMBER AS "TariffVariance"');
DubiousTests.pas:    SQL.Add('FROM tParameter');
DubiousTests.pas://    Add('SELECT TN.*');      // For testing / evaluation only.
DubiousTests.pas:    Add('SELECT DISTINCT TN.ServiceID, TN.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN3.ServiceID, TN3.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN2.ServiceID, TN2.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN1.*,');
DubiousTests.pas:    Add('FROM (SELECT ServiceID, CustomerID, Count(*) AS "NumCalls",');
DubiousTests.pas:    Add('FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('SELECT ParmNumber FROM tParameter');
DubiousTests.pas:    Add('SELECT SID.ServiceID, SID.CustomerID,');
DubiousTests.pas:    Add('FROM (SELECT TN.ServiceID, TN.CustomerID,'+
DubiousTests.pas:    Add('FROM (SELECT DISTINCT tTransaction.ServiceID, '+
DubiousTests.pas:    Add(' FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('SELECT tTransaction.ServiceID, tTransaction.CustomerID, '+
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    Add('AND tCostRange.CostRangeFrom IS NOT NULL');
DubiousTests.pas:    Add('AND (tTransaction.AmountIncGST < tCostRange.CostRangeFrom');
DubiousTests.pas:    SQL.Add('FROM tDubiousResult');
DubiousTests.pas:    Add('SELECT tBatchType.*');
DubiousTests.pas:    Add('FROM tBatchType INNER JOIN tBatch');
FileFunctions.pas: Reads a delimited string from FName and saves each line into a single
FileFunctions.pas:  ReadString: string;                  // Read in from the text file.
Filter.pas:    edtFromDate: TDateEdit;
Filter.pas:    lblFromDate: TLabel;
Filter.pas:  slQuery1.Add('SELECT *');                                                // 0.
Filter.pas:  slQuery1.Add('FROM (SELECT FT1.*, tCustomer.ShipTo, tServiceID.ServiceID, '+
Filter.pas:  slQuery1.Add('FROM (SELECT tFinalisedTransaction.ServiceID AS "SID", '+
Filter.pas:  slQuery1.Add('FROM tFinalisedTransaction');                              // 8.
Filter.pas:  lblFromDate.Enabled := cbDate.Checked;
Filter.pas:  edtFromDate.Enabled := cbDate.Checked;
Filter.pas:  if cbDate.Checked then edtFromDate.SetFocus;
Filter.pas:  // Establish selected filter conditions.
GenericPrint.pas:  // on the selection for Edit1.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenFns.pas:  procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:  q.SQL.Add('SELECT ParmText');
GenFns.pas:  q.SQL.Add('FROM tParameter');
GenFns.pas:  qryParam.SQL.Add('SELECT ParmNumber FROM tParameter');
GenFns.pas:  qryStringList.Add('SELECT BatchStatusID FROM tBatch');
GenFns.pas:      qryStringList.Add('FROM tBatch');
GenFns.pas:    sQueryString.Add('SELECT id FROM tUser');
GenFns.pas:      qry.SQL.Add('SELECT ID FROM tUser WHERE UserLogin = '''+sOp+'''');
GenFns.pas:      qryFunction.SQL.Add('SELECT ID FROM tFunction');
GenFns.pas:  qryStringList.Add('FROM '+sTable);
GenFns.pas:  nSelect : integer;
GenFns.pas:  MessageForm.Msg.Caption := 'Transferring selected data ...';
GenFns.pas:  qryStringList.Add('FROM tDataCollection');
GenFns.pas:  for nSelect := 1 to nCount - 1 do begin
GenFns.pas:    sServiceID := FieldValues.Strings[nSelect];
GenFns.pas:  nSelect := qryStringList.Count - 1;
GenFns.pas:  qryStringList[nSelect] := qryStringList[nSelect]+')';
GenFns.pas:  slSQL.Add('SELECT *');
GenFns.pas:  slSQL.Add('SELECT Sum(tDataCollection.AmountExGST) AS TotalExGST, '+
GenFns.pas:procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:  nSelect : integer;
GenFns.pas:    qryStringList.Add('FROM tDataCollection');
GenFns.pas:      for nSelect := 1 to nCount - 1 do begin
GenFns.pas:        sServiceID := FieldValues.Strings[nSelect];
GenFns.pas:      end;  // for nSelect := 1 to nCount - 1 do begin.
GenFns.pas:      nSelect := qryStringList.Count - 1;
GenFns.pas:      qryStringList[nSelect] := qryStringList[nSelect]+')';
GenFns.pas:end;  // procedure DeleteFromDC().
GenFns.pas:// A function to remove any apostrophe from the passed string.
GenFns.pas:// Some general functions to simplify the transition from dBase to Delphi4.
GenFns.pas:    SQL.Add('SELECT Sum(CASE DC.AmountIncGST WHEN NULL '+
GenFns.pas:    SQL.Add('FROM tDataCollection AS DC');
GenFns.pas:  sFromDate : string;
GenFns.pas:    SQL.Add('SELECT DISTINCT tServiceID.ServiceTypeID');
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('SELECT tBatch.RentStartDate, tBatch.RentEndDate');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      sFromDate := 'NULL';
GenFns.pas:      sFromDate := ''''+FormattedDateString(FieldByName('RentStartDate').AsDateTime)+'''';
GenFns.pas:    SQL.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID, '+
GenFns.pas:    SQL.Add('SELECT SID.ServiceID, SID.BatchID, SID.FromDate, SID.ToDate, '+
GenFns.pas:    SQL.Add('FROM (SELECT tServiceID.ServiceID AS "ServiceID",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "FromDate",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "ToDate",');
GenFns.pas:    SQL.Add('FROM tServiceID');
GenFns.pas:    SQL.Add('(SELECT DISTINCT tDataCollection.ServiceID');
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('DELETE FROM tFaultDetails');
GenFns.pas:    SQL.Add('Select c.CallNumber, c.LastName, c.FirstName,');
GenFns.pas:    SQL.Add('FROM Call c');
GenFns.pas:    SQL.Add('SELECT ParmField');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:    SQL.Add('SELECT ParmField');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:      SQL[0] := 'SELECT '+sValue;
GenFns.pas:// This procedure creates a CSV file from the query parameter and saves it
GenFns.pas:// in the directory selected below and the filename chosen below.
GenFns.pas:    SaveDialog.Title := 'Save the selected table values in CSV format';
GenFns.pas:      // Use the default directory obtained from tParameters.
GenFns.pas:    SQL.Add('SELECT COUNT(*) AS nTotal');
GenFns.pas:    SQL.Add('FROM tFaultDetails');
GenFns.pas:      SQL.Add('FROM (SELECT LTRIM(CAST(tFaultDetails.Availability AS varchar(12)))'+
GenFns.pas:      SQL.Add(' FROM tFaultDetails');
GenFns.pas:    SQL.Add('SELECT BillingPeriod');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      SQL.Add('SELECT Var01');
GenFns.pas:      SQL.Add('FROM tDataCollection');
InitFns.pas:  qryStringList.Add('SELECT id FROM tBatchStatus');
Main.pas:    qAdminDetailDateFrom: TDateTimeField;
Main.pas:    qAdminSummaryDateFrom: TDateTimeField;
Main.pas:    qRelExpTransactSummaryDateFrom: TDateTimeField;
Main.pas:    sbtnSelectAll: TSpeedItem;
Main.pas:    qTransactionsFromDate: TStringField;
Main.pas:    mnuToolsSelectMainDatabaseItem: TMenuItem;
Main.pas:    mnuToolsSelectTestDatabaseItem: TMenuItem;
Main.pas:    qMultiManualFromDate: TStringField;
Main.pas:    procedure sbtnSelectAllClick(Sender: TObject);
Main.pas:    procedure mnuToolsSelectMainDatabaseItemClick(Sender: TObject);
Main.pas:    procedure mnuToolsSelectTestDatabaseItemClick(Sender: TObject);
Main.pas:    procedure SetSelectedBatchID( Value: integer );
Main.pas:    procedure SelectAutoColumnHeaders(const nBatch: integer);
Main.pas:    property BillingBatchID: Integer write SetSelectedBatchID;
Main.pas:  SelectedBatchID : Integer;
Main.pas://  SelectedBatchID : Integer;
Main.pas:    qFormCreate.SQL.Add('SELECT DISTINCT tBatch.BillingPeriod');
Main.pas:    qFormCreate.SQL.Add('FROM tBatch');
Main.pas:    qFormCreate.SQL.Add('SELECT *');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    qFormCreate.SQL.Add('SELECT *');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    GetGSTRate;                   // Read GST rate from tParameter - ref GenFns.
Main.pas:procedure TMainForm.SetSelectedBatchID( Value: integer );
Main.pas:    SelectedBatchID := Value;
Main.pas:end;  // SetSelectedBatchID.
Main.pas:  slQueryStringList.Add('SELECT tDataSourceType.DataSource, BH.ID, '+
Main.pas:  slQueryStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:  slQueryStringList.Add('LEFT JOIN (SELECT tBatch.BatchTypeID AS BTypeID, '+
Main.pas:  slQueryStringList.Add(' FROM tBatch');
Main.pas:              MyTreeNode1.SelectedIndex := NodeImageIndex + 1;
Main.pas:          MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:      MyTreeNode1.SelectedIndex := NodeImageIndex + 1;
Main.pas:      MyTreeNode1.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:      MyTreeNode1.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:        MyTreeNode2.SelectedIndex := MyImageIndex + 1;
Main.pas:    MyTreeNode1.SelectedIndex := MyImageIndex + 1;
Main.pas:  mnuToolsSelectMainDatabaseItem.Visible := aAccess[DEVELOPER];
Main.pas:  mnuToolsSelectTestDatabaseItem.Visible := mnuToolsSelectMainDatabaseItem.Visible;
Main.pas:      slStringList.Add('SELECT tDataSourceType.DataSource, BH.ID, '+
Main.pas:      slStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:      slStringList.Add('LEFT JOIN (SELECT tBatch.BatchTypeID AS BTypeID, '+
Main.pas:      slStringList.Add(' FROM tBatch');
Main.pas:    // even if not selected for display in tBatchType.
Main.pas:    qryStringList.Add('SELECT MultiManualEntry');
Main.pas:    qryStringList.Add('FROM tBatchType');
Main.pas:  qryStringList.Add('SELECT tValidAccountNumber.AccountNo AS "ValidAccountNo", '+
Main.pas:  qryStringList.Add('FROM tValidAccountNumber');
Main.pas:  qryStringList.Add('SELECT tBatch.*, tValidAccountNumber.AccountNo, '+
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qryStringList.Add('SELECT TOP 2 tBatch.ID as "Batch", BillingPeriod AS "Period",'+
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:      SelectAutoColumnHeaders(StrToInt((cbBatchTransactions.Text)));
Main.pas:  qrySetBatch.SQL.Add('SELECT tBatch.id, tBatch.BatchStatusID');
Main.pas:  qrySetBatch.SQL.Add('FROM (tBatch');
Main.pas:procedure TMainForm.SelectAutoColumnHeaders(const nBatch: integer);
Main.pas:  qryHeadings.SQL.Add('SELECT tBatchType.*');
Main.pas:  qryHeadings.SQL.Add('FROM tBatch');
Main.pas:end;  // SelectAutoColumnHeaders.
Main.pas:  wSelected : word;
Main.pas:      wSelected := MessageDlg('All Critical errors resolved. '+#13#10+
Main.pas:      if (wSelected = mrYes) then begin
Main.pas:      end;  // if (wSelected = mrYes) then begin.
Main.pas:    slSQL.Add('SELECT BH.*');
Main.pas:    slSQL.Add('FROM (SELECT tBatch.ID AS BatchID, '+
Main.pas:    slSQL.Add('FROM (tBatch');
Main.pas:    slSQL.Add('SELECT tDataCollection.BatchID, '+
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('SELECT C.*');
Main.pas:    slSQL.Add('FROM (SELECT P.BatchID, P.PayableDate, '+
Main.pas:    slSQL.Add('FROM tPayable P');
Main.pas:    slSQL.Add('SELECT *');
Main.pas:    slSQL.Add('FROM (SELECT tFinalisedTransaction.RevenueFlag, '+
Main.pas:    slSQL.Add('FROM tFinalisedTransaction');
Main.pas:    slSQL.Add('SELECT DR.*');
Main.pas:    slSQL.Add('FROM (SELECT TN.*, tDubiousResult.DubiousTypeID, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tTransaction.BatchID, tTransaction.ServiceID, '+
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('SELECT SID2.ServiceID, SID2.Code, SID2.ServiceType, '+
Main.pas:    slSQL.Add('FROM ((((SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:    slSQL.Add('FROM (((((((((tServiceID AS SID '+
Main.pas:    slSQL.Add('SELECT TN.BatchID, tServiceID.ServiceID, TN.DateFrom, '+
Main.pas:    slSQL.Add('FROM (SELECT tTransaction.BatchID, tTransaction.ServiceID,');
Main.pas:      'THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('SELECT tAdjustment.BatchID, tBatchType.Description AS BatchType,');
Main.pas:    slSQL.Add('FROM (tAdjustment');
Main.pas:    slSQL.Add('SELECT DC3.*');
Main.pas:    slSQL.Add('FROM (SELECT DC2.*, tCriticalType.Description AS "Reason"');
Main.pas:    slSQL.Add('FROM (SELECT DC1.*, (DC1.RENT + DC1.CALL + DC1.OTHER) '+
Main.pas:    slSQL.Add('FROM ((((((SELECT DC0.ServiceID, DC0.StatusID, DC0.ServiceTypeID, '+
Main.pas:    slSQL.Add(' Min(DC0.FromDate) AS "FromDate",');
Main.pas://      'DC0.FromDate END) AS "RentFrom",');
Main.pas:    slSQL.Add('FROM ((SELECT DC.*, tServiceType.ID AS ServiceTypeID');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.*, (CASE '+
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('SELECT *');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slSQL.Add('FROM ((tDataCollection');
Main.pas:    slSQL.Add('SELECT TN1.*');
Main.pas:    slSQL.Add('FROM (SELECT TN.BatchID, tServiceID.ServiceID, '+
Main.pas:      'tServiceType.Code, TN.DateFrom, TN.DateTo, TN.Rent, TN.Calls, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tBatch.BillingPeriod, tTransaction.BatchID, '+
Main.pas:    slSQL.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas://      ' THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:  SelectedCount : integer;
Main.pas:  nSelect : integer;
Main.pas:    SelectedCount := RxDBGridCERes.SelCount;
Main.pas:    if (SelectedCount > 0) then begin
Main.pas:      for nSelect := 0 to SelectedCount - 1 do begin
Main.pas:        RxDBGridCERes.GotoSelection(nSelect);
Main.pas:      end;  // for nSelect := 0 to SelectedCount - 1 do begin.
Main.pas:          qBatchSettings.SQL.Add('SELECT TotalAdjustments, GSTAdjustment, '+
Main.pas:          qBatchSettings.SQL.Add('FROM tBatch');
Main.pas:          // Remove adjustments from tDataCollection.
Main.pas:          DeleteFromDC(nThisBatch, slCopyList, lSuccessful);
Main.pas:    end;  // if (SelectedCount > 0) then begin.
Main.pas:  slStrings.Add('SELECT SID2.ServiceID, SID2.Code, SID2.ServiceType, '+
Main.pas:  slStrings.Add('FROM (SELECT SID1.ServiceID, SID1.Code, SID1.ServiceType, '+
Main.pas:  slStrings.Add('FROM (SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:  slStrings.Add('FROM ((((((((tServiceID AS SID '+
Main.pas:    slStrings.Add('SELECT tTransaction.BatchID, tServiceID.ServiceID, '+
Main.pas:      'Min(tTransaction.FromDate) AS "DateFrom",');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  slStrings.Add('SELECT DC.*, tCriticalType.Description AS "CriticalType"');
Main.pas:  slStrings.Add('FROM (SELECT tDataCollection.BatchID, tDataCollection.ServiceID,'+
Main.pas:  slStrings.Add('FROM (tDataCollection');
Main.pas:      SQL.Add('SELECT id FROM tBatchStatus');
Main.pas:      qryStringList.Add('SELECT ID FROM tBatch');
Main.pas:    SQL.Add('SELECT BatchStatusID FROM tBatch');
Main.pas:  // Test if Revenue entries are to be added to tDataCollection from tRate.
Main.pas:  qryStringList.Add('SELECT tBatchType.MultiManualEntry, tBatchType.EarlyRevenue');
Main.pas:  qryStringList.Add('FROM tBatchType');
Main.pas:    // from tDataCollection to tTransactions later by setting RevenueFlag=0.
Main.pas:    qryStringList.Add('AND TransactionTypeID IN (SELECT TT.ID');
Main.pas:    qryStringList.Add('FROM tTransactionType TT');
Main.pas:    qryStringList.Add(' RateDescription, FromDate, ToDate, TransactionTypeID,');
Main.pas:    qryStringList.Add('SELECT DC3.SequenceNo, DC3.ServiceID, DC3.BatchID,');
Main.pas:    qryStringList.Add(' DC3.RateDescription, DC3.FromDate, DC3.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC2.SequenceNo, DC2.ServiceID, DC2.BatchID,');
Main.pas:    qryStringList.Add(' DC2.RateDescription, DC2.FromDate, DC2.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:    qryStringList.Add('FROM (SELECT DC00.DataCollectionID, DC00.ServicetypeID,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:  sImportFromDir : string;
Main.pas:      // Okay button is in regular Initiate screen - process input selected.
Main.pas:                  SQL.Add('SELECT tParameter.ParmText');
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('SELECT tParameter.ParmText');
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('SELECT tParameter.ParmText');
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:            qry.SQL.Add('SELECT tParameter.ParmText');
Main.pas:            qry.SQL.Add('FROM tParameter');
Main.pas:            if qry.Eof then sImportFromDir := ''
Main.pas:            else sImportFromDir := qry.FieldByName('ParmText').AsString;
Main.pas:              TelstraInvoiceFixedEBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceFixedOrigEBS( nNewBatchNumber, sImportFromDir);
Main.pas:              TelstraInvoiceFixedOBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceMobileEBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceMobileOBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              VodafoneInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusFixedInvoice( nProgramID, nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileDataInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:  slQuery.Add('SELECT tSupplier.SupplierName');
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:  slQuery.Add('SELECT tBatch.BatchTypeID, tBatchType.Description');
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:      InitiateNode.Parent.Selected := True;
Main.pas:    if lChangeAll then RxDBGridDubiousSummary.SelectAll;
Main.pas:      slStrings.Add('SELECT tDubiousValidResolution.DubiousResolutionID, '+
Main.pas:      slStrings.Add('FROM tDubiousValidResolution');
Main.pas:          RxDBGridDubiousSummary.GotoSelection(nCount);
Main.pas:    RxDBGridDubiousSummary.UnSelectAll;
Main.pas:  slStrings.Add('SELECT tDubiousValidResolution.DubiousResolutionID, '+
Main.pas:  slStrings.Add('FROM tDubiousValidResolution');
Main.pas:  wSelected : word;
Main.pas:    slStrings.Add('SELECT BatchStatusID');   // Ensure Dubious Tests undertaken.
Main.pas:    slStrings.Add('FROM tBatch');
Main.pas:      slStrings.Add('SELECT TOP 1 ID');      // Test that all errors resolved.
Main.pas:      slStrings.Add('FROM tDubiousResult');
Main.pas:        wSelected := MessageDlg('All results resolved. '+
Main.pas:        if (wSelected = mrYes) then begin
Main.pas:        end;  // if (wSelected = mrYes) then begin.
Main.pas:    SelectAutoColumnHeaders(StrToInt((cbBatchTransactions.Text)));
Main.pas:    SQL.Add('SELECT DISTINCT CB.BatchID');
Main.pas:    SQL.Add('FROM (SELECT DISTINCT BatchID');
Main.pas:    SQL.Add('FROM tPayableDetail');
Main.pas:    SQL.Add('SELECT DISTINCT BatchID');
Main.pas:    SQL.Add('FROM tInvoiceDetail');
Main.pas:    qry.SQL.Add('SELECT tBatch.BatchStatusID');
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    qry.SQL.Add('SELECT tBatch.BatchStatusID');
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:  wSelected : word;
Main.pas:      wSelected := MessageDlg('All errors resolved. Process these transactions'+
Main.pas:      if (wSelected = mrYes) then begin
Main.pas:      else if (wSelected = mrRetry) then begin
Main.pas:        // The following is repeated EXACTLY from the previous test.
Main.pas:      end;  // if (wSelected = mrYes) then begin.
Main.pas:    slStrings.Add('SELECT *');
Main.pas:    slStrings.Add('FROM (SELECT tTransaction.BatchID, tServiceID.ServiceID,');
Main.pas:    slStrings.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:        'Select a Batch in the Batch Status Summary.',
Main.pas:  sDateFrom : string;
Main.pas:    // First, update the date fields from tBatch.
Main.pas:    sDateFrom := FormattedDateString(FirstDayInMonth(dManual));
Main.pas:    slManual.Add('SET FromDate = '''+sDateFrom+''',');
Main.pas:    slManual.Add('SELECT *');
Main.pas:    slManual.Add('FROM tMultiManualData');
Main.pas:      slManual.Add('SELECT DISTINCT tServiceType.Code + '' - '' + '+
Main.pas:      slManual.Add('FROM ((tBatchType');
Main.pas:          AddManualForm.FromDate := dtpCallStartDate.Date
Main.pas:          AddManualForm.FromDate := dtpRentStartDate.Date
Main.pas:          AddManualForm.FromDate := dManual;
Main.pas:    slStrings.Add('SELECT DCDA.*');
Main.pas:    slStrings.Add('FROM (SELECT DCD.BatchID, DCD.ServiceID, DCD.Code, '+
Main.pas:    slStrings.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slStrings.Add('FROM ((tDataCollection');
Main.pas:// Edit the selected transaction group or transaction in tDataCollection.
Main.pas:procedure TMainForm.sbtnSelectAllClick(Sender: TObject);
Main.pas:    RxDBGridCERes.SelectAll;
Main.pas:end;  // sbtnSelectAllClick.
Main.pas:  qry.SQL.Add('SELECT tBatchType.EarlyRevenue');
Main.pas:  qry.SQL.Add('FROM tBatchType');
Main.pas:      ' FromDate, ToDate, RateDescription)');
Main.pas:      ' :FromDate, :ToDate, :RateDescription)');
Main.pas:procedure TMainForm.mnuToolsSelectMainDatabaseItemClick(Sender: TObject);
Main.pas:end;  // mnuToolsSelectMainDatabaseItemClick.
Main.pas:procedure TMainForm.mnuToolsSelectTestDatabaseItemClick(Sender: TObject);
Main.pas:end;  // mnuToolsSelectTestDatabaseItemClick.
Main.pas:// This program manages the importing of data from a Telstra file that
Main.pas:  // Select the source directory.
Main.pas:  OpenDlg.Title := 'Select The Telstra Account Data File';
Main.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
Main.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
Main.pas:      SQL.Add('FROM tValidAccountNumber');
Manual.pas:    lblFrom: TLabel;
Manual.pas:    edtFrom: TDateEdit;
Manual.pas:    procedure SetFromDate(Value: TDateTime);
Manual.pas:    function GetFromDate: TDateTime;
Manual.pas:    property FromDate: TDateTime read GetFromDate write SetFromDate;
Manual.pas:procedure TManualForm.SetFromDate(Value: TDateTime);
Manual.pas:  edtFrom.Date := Value;
Manual.pas:end;    // SetFromDate.
Manual.pas:function TManualForm.GetFromDate: TDateTime;
Manual.pas:  Result := edtFrom.Date;
Manual.pas:end;    // GetFromDate.
Manual.pas:// When a ServiceType is selected, the options available to select from
Manual.pas:    qManualService.SQL.Add('SELECT tServiceType.ID AS ServiceTypeID, '+
Manual.pas:    qManualService.SQL.Add('FROM tServiceType');
Manual.pas:// Called from Main when establishing this Form.
Manual.pas:// the selected batch type.
Manual.pas:    sTemp := 'ServiceID,GSTFlag,AmountExGST,GSTAmount,AmountIncGST,FromDate,ToDate';
Manual.pas:    if (Copy(Trim(edtFrom.Text),1,1) = '/') then
Manual.pas:      sTemp := sTemp + ''''+ FormattedDateString(edtFrom.Date) +''',';
Manual.pas:    SQL.Add('SELECT tTransactionType.id, tTransactionGroup.Description AS "GroupName"');
Manual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:  sFromDate : string;
MultiManual.pas:    SQL.Add('if exists (select * from dbo.sysobjects '+
MultiManual.pas:    SQL.Add('SELECT tTransactionType.id, tTransactionGroup.Description AS "GroupName"');
MultiManual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:    SQL.Add('SELECT tBatch.BatchTypeID, tBatch.BatchStartDate, '+
MultiManual.pas:    SQL.Add('FROM tBatch');
MultiManual.pas:      sFromDate := FormattedDateString(FieldByName('BatchStartDate').AsDateTime);
MultiManual.pas:    SQL.Add('SELECT IDENTITY(int,'+sSeed+',1) AS "SequNo", ServiceID, GSTFlag, ');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Rent AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('SELECT SequNo');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('SELECT IDENTITY(int,'+sSeed+',1) AS "SequNo", ServiceID, GSTFlag, ');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Call AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('SELECT SequNo');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('SELECT IDENTITY(int,'+sSeed+',1) AS "SequNo", ServiceID, GSTFlag, ');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Other AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('SELECT SequNo');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    // FromDate.
MultiManual.pas:    SQL.Add('SET FromDate = NULL');
MultiManual.pas:    SQL.Add('AND FromDate IS NOT NULL');
MultiManual.pas:    SQL.Add('AND DATALENGTH(FromDate) <> 10');
OptusFixed.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
OptusFixed.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusFixed.pas:    SQL.Add('SELECT id');
OptusFixed.pas:    SQL.Add('FROM tSupplier');
OptusFixed.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
OptusFixed.pas:      SQL.Add('FROM tSupplierServiceCode');
OptusFixed.pas:// Data handled is for calls made from Optus fixed phones (PABX).
OptusFixed.pas:  ReadString: string;                  // Read in from the text file.
OptusFixed.pas:            //        for local calls + gst, so omitted from processing (RJC).
OptusFixed.pas:            // Reinstated, but Calls omitted from processing-RJC20060218.
OptusFixed.pas:            // Calls omitted from processing.
OptusFixed.pas:  OpenDlg.Title := 'Select The Optus Input File';
OptusFixed.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobile.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobile.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusMobile.pas:  sCallFrom : string;
OptusMobile.pas:  qryOptus.SQL.Add('SELECT id');
OptusMobile.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobile.pas:    qryOptus.SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
OptusMobile.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobile.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobile.pas:  ReadString: string;                  // Read in from the text file.
OptusMobile.pas://  sRentFrom : string;
OptusMobile.pas://  sCallFrom : string;    // Use global variable instead => update all values.
OptusMobile.pas:  sMonthFrom: string;
OptusMobile.pas:  sYearFrom : string;
OptusMobile.pas://  sRentFrom := '';
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:  sMonthFrom := '';
OptusMobile.pas:  sYearFrom := '';
OptusMobile.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobile.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                  sListValues := sListValues + sCallFrom;
OptusMobile.pas:                sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobile.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobile.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobile.pas://              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
OptusMobile.pas:  sFromDate : string;
OptusMobile.pas:    SQL.Add('SELECT Count(*) AS NumUsers, Sum(AmountExGST) AS AmtMinSpend,');
OptusMobile.pas:    SQL.Add('  Sum(AmountIncGST) AS AmtActualSpend, FromDate,');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('GROUP BY FromDate, ToDate, TransactionTypeID,');
OptusMobile.pas:  sFromDate := qMinSpend.FieldByName('FromDate').AsString;
OptusMobile.pas:      SQL.Add('SELECT Count(*) AS NumUsers, Sum(AmountExGST) AS AmtMinSpend,');
OptusMobile.pas:      SQL.Add('FROM');
OptusMobile.pas:      SQL.Add('  (SELECT tDataCollection.AmountExGST, tDataCollection.AmountIncGST,');
OptusMobile.pas:      SQL.Add('  FROM tDataCollection');
OptusMobile.pas:        sListFields := sListFields + 'FromDate,';
OptusMobile.pas:        sListValues := sListValues + sFromDate +',';
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobile.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobile.pas:    SQL.Add('SELECT LTRIM(RTRIM(ToDate)) AS ToDate');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobile.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobile.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobile.pas:  OpenDlg.Title := 'Select The Optus Input File';
OptusMobile.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobileData.pas:// 131105-RJC Copy from OptusMobile to OptusMobileData.
OptusMobileData.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobileData.pas:  qryOptus.SQL.Add('SELECT id');
OptusMobileData.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobileData.pas:    qryOptus.SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
OptusMobileData.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobileData.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobileData.pas:  ReadString: string;                  // Read in from the text file.
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sMonthFrom: string;
OptusMobileData.pas:  sYearFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:  sMonthFrom := '';
OptusMobileData.pas:  sYearFrom := '';
OptusMobileData.pas:              // 'DV' included but must omit ' AGG' from rental a/c duplicates.
OptusMobileData.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobileData.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                  // If removed 'DV' from calls then use this condition:
OptusMobileData.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                  sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobileData.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobileData.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobileData.pas:    SQL.Add('SELECT Count(*) AS NumUsers, Sum(AmountExGST) AS AmtMinSpend,');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('SELECT Count(*) AS NumUsers');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM (');
OptusMobileData.pas:      SQL.Add('  SELECT origMinSpend.MinSpend, origMinSpend.MinGST,');
OptusMobileData.pas:      SQL.Add('  FROM (');
OptusMobileData.pas:      SQL.Add('    SELECT  (tDataCollection.AmountExGST - '+
OptusMobileData.pas:      SQL.Add('    FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobileData.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobileData.pas:    SQL.Add('SELECT LTRIM(RTRIM(ToDate)) AS ToDate');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobileData.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobileData.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobileData.pas:  OpenDlg.Title := 'Select The Optus Input File';
OptusMobileData.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
Quetzal.pas:    RentFrom : TDateTime;
Quetzal.pas:    CallFrom : TDateTime;
Quetzal.pas:    qryDC.SQL.Add('SELECT '+sFields);          // Add ID to the results.
Quetzal.pas:    qryDC.SQL.Add('FROM tDataCollection');
Quetzal.pas:qryDC.SQL.Add('SELECT ParmText FROM tParameter');
Quetzal.pas:        qryDC.SQL.Add('DELETE FROM tDataCollection');
Quetzal.pas:// Shipto changed from MEG to MEF a/c RLD 080620 (Mainco billing change).RJC.
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('SELECT ID, UPPER(Description) AS UDescription');
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Append('SELECT (CASE');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE Assign');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE');
Quetzal.pas:  qryStringList.Append('FROM ((SELECT Name2.*, Client.Ref3 AS Owner');
Quetzal.pas:  qryStringList.Append('FROM (SELECT Call.ClientCode, Call.CallNumber, '+
Quetzal.pas:  qryStringList.Append('FROM (SELECT CONVERT(Char(10),Call.LogDatTim,103) '+
Quetzal.pas:  qryStringList.Append('FROM Call');
Quetzal.pas:  qryStringList.Append('LEFT JOIN (SELECT Logon.Ref3 AS LocOwner, Call.CallNumber');
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Logon '+
Quetzal.pas://  qryStringList.Add('LEFT JOIN (SELECT Configuration.Ref2 AS TrainOwner, '+
Quetzal.pas:  qryStringList.Append('LEFT JOIN (SELECT Configuration.Ref1 AS TrainOwner, '+
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Configuration '+
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('SELECT ID, UPPER(Description) AS UDescription');
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:    Add('SELECT');
Quetzal.pas:    Add('FROM call');
Quetzal.pas:// Added Radio Services a/c RLD-transition in name from Dynon - RJC:110108.
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate ;
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('SELECT ID, UPPER(Description) AS UDescription');
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Add('SELECT ''DOH'' AS Owner1, ''DOH'' AS Cust_ID, 1 AS Bill, '+
Quetzal.pas:  qryStringList.Add('FROM Call');
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:// 121008: TransactionType name check generalised from (6,50) to (nPos,50).
QuoteSystem.pas:    RentFrom : TDateTime;
QuoteSystem.pas:    CallFrom : TDateTime;
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('SELECT ID, UPPER(Description) AS UDescription');
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:    Add('SELECT *');
QuoteSystem.pas:    Add('FROM BillPurchasing');
QuoteSystem.pas:    SQL.Add('SELECT Code, Description');
QuoteSystem.pas:    SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:      qryStringList.Add('FROM tDataCollection');
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('SELECT ID, UPPER(Description) AS UDescription');
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:  qryStringList.Add('SELECT *');
QuoteSystem.pas:  qryStringList.Add('FROM BillJobs');
QuoteSystem.pas:  qryLook.SQL.Add('SELECT Code, Description');
QuoteSystem.pas:  qryLook.SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:        Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:        Add('FROM tDataCollection');
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
ReleaseTransactions.pas:var                                 // processed in a single SELECT statement.
ReleaseTransactions.pas:  qryStringList.Add(' FromDate, ToDate, CustomerID, CustomerCentreID, '+
ReleaseTransactions.pas:  qryStringList.Add('SELECT tTransaction.BatchID, tTransaction.ServiceID, '+
ReleaseTransactions.pas:  qryStringList.Add(' tTransaction.FromDate, tTransaction.ToDate, '+
ReleaseTransactions.pas:  qryStringList.Add('FROM ((tTransaction');
ReleaseTransactions.pas:    // Remove transactions from the tTransaction table.
SaveToTransaction.pas:  qAns.SQL.Add('SELECT tTransactionType.ID, tTransactionType.Description');
SaveToTransaction.pas:  qAns.SQL.Add('FROM tTransactionType');
SaveToTransaction.pas:  if not VarIsNull(qryDC['FromDate']) then begin
SaveToTransaction.pas:    sListFields := sListFields+ 'FromDate,';
SaveToTransaction.pas:      Trim(qryDC.FieldByName('FromDate').AsString) +''',';
SaveToTransaction.pas:  end;  // FromDate.
SaveToTransaction.pas:  // ElementID is recorded last in this SQL - read from tTransactionType.
SaveToTransaction.pas:var                                 // processed in a single SELECT statement.
SaveToTransaction.pas:  // Must gather the data from the tDataCollection table - it is best to
SaveToTransaction.pas:    SQL.Add('SELECT DISTINCT '+
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('SELECT DISTINCT '+
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('SELECT DISTINCT tDataCollection.DialledNumber AS Description,'+
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('SELECT DISTINCT '+
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('SELECT COUNT(*) AS TotalCount');
SaveToTransaction.pas:    SQL.Add('FROM ((SELECT tDataCollection.*, tServiceID.ID AS SID,');
SaveToTransaction.pas:    SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:      SQL.Add('SELECT DC1.*');
SaveToTransaction.pas:      SQL.Add('FROM (SELECT DC.SID, DC.ServiceID, Sum(RentPercentage) AS "Rent",'+
SaveToTransaction.pas:      SQL.Add('FROM ((SELECT DISTINCT tDataCollection.ServiceID,'+
SaveToTransaction.pas:      SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:        'TxnDate, AmountExGST, GSTAmount, AmountIncGST, FromDate, ToDate,');
SaveToTransaction.pas:      Add('SELECT DC2.ID AS DataRefID, DC2.SequenceNo, DC2.Duration, '+
SaveToTransaction.pas:      Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');
SaveToTransaction.pas:      Add('FROM (((((SELECT DC1.*');
SaveToTransaction.pas:      Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:      Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:      Add('FROM ((tDataCollection');
SaveToTransaction.pas:          Add('SELECT TOP '+IntToStr(BIGGESTCHUNK)+
SaveToTransaction.pas:          Add('SELECT DC2.ID AS "DataRefID",');                           //(0).
SaveToTransaction.pas:        Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');             // 4.
SaveToTransaction.pas:        Add('FROM ((((((((SELECT DC1.*');                                 // 15.
SaveToTransaction.pas:        Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:        Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:        Add('FROM ((tDataCollection');                                    // 20.
SaveToTransaction.pas:              SQL.Add('SELECT * FROM tServiceSplit');
SaveToTransaction.pas:            qryStringList.Strings[0] := 'SELECT DC2.ID AS "DataRefID",';
SaveToTransaction.pas:      // Remove transactions from the tDataCollection table.
SaveToTransaction.pas:      // Remove transactions from the tTransaction table.
Security.pas:    FromDate   : string[8];
Security.pas:  sFromDate : string;
Security.pas:  sFromDate := FormattedDateString(dStartDate);
Security.pas:  qryDC.SQL.Add('SELECT ID');
Security.pas:  qryDC.SQL.Add('FROM tTransactionType');
Security.pas:  qryDC.SQL.Add('SELECT ID');
Security.pas:  qryDC.SQL.Add('FROM tSystem');
Security.pas:  qryStringList.Add('SELECT tServiceID.ServiceID, tServiceID.Description, '+
Security.pas:  qryStringList.Add('FROM (tServiceID');
Security.pas:SELECT tServiceID.ServiceID, tServiceID.Description, tServiceID.ServiceTypeID, tServiceType.Code,
Security.pas:FROM (tServiceID
Security.pas:      sListFields := sListFields + 'FromDate,';
Security.pas:      sListValues := sListValues +''''+ sFromDate +''',';
Security.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Security.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Security.pas:      qryStringList.Add('FROM (tDataCollection');
Security.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Security.pas:      qryStringList.Add('FROM tDataCollection');
Security.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Services.pas:    FromDate   : string[8];
Services.pas:    SQL.Add('SELECT ST1.ServiceTypeID, ST1.CustomerID,');
Services.pas:    SQL.Add('FROM (SELECT ST0.*,');
Services.pas:    SQL.Add('FROM (SELECT ST.ServiceTypeID, ST.CustomerID, ST.Rate, '+
Services.pas:    SQL.Add('FROM (SELECT SID.*, SI.ServiceID, SI.ServiceTypeID, '+
Services.pas:    SQL.Add('FROM ( SELECT SI0.ID, SI1.Rate,');
Services.pas:    SQL.Add(' FROM (SELECT SC1.ID, tDiscountedRate.Rate');
Services.pas:    SQL.Add('  FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    SQL.Add('  FROM tServiceID');
Services.pas:  sFromDate : string;
Services.pas:  sFromDate := FormattedDateString(dStartDate);
Services.pas:  sMonth := IntToStr(Month(dStartDate));   // Query selects annual charge month.
Services.pas:  qryServices.SQL.Add('SELECT ID');
Services.pas:  qryServices.SQL.Add('FROM tTransactionType');     // Service Records Invoice.
Services.pas:  qryServices.SQL.Add('SELECT ID');
Services.pas:  qryServices.SQL.Add('FROM tStatus');
Services.pas:  qryServices.SQL.Add('SELECT ID');
Services.pas:  qryServices.SQL.Add('FROM tCustomer');
Services.pas:  qryServices.SQL.Add('SELECT ID');
Services.pas:  qryServices.SQL.Add('FROM tSystem');
Services.pas:    Add('SELECT IDENTITY(int,1,1) AS "SequNo", ServiceID, AmountExGST, GSTFlag,');
Services.pas:    Add(' RateDescription, BatchID, FromDate, ToDate, TransactionTypeID,');
Services.pas:    Add('FROM (SELECT CID2.*, CAST((CID2.AmountExGST + CID2.GSTAmount) AS money) '+
Services.pas:    Add('FROM (SELECT CID1.*, CAST((CASE WHEN CID1.GSTFlag LIKE ''Y'' '+
Services.pas:    Add('FROM (SELECT (tCustomer.ShipTo + '' Services Pre July 1999'') '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM tCustomer');
Services.pas:    Add('SELECT COUNT(*) AS "Max"');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID)');
Services.pas:      Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
Services.pas:        'FromDate, ToDate, TransactionTypeID');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas://    Add('SELECT IDENTITY(int,1,1) AS "SequNo", BatchID, ServiceID, '+
Services.pas:    Add('SELECT IDENTITY(int,'+sSeqNoStart+',1) AS "SequNo", BatchID, ServiceID, '+
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('SELECT BatchID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas://    Add('SELECT IDENTITY(int,1,1) AS "SequNo", BatchID, ServiceID, '+
Services.pas:    Add('SELECT IDENTITY(int,'+sSeqNoStart+',1) AS "SequNo", BatchID, ServiceID, '+
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas://    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID, '+
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('SELECT BatchID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('SELECT CAST(SequNo AS varchar) AS "SequenceNo", '+
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:  qryStringList.Add('FROM (SELECT SI0.ID, Max(tRate.Cost) AS "CostAmt", '+
Services.pas:  qryStringList.Add('FROM tServiceID AS SI0');
Services.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Telmax.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
Telmax.pas:  qryTelmax.SQL.Add('SELECT id');
Telmax.pas:  qryTelmax.SQL.Add('FROM tSupplier');
Telmax.pas:    qryTelmax.SQL.Add('SELECT Code, CAST(ID AS VARCHAR(20)) AS "SCodeID", '+
Telmax.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
Telmax.pas:      qry.SQL.Add('SELECT id');
Telmax.pas:      qry.SQL.Add('FROM tCustomer');
Telmax.pas:      qryRef.SQL.Add('SELECT id, code');
Telmax.pas:      qryRef.SQL.Add('FROM tServiceType');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('SELECT Cost');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM (tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := FormattedDateString(dStartDate);
Telmax.pas:    qryDC.SQL.Add('SELECT id, Description');
Telmax.pas:    qryDC.SQL.Add('FROM tTransactionType');
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:        qryStringList.Add('FROM (SELECT DC3.*, '+
Telmax.pas:        qryStringList.Add('FROM (SELECT DC2.ID, DC2.AmountExGST,');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC1.ID, (Max(tRate.Cost)/12) AS "AmountExGST"');
Telmax.pas:        qryStringList.Add('FROM ((SELECT DC0.ID, DC0.ServiceID, (CASE');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input File';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input File';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('SELECT tGroup.CustomerID');
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input File';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('SELECT tGroup.CustomerID');
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input File';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('SELECT tGroup.CustomerID');
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input File';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('SELECT tGroup.CustomerID');
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:  OpenDlg.Options := [ofPathMustExist,ofAllowMultiSelect];
Telmax.pas:  OpenDlg.Title := 'Select The Telmax Input Directory';
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('SELECT tGroup.CustomerID');
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:  fGSTRate : Real;                    // GST Rate for Calcs-read from MainForm.
TelmaxUniComms.pas:    SQL.Add('SELECT id');
TelmaxUniComms.pas:    SQL.Add('FROM tTransactionGroup');
TelmaxUniComms.pas:    SQL.Add('SELECT tSystem.id');
TelmaxUniComms.pas:    SQL.Add('FROM tSystem');
TelmaxUniComms.pas:    SQL.Add('SELECT id');
TelmaxUniComms.pas:    SQL.Add('FROM tSupplier');
TelmaxUniComms.pas:      qryTelmax.SQL.Add('SELECT CAST(ID AS VARCHAR(20)) AS TransactionType, '+
TelmaxUniComms.pas:      qryTelmax.SQL.Add('FROM tTransactionType');
TelmaxUniComms.pas:      SQL.Add('SELECT RateDesc.Description, RateDesc.Code, ');
TelmaxUniComms.pas:      SQL.Add('FROM (');
TelmaxUniComms.pas:      SQL.Add('  SELECT RateCode.Description, RateCode.Code, ');
TelmaxUniComms.pas:      SQL.Add('  FROM (');
TelmaxUniComms.pas:      SQL.Add('    SELECT DISTINCT');
TelmaxUniComms.pas:      SQL.Add('    FROM tRate');
TelmaxUniComms.pas:      SQL.Add('SELECT tSupplierServiceCode.ID AS SupplierCodeID');         // 0.
TelmaxUniComms.pas:      SQL.Add('FROM   tSupplierServiceCode');                              // 1.
TelmaxUniComms.pas:    qryTelmax.SQL.Add('SELECT Code, CAST(ID AS VARCHAR(20)) AS "SCodeID", '+
TelmaxUniComms.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
TelmaxUniComms.pas:      qryTemp.SQL.Add('SELECT id');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tCustomer');
TelmaxUniComms.pas:      qryTemp.SQL.Add('SELECT tRate.Cost, tRate.Description');                            // 0.
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');                                   // 1.
TelmaxUniComms.pas:      qryTemp.SQL.Add('SELECT tRate.Length, tRate.Cost, tRate.Description, '+
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:      qryRef.SQL.Add('SELECT id, code, Description');
TelmaxUniComms.pas:      qryRef.SQL.Add('FROM tServiceType');
TelmaxUniComms.pas:        qryTemp.SQL.Add('SELECT Cost');
TelmaxUniComms.pas:        qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:          sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
TelmaxUniComms.pas:        qryStringList.Add('FROM (tDataCollection');
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := FormattedDateString(dStartDate);
TelmaxUniComms.pas:    SQL.Add('SELECT tRate.Length, tRate.Cost, tRate.Description AS RateDesc');//0.
TelmaxUniComms.pas:    SQL.Add('FROM   tRate');                                          // 1.
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:        // Done. Values updated from the tRates table for TEC & SFC values.
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:            sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:  OpenDlg.Options := [ofPathMustExist,ofAllowMultiSelect];
TelmaxUniComms.pas:  OpenDlg.Title := 'Select The Input File Directory';
TelmaxUniComms.pas:      DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:      slCust.Add('SELECT tServiceID.ServiceTypeID, '+
TelmaxUniComms.pas:      slCust.Add('FROM tServiceID');                                       // 1.
TelmaxUniComms.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
TelmaxUniComms.pas:        slCust.Add('FROM tDataCollection');
TelmaxUniComms.pas:        slCust.Clear;   // When empty, all entries deleted from tDataCollection.
TelmaxUniComms.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelstraFixed.pas:            GetPhoneAccountBills - Added reading code from input, not default.
TelstraFixed.pas:    RentFrom : TDateTime;
TelstraFixed.pas:    CallFrom : TDateTime;
TelstraFixed.pas:    FromDate        : string[8];
TelstraFixed.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraFixed.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixed.pas:    Add('FromDate');
TelstraFixed.pas:    SQL.Add('SELECT COUNT(*) AS NumberOfCalls');
TelstraFixed.pas:    SQL.Add('FROM tDataCollection');
TelstraFixed.pas:    SQL.Add('SELECT COUNT(*) AS NumberDSCalls');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('SELECT SUM(NumCalls) AS NumberDSCalls');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('SELECT *');
TelstraFixed.pas:    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixed.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixed.pas:select BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixed.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixed.pas:FROM tDataCollect_Temp
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixed.pas:    SQL.Add(' FromDate, ');
TelstraFixed.pas:    SQL.Add(' SELECT ');
TelstraFixed.pas:    SQL.Add('   FromDate, ');
TelstraFixed.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDS.SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDC.SQL.Add('SELECT tBatch.BillingPeriod');
TelstraFixed.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixed.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixed.pas:        // Account selected is not in this file.
TelstraFixed.pas:        MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              SubString := ConvertString.Strings[DESC16_C]; // DateFrom.
TelstraFixed.pas:                if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixed.pas:                  RentFrom := dStartBillingPeriod;
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                SubString := ConvertString.Strings[DESC12_C]; // DateFrom.
TelstraFixed.pas:                if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixed.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  if (Length(DBfromDate) = 0) then
TelstraFixed.pas:                    DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                else if (Length(DBfromDate) > 0) then begin
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  sListValues := sListValues + DBfromDate;
TelstraFixed.pas:                end;  // FromDate.
TelstraFixed.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraFixed.pas:  qryTelstra.SQL.Add('SELECT id');
TelstraFixed.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixed.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraFixed.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixed.pas:    qryTelstra.SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraFixed.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraFixed.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraFixed.pas:    // Select the source directory.
TelstraFixed.pas:    OpenDlg.Title := 'Select The Telstra Account OBS Data File';
TelstraFixedEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedEBS.pas:    RentFrom : TDateTime;
TelstraFixedEBS.pas:    CallFrom : TDateTime;
TelstraFixedEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedEBS.pas:    Add('FromDate');
TelstraFixedEBS.pas:    SQL.Add('SELECT COUNT(*) AS NumberOfCalls');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollection');
TelstraFixedEBS.pas:    SQL.Add('SELECT COUNT(*) AS NumberDSCalls');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('SELECT SUM(NumCalls) AS NumberDSCalls');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('SELECT *');
TelstraFixedEBS.pas://    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixedEBS.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixedEBS.pas:select BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixedEBS.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixedEBS.pas:FROM tDataCollect_Temp
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixedEBS.pas:    SQL.Add(' FromDate, ');
TelstraFixedEBS.pas:    SQL.Add(' SELECT ');
TelstraFixedEBS.pas:    SQL.Add('   FromDate, ');
TelstraFixedEBS.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  qryDC.SQL.Add('SELECT tBatch.BillingPeriod');
TelstraFixedEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedEBS.pas:          // Account selected is not in this file.
TelstraFixedEBS.pas:          MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedEBS.pas:              end;  // FromDate.
TelstraFixedEBS.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraFixedEBS.pas:  qryTelstra.SQL.Add('SELECT id');
TelstraFixedEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedEBS.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraFixedEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedEBS.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraFixedEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedEBS.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraFixedEBS.pas:    // Select the source directory.
TelstraFixedEBS.pas:    OpenDlg.Title := 'Select The Telstra Account Data File';
TelstraFixedOrigEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedOrigEBS.pas:    RentFrom : TDateTime;
TelstraFixedOrigEBS.pas:    CallFrom : TDateTime;
TelstraFixedOrigEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedOrigEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedOrigEBS.pas:  qryDC.SQL.Add('SELECT tBatch.BillingPeriod');
TelstraFixedOrigEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedOrigEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedOrigEBS.pas:                // entry is provided.   (Copied from following else-if section.)
TelstraFixedOrigEBS.pas:              end;  // if LastEntryIs_1. (Copied from section immed. following.)
TelstraFixedOrigEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedOrigEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedOrigEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedOrigEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedOrigEBS.pas:              end;  // FromDate.
TelstraFixedOrigEBS.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraFixedOrigEBS.pas:  qryTelstra.SQL.Add('SELECT id');
TelstraFixedOrigEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedOrigEBS.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedOrigEBS.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedOrigEBS.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraFixedOrigEBS.pas:    // Select the source directory.
TelstraFixedOrigEBS.pas:    OpenDlg.Title := 'Select The Telstra Account Data File';
TelstraFunctions.pas:    SQL.Add('SELECT COUNT(*) AS NumberOfCalls');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('SELECT ServiceID, CallCode, AmountExGST');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('SELECT COUNT(*) AS NumberDSCalls');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('SELECT SUM(NumCalls) AS NumberDSCalls');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('SELECT *');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add(' FromDate, ');
TelstraFunctions.pas:    SQL.Add(' SELECT ');
TelstraFunctions.pas:    SQL.Add('   FromDate, ');
TelstraFunctions.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:  sFromDate : string;
TelstraFunctions.pas:    Add('SELECT ID');
TelstraFunctions.pas:    Add('FROM tCustomer');
TelstraFunctions.pas:    Add('SELECT Sum(CAST(Var01 AS integer)) AS kByte');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('SELECT tServiceType.ID AS "ServiceTypeID", tSystem.ID AS "SystemID"');
TelstraFunctions.pas:    Add('FROM tServiceType');
TelstraFunctions.pas:    Add('SELECT tTransactionType.ID');
TelstraFunctions.pas:    Add('FROM tTransactionType');
TelstraFunctions.pas:    Add('SELECT CAST(Min(tRate.Length) AS int) AS "Length"');
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraFunctions.pas:    Add('SELECT tRate.Cost');
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Try to get the dates from the tDataCollection table.
TelstraFunctions.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraFunctions.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraFunctions.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraFunctions.pas:    // Read the dates from the tBatch table.
TelstraFunctions.pas:      Add('SELECT tBatch.RentStartDate, tBatch.RentEndDate');
TelstraFunctions.pas:      Add('FROM tBatch');
TelstraFunctions.pas:      sFromDate := 'NULL';
TelstraFunctions.pas:      sFromDate := ''''+
TelstraFunctions.pas:  end;  // FromDate or EndDate unknown.
TelstraFunctions.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraFunctions.pas:      Add('SELECT tParameter.ParmText');
TelstraFunctions.pas:      Add('FROM tParameter');
TelstraFunctions.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:        Add(sFromDate);
TelstraFunctions.pas:          Add('SELECT tTransactionType.ID');
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('SELECT tRate.PartCost');
TelstraFunctions.pas:          Add('FROM tRate');
TelstraFunctions.pas:          Add(' (SELECT Max(tRate.Length)');
TelstraFunctions.pas:          Add(' FROM tRate');
TelstraFunctions.pas:            Add('SELECT ParmText');
TelstraFunctions.pas:            Add('FROM tParameter');
TelstraFunctions.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:              Add(sFromDate);
TelstraFunctions.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraFunctions.pas:        Add('SELECT DISTINCT tDataCollection.TransactionTypeID');
TelstraFunctions.pas:        Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:      Add('SELECT tTransactionType.ID');
TelstraFunctions.pas:      Add('FROM tTransactionType');
TelstraFunctions.pas:      Add('SELECT COUNT(DISTINCT tDataCollection.ServiceID) AS "TotalCount"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('SELECT CAST(tRate.Length AS int) AS "Length", tRate.PartCost,'+
TelstraFunctions.pas:      Add('FROM tRate');
TelstraFunctions.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas://      Add('SELECT DISTINCT tDataCollection.ServiceID,');
TelstraFunctions.pas:      Add('SELECT DC.ServiceID,');
TelstraFunctions.pas:      Add(sFromDate+' AS "FromDate",');
TelstraFunctions.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.*');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('SELECT DISTINCT tServiceID.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:          Add('SELECT ParmText');
TelstraFunctions.pas:          Add('FROM tParameter');
TelstraFunctions.pas:          Add('SELECT tTransactionType.ID');
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('SELECT tDataCollection.SequenceNo');
TelstraFunctions.pas:          Add('FROM tDataCollection');
TelstraFunctions.pas:          'SELECT Max(CAST(tDataCollection.SequenceNo AS INT)) AS "SequenceNo"';
TelstraFunctions.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:          Add(sFromDate+',');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraFunctions.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraFunctions.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraFunctions.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('SELECT CAST(CAST(DC1.Cost AS real) AS varchar) AS "RateCost",');
TelstraFunctions.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraMobile.pas:    RentFrom : TDateTime;
TelstraMobile.pas:    CallFrom : TDateTime;
TelstraMobile.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobile.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobile.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobile.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobile.pas:        // Account selected is not in this file.
TelstraMobile.pas:        MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraMobile.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobile.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraMobile.pas:  qryTelstra.SQL.Add('SELECT id');
TelstraMobile.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobile.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraMobile.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobile.pas:    qryTelstra.SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraMobile.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraMobile.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraMobile.pas:    // Select the source directory.
TelstraMobile.pas:    OpenDlg.Title := 'Select The Telstra Account OBS Data File';
TelstraMobileData.pas:    RentFrom : TDateTime;
TelstraMobileData.pas:    CallFrom : TDateTime;
TelstraMobileData.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobileData.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobileData.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileData.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileData.pas:        // Account selected is not in this file.
TelstraMobileData.pas:        MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                  DBfromDate :=
TelstraMobileData.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:          end;  // not empty string read from the input file.
TelstraMobileData.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraMobileData.pas:  sFromDate : string;
TelstraMobileData.pas:  slDC.Add('SELECT ID');
TelstraMobileData.pas:  slDC.Add('FROM tCustomer');
TelstraMobileData.pas:  slDC.Add('SELECT Sum(CAST(Var01 AS integer)) AS kByte');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('SELECT tServiceType.ID AS "ServiceTypeID", '+
TelstraMobileData.pas:  slDC.Add('FROM tServiceType');
TelstraMobileData.pas:  slDC.Add('SELECT tTransactionType.ID');
TelstraMobileData.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:  slDC.Add('SELECT CAST(Min(tRate.Length) AS int) AS "Length"');
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileData.pas:  slDC.Add('SELECT tRate.Cost');
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileData.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileData.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileData.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileData.pas:    // Read the dates from the tBatch table.
TelstraMobileData.pas:    slDC.Add('SELECT tBatch.RentStartDate, tBatch.RentEndDate');
TelstraMobileData.pas:    slDC.Add('FROM tBatch');
TelstraMobileData.pas:      sFromDate := 'NULL';
TelstraMobileData.pas:      sFromDate := ''''+
TelstraMobileData.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileData.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileData.pas:    slDC.Add('SELECT tParameter.ParmText');
TelstraMobileData.pas:    slDC.Add('FROM tParameter');
TelstraMobileData.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileData.pas:      slDC.Add(sFromDate);
TelstraMobileData.pas:        slDC.Add('SELECT tTransactionType.ID');
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('SELECT tRate.PartCost');
TelstraMobileData.pas:        slDC.Add('FROM tRate');
TelstraMobileData.pas:        slDC.Add(' (SELECT Max(tRate.Length)');
TelstraMobileData.pas:        slDC.Add(' FROM tRate');
TelstraMobileData.pas:          slDC.Add('SELECT ParmText');
TelstraMobileData.pas:          slDC.Add('FROM tParameter');
TelstraMobileData.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:            slDC.Add(sFromDate);
TelstraMobileData.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileData.pas:      slDC.Add('SELECT DISTINCT tDataCollection.TransactionTypeID');
TelstraMobileData.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileData.pas:    slDC.Add('SELECT tTransactionType.ID');
TelstraMobileData.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:    slDC.Add('SELECT COUNT(DISTINCT tDataCollection.ServiceID) AS "TotalCount"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('SELECT CAST(tRate.Length AS int) AS "Length", tRate.PartCost,'+
TelstraMobileData.pas:    slDC.Add('FROM tRate');
TelstraMobileData.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:    slDC.Add('SELECT DC.ServiceID,');
TelstraMobileData.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:        slDC.Add('SELECT ParmText');
TelstraMobileData.pas:        slDC.Add('FROM tParameter');
TelstraMobileData.pas:        slDC.Add('SELECT tTransactionType.ID');
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:        slDC.Add(sFromDate+',');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('SELECT CAST(CAST(DC1.Cost AS real) AS varchar) AS "RateCost",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    SQL.Add('SELECT id');
TelstraMobileData.pas:    SQL.Add('FROM tSupplier');
TelstraMobileData.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraMobileData.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileData.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraMobileData.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileData.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileData.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraMobileData.pas:    // Select the source directory.
TelstraMobileData.pas:    OpenDlg.Title := 'Select The Telstra Data Account File';
TelstraMobileData.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataEBS.pas:        // Account selected is not in this file.
TelstraMobileDataEBS.pas:        MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                DBfromDate :=
TelstraMobileDataEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:          // Ensure this next entry is in the selected account. 
TelstraMobileDataEBS.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraMobileDataEBS.pas:  sFromDate : string;
TelstraMobileDataEBS.pas:    Add('SELECT ID');
TelstraMobileDataEBS.pas:    Add('FROM tCustomer');
TelstraMobileDataEBS.pas:    Add('SELECT Sum(CAST(Var01 AS integer)) AS kByte');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('SELECT tServiceType.ID AS "ServiceTypeID", tSystem.ID AS "SystemID"');
TelstraMobileDataEBS.pas:    Add('FROM tServiceType');
TelstraMobileDataEBS.pas:    Add('SELECT tTransactionType.ID');
TelstraMobileDataEBS.pas:    Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:    Add('SELECT CAST(Min(tRate.Length) AS int) AS "Length"');
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataEBS.pas:    Add('SELECT tRate.Cost');
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataEBS.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataEBS.pas:      Add('SELECT tBatch.RentStartDate, tBatch.RentEndDate');
TelstraMobileDataEBS.pas:      Add('FROM tBatch');
TelstraMobileDataEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataEBS.pas:      sFromDate := ''''+
TelstraMobileDataEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataEBS.pas:      Add('SELECT tParameter.ParmText');
TelstraMobileDataEBS.pas:      Add('FROM tParameter');
TelstraMobileDataEBS.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:        Add(sFromDate);
TelstraMobileDataEBS.pas:          Add('SELECT tTransactionType.ID');
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('SELECT tRate.PartCost');
TelstraMobileDataEBS.pas:          Add('FROM tRate');
TelstraMobileDataEBS.pas:          Add(' (SELECT Max(tRate.Length)');
TelstraMobileDataEBS.pas:          Add(' FROM tRate');
TelstraMobileDataEBS.pas:            Add('SELECT ParmText');
TelstraMobileDataEBS.pas:            Add('FROM tParameter');
TelstraMobileDataEBS.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:              Add(sFromDate);
TelstraMobileDataEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataEBS.pas:        Add('SELECT DISTINCT tDataCollection.TransactionTypeID');
TelstraMobileDataEBS.pas:        Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:      Add('SELECT tTransactionType.ID');
TelstraMobileDataEBS.pas:      Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:      Add('SELECT COUNT(DISTINCT tDataCollection.ServiceID) AS "TotalCount"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('SELECT CAST(tRate.Length AS int) AS "Length", tRate.PartCost,'+
TelstraMobileDataEBS.pas:      Add('FROM tRate');
TelstraMobileDataEBS.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas://      Add('SELECT DISTINCT tDataCollection.ServiceID,');
TelstraMobileDataEBS.pas:      Add('SELECT DC.ServiceID,');
TelstraMobileDataEBS.pas:      Add(sFromDate+' AS "FromDate",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.*');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('SELECT DISTINCT tServiceID.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:          Add('SELECT ParmText');
TelstraMobileDataEBS.pas:          Add('FROM tParameter');
TelstraMobileDataEBS.pas:          Add('SELECT tTransactionType.ID');
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('SELECT tDataCollection.SequenceNo');
TelstraMobileDataEBS.pas:          Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:          'SELECT Max(CAST(tDataCollection.SequenceNo AS INT)) AS "SequenceNo"';
TelstraMobileDataEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:          Add(sFromDate+',');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('SELECT CAST(CAST(DC1.Cost AS real) AS varchar) AS "RateCost",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    SQL.Add('SELECT id');
TelstraMobileDataEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataEBS.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataEBS.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraMobileDataEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraMobileDataEBS.pas:    // Select the source directory.
TelstraMobileDataEBS.pas:    OpenDlg.Title := 'Select The Telstra Data Account File';
TelstraMobileDataEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataOldEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataOldEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataOldEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataOldEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                DBfromDate :=
TelstraMobileDataOldEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraMobileDataOldEBS.pas:  sFromDate : string;
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT ID');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tCustomer');
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT Sum(CAST(Var01 AS integer)) AS kByte');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT tServiceType.ID AS "ServiceTypeID", '+
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tServiceType');
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT tTransactionType.ID');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT CAST(Min(tRate.Length) AS int) AS "Length"');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT tRate.Cost');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataOldEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataOldEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataOldEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tBatch.RentStartDate, tBatch.RentEndDate');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tBatch');
TelstraMobileDataOldEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataOldEBS.pas:      sFromDate := ''''+
TelstraMobileDataOldEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataOldEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tParameter.ParmText');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataOldEBS.pas:      slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:        slDC.Add('SELECT tTransactionType.ID');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('SELECT tRate.PartCost');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:        slDC.Add(' (SELECT Max(tRate.Length)');
TelstraMobileDataOldEBS.pas:        slDC.Add(' FROM tRate');
TelstraMobileDataOldEBS.pas:          slDC.Add('SELECT ParmText');
TelstraMobileDataOldEBS.pas:          slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:            slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataOldEBS.pas:      slDC.Add('SELECT DISTINCT tDataCollection.TransactionTypeID');
TelstraMobileDataOldEBS.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tTransactionType.ID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT COUNT(DISTINCT tDataCollection.ServiceID) AS "TotalCount"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT CAST(tRate.Length AS int) AS "Length", tRate.PartCost,'+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas://    slDC.Add('SELECT DISTINCT tDataCollection.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT DC.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.*');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT DISTINCT tServiceID.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        slDC.Add('SELECT ParmText');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:        slDC.Add('SELECT tTransactionType.ID');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('SELECT tDataCollection.SequenceNo');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:          'SELECT Max(CAST(tDataCollection.SequenceNo AS INT)) AS "SequenceNo"';
TelstraMobileDataOldEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:        slDC.Add(sFromDate+',');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT tDataCollection.SequenceNo, tDataCollection.ServiceID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('SELECT CAST(CAST(DC1.Cost AS real) AS varchar) AS "RateCost",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    SQL.Add('SELECT id');
TelstraMobileDataOldEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataOldEBS.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataOldEBS.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataOldEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraMobileDataOldEBS.pas:    // Select the source directory.
TelstraMobileDataOldEBS.pas:    OpenDlg.Title := 'Select The Telstra Data Account File';
TelstraMobileDataOldEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileEBS.pas:    RentFrom : TDateTime;
TelstraMobileEBS.pas:    CallFrom : TDateTime;
TelstraMobileEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileEBS.pas:        // Account selected is not in this file.
TelstraMobileEBS.pas:        MessageDlg('The Account specified is not in the file selected.'+#13#10+
TelstraMobileEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileEBS.pas:    // Select the next file if exists - extension 001, 002, etc.
TelstraMobileEBS.pas:  qryTelstra.SQL.Add('SELECT id');
TelstraMobileEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobileEBS.pas:      SQL.Add('SELECT tValidAccountNumber.AccountNo');
TelstraMobileEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileEBS.pas:      SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
TelstraMobileEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileEBS.pas:  // Create the stringlist which contains the names of selected filenames.
TelstraMobileEBS.pas:    // Select the source directory.
TelstraMobileEBS.pas:    OpenDlg.Title := 'Select The Telstra Account Data File';
Vodafone.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
Vodafone.pas:  qryVodafone.SQL.Add('SELECT ParmNumber FROM tParameter');
Vodafone.pas:  qryVodafone.SQL.Add('SELECT id');
Vodafone.pas:  qryVodafone.SQL.Add('FROM tSupplier');
Vodafone.pas:    qryVodafone.SQL.Add('SELECT Code, CAST(TransactionTypeID AS VARCHAR(20)) '+
Vodafone.pas:    qryVodafone.SQL.Add('FROM tSupplierServiceCode');
Vodafone.pas:// Data handled is for calls made from mobile phones.
Vodafone.pas:  ReadString: string;                  // Read in from the text file.
Vodafone.pas:  sRentFrom : string;
Vodafone.pas:  sCallFrom : string;
Vodafone.pas:  sRentFrom := '';
Vodafone.pas:  sCallFrom := '';
Vodafone.pas:              sListFields := sListFields + 'FromDate,';
Vodafone.pas:              sListValues := sListValues + sCallFrom;
Vodafone.pas:                sListFields := sListFields + 'FromDate,';
Vodafone.pas:                // Deduct discount sum from the total charge.
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC2_C]) +''',';
Vodafone.pas:              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sRentFrom;
Vodafone.pas:        // Deduct discount sum from the total charge.
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:        qryDC.SQL.Add('SELECT SUM(tDataCollection.AmountExGST) AS SumAmountExGST,');
Vodafone.pas:        qryDC.SQL.Add('FROM tDataCollection');
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:  OpenDlg.Title := 'Select The Vodafone Input File';
Vodafone.pas:      DeleteFromDC( nBatch, EmptyList, lContinue);


DB insert (Add)
AccessRights.pas:    q.SQL.Add('FROM tUser');
AccessRights.pas:        q.SQL.Add('FROM tUserFunction');
AdminCharges.pas:  qryStringList.Add('DELETE FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (tTransaction INNER JOIN tTransactionType '+
AdminCharges.pas:  qryStringList.Add('SELECT ParmNumber FROM tParameter');
AdminCharges.pas:  qryStringList.Add('SELECT id FROM tStatus');
AdminCharges.pas:  qryLook.SQL.Add('SELECT id, description FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tCustomer ' +
AdminCharges.pas:  // NOTE: GSTFlag must have a value or the INSERT will fail.
AdminCharges.pas://  if qryTN['RentFrom'] <> Null then begin
AdminCharges.pas:  if qryTN['FromDate'] <> Null then begin
AdminCharges.pas:    sListFields := sListFields+ 'FromDate,';
AdminCharges.pas:      StandardDateString(qryTN.FieldByName('FromDate').AsDateTime) +''',';
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add(' FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add('  Min(tTransaction.FromDate) AS "FromDate",');
AdminCharges.pas://    'THEN tTransaction.FromDate END) AS RENTFROM,');
AdminCharges.pas:  qryStringList.Add(' FROM (tTransaction');
AdminCharges.pas:  qryStringList.Add('INSERT INTO tTransaction');
AdminCharges.pas:  // Must gather the data from the tTransaction table - it is best to
AdminCharges.pas:    SQL.Add('FROM tParameter');
AdminCharges.pas:      SQL.Add('FROM tBatch');
AdminCharges.pas:    qryStringList.Add('FROM (SELECT (TN2.RENT + TN2.CALL + TN2.OTHER) AS TOTAL, TN2.*,'+
AdminCharges.pas:    qryStringList.Add('FROM ((SELECT TN1.ServiceID,' +
AdminCharges.pas:    qryStringList.Add('  Min(TN1.FromDate) AS "FromDate",');
AdminCharges.pas://      ' TN1.FromDate END) AS RENTFROM,');
AdminCharges.pas:    qryStringList.Add(' FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:    qryStringList.Add('   tTransaction.FromDate, tTransaction.ToDate,');
AdminCharges.pas:    qryStringList.Add('  FROM tTransaction LEFT JOIN ');
AnnualCharges.pas:  sFromDate : string;
AnnualCharges.pas:  sFromDate := FormattedDateString(dStartDate);
AnnualCharges.pas:  qryDC.SQL.Add('FROM tTransactionType');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tCustomer');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tSystem');
AnnualCharges.pas:    Add('FROM (SELECT tServiceID.ServiceID, tServiceID.Description, '+
AnnualCharges.pas:    Add('FROM (((tServiceID');
AnnualCharges.pas:      sListFields := sListFields + 'FromDate,';
AnnualCharges.pas:      sListValues := sListValues +''''+ sFromDate +''',';
AnnualCharges.pas:      qryStringList.Add('INSERT INTO tDataCollection');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
AnnualCharges.pas:      qryStringList.Add('FROM ((tDataCollection');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
AnnualCharges.pas:      qryStringList.Add('FROM tDataCollection');
AnnualCharges.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
AnnualData.pas://            INSERT..VALUES (..params..)..DataSource-control doesn't work
AnnualData.pas:    SQL.Add('DELETE FROM tFaultDetails');
AnnualData.pas:    SQL.Add('FROM Call');
AnnualData.pas:    // Establish the Insert statement with the data to be saved -
AnnualData.pas:      SQL.Add('Insert into tFaultDetails');
AnnualData.pas:      SQL.Add('FROM (SELECT tBatchType.Description');
AnnualData.pas:      SQL.Add('FROM tBatchType');
AnnualData.pas:    SQL.Add('FROM tFaultDetails');
AnnualData.pas:          'from Quetzal?', mtConfirmation, [mbYes, mbNo], 0) = mrYes) then begin
AnnualData.pas://      SQL.Add('FROM (SELECT DC.ID, CAST(fd.Availability AS varchar) AS Var02');
AnnualData.pas://      SQL.Add('	FROM tFaultDetails fd');
AnnualData.pas:      SQL.Add('FROM (SELECT TmpDC.ID, TmpDC.Var02');
AnnualData.pas:      SQL.Add('	FROM (SELECT TOP 10000 DC.ID, CAST(fd.Availability AS varchar) AS Var02, '+
AnnualData.pas:      SQL.Add('  FROM tDataCollection dc');
AnnualData.pas:      SQL.Add('	FROM tDataCollection dc');
AnnualData.pas:      SQL.Add('INSERT INTO tDataCollection');
AnnualData.pas:      SQL.Add(' FromDate, ToDate, BatchID, Var01, Var02)');
AnnualData.pas:      SQL.Add(' DC.FromDate, DC.ToDate, DC.BatchID,');
AnnualData.pas:      SQL.Add('FROM tDataCollection DC');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) '+
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT COUNT(*) AS "InvoiceNo"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "TotalCredits"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
CodeFile.pas:  qryString.Add('FROM ((((((((((SELECT TXN.ServiceID, TXN.ServiceTypeID, '+
CodeFile.pas:  qryString.Add('FROM ('+TransactionTable+' TXN');
CodeFile.pas:      SQL.Add('FROM tBatch');
CodeFile.pas:          SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:          SQL.Add('FROM tTransaction');
CodeFile.pas:              SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:                SQL.Add('INSERT INTO tParameter');
CriticalTests.pas:  // Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('SELECT * FROM tCriticalCheck');
CriticalTests.pas:    qryStringList.Add('INSERT INTO tCriticalCheck');
CriticalTests.pas:    qryStringList.Add('FROM tCriticalCheck');
CriticalTests.pas:// Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryDC.SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:      qryStringList.Add('FROM (SELECT tServiceID.ServiceID, '+
CriticalTests.pas:      qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:      qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:          ' Services Omitted From The Invoice');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:  qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:    qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT ServiceID,');
CriticalTests.pas:  qryStringList.Add('FROM tServiceSplit');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ID AS SID, DC.ServiceID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatchType INNER JOIN tBatch');
CurrentRentCalls.pas:// Called when tTransaction transactions are created from tDataCollection data.
CurrentRentCalls.pas:    Add(' FROM tTransaction');
CurrentRentCalls.pas:    Add('FROM (SELECT tTransaction.ServiceID, tTransaction.ServiceTypeID,');
CurrentRentCalls.pas:    Add('FROM ((tTransaction');
DateFunctions.pas:{ Some general functions first to simplify the transition from dBase to Delphi4.}
DateFunctions.pas:// Retrieve the month name from the stringlist slMonth,
DateFunctions.pas:// Retrieve the month number from the stringlist slMonth,
DubiousTests.pas:    Add('SELECT * FROM tDubiousResult');
DubiousTests.pas:      Add('INSERT INTO tDubiousResult');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (SELECT tTransaction.ServiceID, '+
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM ((SELECT tTransaction.ServiceID, ' +
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('FROM tBatch');
DubiousTests.pas:    SQL.Add('FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN3.ServiceID, TN3.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN2.ServiceID, TN2.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN1.*,');
DubiousTests.pas:    Add('FROM (SELECT ServiceID, CustomerID, Count(*) AS "NumCalls",');
DubiousTests.pas:    Add('FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('SELECT ParmNumber FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN.ServiceID, TN.CustomerID,'+
DubiousTests.pas:    Add('FROM (SELECT DISTINCT tTransaction.ServiceID, '+
DubiousTests.pas:    Add(' FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    Add('AND tCostRange.CostRangeFrom IS NOT NULL');
DubiousTests.pas:    Add('AND (tTransaction.AmountIncGST < tCostRange.CostRangeFrom');
DubiousTests.pas:    SQL.Add('FROM tDubiousResult');
DubiousTests.pas:    Add('FROM tBatchType INNER JOIN tBatch');
FileFunctions.pas: Reads a delimited string from FName and saves each line into a single
FileFunctions.pas:  ReadString: string;                  // Read in from the text file.
Filter.pas:    edtFromDate: TDateEdit;
Filter.pas:    lblFromDate: TLabel;
Filter.pas:  slQuery1.Add('FROM (SELECT FT1.*, tCustomer.ShipTo, tServiceID.ServiceID, '+
Filter.pas:  slQuery1.Add('FROM (SELECT tFinalisedTransaction.ServiceID AS "SID", '+
Filter.pas:  slQuery1.Add('FROM tFinalisedTransaction');                              // 8.
Filter.pas:  lblFromDate.Enabled := cbDate.Checked;
Filter.pas:  edtFromDate.Enabled := cbDate.Checked;
Filter.pas:  if cbDate.Checked then edtFromDate.SetFocus;
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenFns.pas:  procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:  procedure AddToTable(const sTableInsert: string;
GenFns.pas:  q.SQL.Add('FROM tParameter');
GenFns.pas:  qryParam.SQL.Add('SELECT ParmNumber FROM tParameter');
GenFns.pas:procedure AddToTable(const sTableInsert: string;
GenFns.pas:  sThisTable := sTableInsert;
GenFns.pas:    slStrings.Add('INSERT INTO '+ sThisTable);
GenFns.pas:  qryStringList.Add('SELECT BatchStatusID FROM tBatch');
GenFns.pas:      qryStringList.Add('FROM tBatch');
GenFns.pas:    qryStringList.Add('INSERT INTO tBatchStatusHistory');
GenFns.pas:    sQueryString.Add('SELECT id FROM tUser');
GenFns.pas:      qry.SQL.Add('INSERT INTO tUser (UserLogin,LastLoggedOn)');
GenFns.pas:      qry.SQL.Add('SELECT ID FROM tUser WHERE UserLogin = '''+sOp+'''');
GenFns.pas:      qryFunction.SQL.Add('SELECT ID FROM tFunction');
GenFns.pas:        qry.SQL.Add('INSERT INTO tUserFunction (UserID,FunctionID)');
GenFns.pas:  qryStringList.Add('FROM '+sTable);
GenFns.pas:  qryStringList.Add('FROM tDataCollection');
GenFns.pas:  slSQL.Add('INSERT INTO tAdjustment');
GenFns.pas:procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:    qryStringList.Add('FROM tDataCollection');
GenFns.pas:end;  // procedure DeleteFromDC().
GenFns.pas:// A function to remove any apostrophe from the passed string.
GenFns.pas:// Over-rides the default "ffGeneral" format, used to insert/update with SQL.
GenFns.pas:// Some general functions to simplify the transition from dBase to Delphi4.
GenFns.pas:    SQL.Add('FROM tDataCollection AS DC');
GenFns.pas:  sFromDate : string;
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      sFromDate := 'NULL';
GenFns.pas:      sFromDate := ''''+FormattedDateString(FieldByName('RentStartDate').AsDateTime)+'''';
GenFns.pas:    // Now insert all missing ServiceID entries into the invoice.
GenFns.pas:    SQL.Add('INSERT INTO tDataCollection');
GenFns.pas:    SQL.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID, '+
GenFns.pas:    SQL.Add('SELECT SID.ServiceID, SID.BatchID, SID.FromDate, SID.ToDate, '+
GenFns.pas:    SQL.Add('FROM (SELECT tServiceID.ServiceID AS "ServiceID",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "FromDate",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "ToDate",');
GenFns.pas:    SQL.Add('FROM tServiceID');
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('DELETE FROM tFaultDetails');
GenFns.pas:    SQL.Add('FROM Call c');
GenFns.pas:    // Establish the Insert statement with the data to be saved -
GenFns.pas:      SQL.Add('Insert into tFaultDetails');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:      SQL.Add('INSERT INTO tParameter');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:// This procedure creates a CSV file from the query parameter and saves it
GenFns.pas:      // Use the default directory obtained from tParameters.
GenFns.pas:    SQL.Add('FROM tFaultDetails');
GenFns.pas:      SQL.Add('FROM (SELECT LTRIM(CAST(tFaultDetails.Availability AS varchar(12)))'+
GenFns.pas:      SQL.Add(' FROM tFaultDetails');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      SQL.Add('FROM tDataCollection');
InitFns.pas:  qryStringList.Add('SELECT id FROM tBatchStatus');
Main.pas:    qAdminDetailDateFrom: TDateTimeField;
Main.pas:    qAdminSummaryDateFrom: TDateTimeField;
Main.pas:    qRelExpTransactSummaryDateFrom: TDateTimeField;
Main.pas:    qTransactionsFromDate: TStringField;
Main.pas:    qMultiManualFromDate: TStringField;
Main.pas://    procedure ManualDCInsert(slManual: TStringList);
Main.pas:    qFormCreate.SQL.Add('FROM tBatch');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    GetGSTRate;                   // Read GST rate from tParameter - ref GenFns.
Main.pas:  slQueryStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:  slQueryStringList.Add(' FROM tBatch');
Main.pas:      slStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:      slStringList.Add(' FROM tBatch');
Main.pas:    qryStringList.Add('FROM tBatchType');
Main.pas:  qryStringList.Add('FROM tValidAccountNumber');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qrySetBatch.SQL.Add('FROM (tBatch');
Main.pas:  qryHeadings.SQL.Add('FROM tBatch');
Main.pas:    slSQL.Add('FROM (SELECT tBatch.ID AS BatchID, '+
Main.pas:    slSQL.Add('FROM (tBatch');
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT P.BatchID, P.PayableDate, '+
Main.pas:    slSQL.Add('FROM tPayable P');
Main.pas:    slSQL.Add('FROM (SELECT tFinalisedTransaction.RevenueFlag, '+
Main.pas:    slSQL.Add('FROM tFinalisedTransaction');
Main.pas:    slSQL.Add('FROM (SELECT TN.*, tDubiousResult.DubiousTypeID, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tTransaction.BatchID, tTransaction.ServiceID, '+
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM ((((SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:    slSQL.Add('FROM (((((((((tServiceID AS SID '+
Main.pas:    slSQL.Add('SELECT TN.BatchID, tServiceID.ServiceID, TN.DateFrom, '+
Main.pas:    slSQL.Add('FROM (SELECT tTransaction.BatchID, tTransaction.ServiceID,');
Main.pas:      'THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM (tAdjustment');
Main.pas:    slSQL.Add('FROM (SELECT DC2.*, tCriticalType.Description AS "Reason"');
Main.pas:    slSQL.Add('FROM (SELECT DC1.*, (DC1.RENT + DC1.CALL + DC1.OTHER) '+
Main.pas:    slSQL.Add('FROM ((((((SELECT DC0.ServiceID, DC0.StatusID, DC0.ServiceTypeID, '+
Main.pas:    slSQL.Add(' Min(DC0.FromDate) AS "FromDate",');
Main.pas://      'DC0.FromDate END) AS "RentFrom",');
Main.pas:    slSQL.Add('FROM ((SELECT DC.*, tServiceType.ID AS ServiceTypeID');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.*, (CASE '+
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slSQL.Add('FROM ((tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT TN.BatchID, tServiceID.ServiceID, '+
Main.pas:      'tServiceType.Code, TN.DateFrom, TN.DateTo, TN.Rent, TN.Calls, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tBatch.BillingPeriod, tTransaction.BatchID, '+
Main.pas:    slSQL.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas://      ' THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:          qBatchSettings.SQL.Add('FROM tBatch');
Main.pas:          // Remove adjustments from tDataCollection.
Main.pas:          DeleteFromDC(nThisBatch, slCopyList, lSuccessful);
Main.pas:  slStrings.Add('FROM (SELECT SID1.ServiceID, SID1.Code, SID1.ServiceType, '+
Main.pas:  slStrings.Add('FROM (SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:  slStrings.Add('FROM ((((((((tServiceID AS SID '+
Main.pas:      'Min(tTransaction.FromDate) AS "DateFrom",');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  slStrings.Add('FROM (SELECT tDataCollection.BatchID, tDataCollection.ServiceID,'+
Main.pas:  slStrings.Add('FROM (tDataCollection');
Main.pas:      SQL.Add('SELECT id FROM tBatchStatus');
Main.pas:      qryStringList.Add('INSERT INTO tBatch');
Main.pas:      qryStringList.Add('SELECT ID FROM tBatch');
Main.pas:      qryStringList.Add('INSERT INTO tBatchStatusHistory');
Main.pas:    SQL.Add('SELECT BatchStatusID FROM tBatch');
Main.pas:  // Test if Revenue entries are to be added to tDataCollection from tRate.
Main.pas:  qryStringList.Add('FROM tBatchType');
Main.pas:    // from tDataCollection to tTransactions later by setting RevenueFlag=0.
Main.pas:    qryStringList.Add('FROM tTransactionType TT');
Main.pas:    qryStringList.Add('INSERT INTO tDataCollection');
Main.pas:    qryStringList.Add(' RateDescription, FromDate, ToDate, TransactionTypeID,');
Main.pas:    qryStringList.Add(' DC3.RateDescription, DC3.FromDate, DC3.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC2.SequenceNo, DC2.ServiceID, DC2.BatchID,');
Main.pas:    qryStringList.Add(' DC2.RateDescription, DC2.FromDate, DC2.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:    qryStringList.Add('FROM (SELECT DC00.DataCollectionID, DC00.ServicetypeID,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:  sImportFromDir : string;
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:            qry.SQL.Add('FROM tParameter');
Main.pas:            if qry.Eof then sImportFromDir := ''
Main.pas:            else sImportFromDir := qry.FieldByName('ParmText').AsString;
Main.pas:              TelstraInvoiceFixedEBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceFixedOrigEBS( nNewBatchNumber, sImportFromDir);
Main.pas:              TelstraInvoiceFixedOBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceMobileEBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceMobileOBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              VodafoneInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusFixedInvoice( nProgramID, nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileDataInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousValidResolution');
Main.pas:  slStrings.Add('FROM tDubiousValidResolution');
Main.pas:    slStrings.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousResult');
Main.pas:    SQL.Add('FROM (SELECT DISTINCT BatchID');
Main.pas:    SQL.Add('FROM tPayableDetail');
Main.pas:    SQL.Add('FROM tInvoiceDetail');
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:        // The following is repeated EXACTLY from the previous test.
Main.pas:    slStrings.Add('FROM (SELECT tTransaction.BatchID, tServiceID.ServiceID,');
Main.pas:    slStrings.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  sDateFrom : string;
Main.pas:    // First, update the date fields from tBatch.
Main.pas:    sDateFrom := FormattedDateString(FirstDayInMonth(dManual));
Main.pas:    slManual.Add('SET FromDate = '''+sDateFrom+''',');
Main.pas:    slManual.Add('FROM tMultiManualData');
Main.pas:      slManual.Add('FROM ((tBatchType');
Main.pas:          AddManualForm.FromDate := dtpCallStartDate.Date
Main.pas:          AddManualForm.FromDate := dtpRentStartDate.Date
Main.pas:          AddManualForm.FromDate := dManual;
Main.pas:    slStrings.Add('FROM (SELECT DCD.BatchID, DCD.ServiceID, DCD.Code, '+
Main.pas:    slStrings.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slStrings.Add('FROM ((tDataCollection');
Main.pas:  qry.SQL.Add('FROM tBatchType');
Main.pas:  // Only the InsertSQL statement needs to be modified - to add BatchTypeID.
Main.pas:  if (UpdateKind = ukInsert) then begin
Main.pas:    slManual.Add('INSERT INTO tMultiManualData');
Main.pas:      ' FromDate, ToDate, RateDescription)');
Main.pas:      ' :FromDate, :ToDate, :RateDescription)');
Main.pas:    uqMultiManual.InsertSQL.Text := slManual.Text;
Main.pas:// This program manages the importing of data from a Telstra file that
Main.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
Main.pas:      SQL.Add('FROM tValidAccountNumber');
Manual.pas:    lblFrom: TLabel;
Manual.pas:    edtFrom: TDateEdit;
Manual.pas:    procedure SetFromDate(Value: TDateTime);
Manual.pas:    function GetFromDate: TDateTime;
Manual.pas:    property FromDate: TDateTime read GetFromDate write SetFromDate;
Manual.pas:procedure TManualForm.SetFromDate(Value: TDateTime);
Manual.pas:  edtFrom.Date := Value;
Manual.pas:end;    // SetFromDate.
Manual.pas:function TManualForm.GetFromDate: TDateTime;
Manual.pas:  Result := edtFrom.Date;
Manual.pas:end;    // GetFromDate.
Manual.pas:// When a ServiceType is selected, the options available to select from
Manual.pas:    qManualService.SQL.Add('FROM tServiceType');
Manual.pas:// Called from Main when establishing this Form.
Manual.pas:  slInsertManual : TStringList;
Manual.pas:    sTemp := 'ServiceID,GSTFlag,AmountExGST,GSTAmount,AmountIncGST,FromDate,ToDate';
Manual.pas:    slInsertManual := TStringList.Create;
Manual.pas:    slInsertManual.Add('INSERT INTO tDataCollection');
Manual.pas:    slInsertManual.Add('(BatchID,TransactionTypeID,'+ sTemp +')');
Manual.pas:    if (Copy(Trim(edtFrom.Text),1,1) = '/') then
Manual.pas:      sTemp := sTemp + ''''+ FormattedDateString(edtFrom.Date) +''',';
Manual.pas:    slInsertManual.Add('VALUES ('+sBatchID +','+ sManualID +','+sTemp+')');
Manual.pas:      SQL := slInsertManual;
Manual.pas:    slInsertManual.Free;
Manual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:  sFromDate : string;
MultiManual.pas:    SQL.Add('if exists (select * from dbo.sysobjects '+
MultiManual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:    SQL.Add('FROM tBatch');
MultiManual.pas:      sFromDate := FormattedDateString(FieldByName('BatchStartDate').AsDateTime);
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Rent AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add('INSERT INTO tDataCollection');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Call AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add('INSERT INTO tDataCollection');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Other AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add('INSERT INTO tDataCollection');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    // FromDate.
MultiManual.pas:    SQL.Add('SET FromDate = NULL');
MultiManual.pas:    SQL.Add('AND FromDate IS NOT NULL');
MultiManual.pas:    SQL.Add('AND DATALENGTH(FromDate) <> 10');
OptusFixed.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
OptusFixed.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusFixed.pas:    SQL.Add('FROM tSupplier');
OptusFixed.pas:      SQL.Add('FROM tSupplierServiceCode');
OptusFixed.pas:// Data handled is for calls made from Optus fixed phones (PABX).
OptusFixed.pas:  ReadString: string;                  // Read in from the text file.
OptusFixed.pas:            //        for local calls + gst, so omitted from processing (RJC).
OptusFixed.pas:            // Reinstated, but Calls omitted from processing-RJC20060218.
OptusFixed.pas:            // Calls omitted from processing.
OptusFixed.pas:            qryStringList.Add('INSERT INTO tDataCollection');
OptusFixed.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobile.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobile.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusMobile.pas:  sCallFrom : string;
OptusMobile.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobile.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobile.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobile.pas:  ReadString: string;                  // Read in from the text file.
OptusMobile.pas://  sRentFrom : string;
OptusMobile.pas://  sCallFrom : string;    // Use global variable instead => update all values.
OptusMobile.pas:  sMonthFrom: string;
OptusMobile.pas:  sYearFrom : string;
OptusMobile.pas://  sRentFrom := '';
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:  sMonthFrom := '';
OptusMobile.pas:  sYearFrom := '';
OptusMobile.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobile.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                  sListValues := sListValues + sCallFrom;
OptusMobile.pas:                sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobile.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobile.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobile.pas://              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
OptusMobile.pas:            qryStringList.Add('INSERT INTO tDataCollection');
OptusMobile.pas:  sFromDate : string;
OptusMobile.pas:    SQL.Add('  Sum(AmountIncGST) AS AmtActualSpend, FromDate,');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('GROUP BY FromDate, ToDate, TransactionTypeID,');
OptusMobile.pas:  sFromDate := qMinSpend.FieldByName('FromDate').AsString;
OptusMobile.pas:      SQL.Add('FROM');
OptusMobile.pas:      SQL.Add('  FROM tDataCollection');
OptusMobile.pas:        sListFields := sListFields + 'FromDate,';
OptusMobile.pas:        sListValues := sListValues + sFromDate +',';
OptusMobile.pas:        qryStringList.Add('INSERT INTO tDataCollection');           // 0.
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobile.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobile.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobile.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobile.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobileData.pas:// 131105-RJC Copy from OptusMobile to OptusMobileData.
OptusMobileData.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobileData.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobileData.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobileData.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobileData.pas:  ReadString: string;                  // Read in from the text file.
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sMonthFrom: string;
OptusMobileData.pas:  sYearFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:  sMonthFrom := '';
OptusMobileData.pas:  sYearFrom := '';
OptusMobileData.pas:              // 'DV' included but must omit ' AGG' from rental a/c duplicates.
OptusMobileData.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobileData.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                  // If removed 'DV' from calls then use this condition:
OptusMobileData.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                  sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobileData.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobileData.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobileData.pas:            qryStringList.Add('INSERT INTO tDataCollection');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM (');
OptusMobileData.pas:      SQL.Add('  FROM (');
OptusMobileData.pas:      SQL.Add('    FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobileData.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobileData.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobileData.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobileData.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
Quetzal.pas:    RentFrom : TDateTime;
Quetzal.pas:    CallFrom : TDateTime;
Quetzal.pas:    qryDC.SQL.Add('FROM tDataCollection');
Quetzal.pas:qryDC.SQL.Add('SELECT ParmText FROM tParameter');
Quetzal.pas:        qryDC.SQL.Add('DELETE FROM tDataCollection');
Quetzal.pas:// Shipto changed from MEG to MEF a/c RLD 080620 (Mainco billing change).RJC.
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE Assign');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE');
Quetzal.pas:  qryStringList.Append('FROM ((SELECT Name2.*, Client.Ref3 AS Owner');
Quetzal.pas:  qryStringList.Append('FROM (SELECT Call.ClientCode, Call.CallNumber, '+
Quetzal.pas:  qryStringList.Append('FROM (SELECT CONVERT(Char(10),Call.LogDatTim,103) '+
Quetzal.pas:  qryStringList.Append('FROM Call');
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Logon '+
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Configuration '+
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('INSERT INTO tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:    Add('FROM call');
Quetzal.pas:// Added Radio Services a/c RLD-transition in name from Dynon - RJC:110108.
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate ;
Quetzal.pas:      qryStringList.Add('INSERT INTO tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Add('FROM Call');
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('INSERT INTO tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:// 121008: TransactionType name check generalised from (6,50) to (nPos,50).
QuoteSystem.pas:    RentFrom : TDateTime;
QuoteSystem.pas:    CallFrom : TDateTime;
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:    Add('FROM BillPurchasing');
QuoteSystem.pas:    SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      qryStringList.Add('INSERT INTO tDataCollection');
QuoteSystem.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:      qryStringList.Add('FROM tDataCollection');
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:  qryStringList.Add('FROM BillJobs');
QuoteSystem.pas:  qryLook.SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      qryStringList.Add('INSERT INTO tDataCollection');
QuoteSystem.pas:        Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:        Add('FROM tDataCollection');
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
ReleaseTransactions.pas:  qryStringList.Add('INSERT INTO tProcessedTransaction');
ReleaseTransactions.pas:  qryStringList.Add(' FromDate, ToDate, CustomerID, CustomerCentreID, '+
ReleaseTransactions.pas:  qryStringList.Add(' tTransaction.FromDate, tTransaction.ToDate, '+
ReleaseTransactions.pas:  qryStringList.Add('FROM ((tTransaction');
ReleaseTransactions.pas:    // Remove transactions from the tTransaction table.
SaveToTransaction.pas:  qAns.SQL.Add('FROM tTransactionType');
SaveToTransaction.pas:  if not VarIsNull(qryDC['FromDate']) then begin
SaveToTransaction.pas:    sListFields := sListFields+ 'FromDate,';
SaveToTransaction.pas:      Trim(qryDC.FieldByName('FromDate').AsString) +''',';
SaveToTransaction.pas:  end;  // FromDate.
SaveToTransaction.pas:  // ElementID is recorded last in this SQL - read from tTransactionType.
SaveToTransaction.pas:  // Must gather the data from the tDataCollection table - it is best to
SaveToTransaction.pas:    SQL.Add('INSERT INTO tOrigin');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('INSERT INTO tRateDescription');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('INSERT INTO tDialledNumber');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('INSERT INTO tDestination');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM ((SELECT tDataCollection.*, tServiceID.ID AS SID,');
SaveToTransaction.pas:    SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:      SQL.Add('FROM (SELECT DC.SID, DC.ServiceID, Sum(RentPercentage) AS "Rent",'+
SaveToTransaction.pas:      SQL.Add('FROM ((SELECT DISTINCT tDataCollection.ServiceID,'+
SaveToTransaction.pas:      SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:      Add('INSERT INTO tTransaction');
SaveToTransaction.pas:        'TxnDate, AmountExGST, GSTAmount, AmountIncGST, FromDate, ToDate,');
SaveToTransaction.pas:      Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');
SaveToTransaction.pas:      Add('FROM (((((SELECT DC1.*');
SaveToTransaction.pas:      Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:      Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:      Add('FROM ((tDataCollection');
SaveToTransaction.pas:        Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');             // 4.
SaveToTransaction.pas:        Add('FROM ((((((((SELECT DC1.*');                                 // 15.
SaveToTransaction.pas:        Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:        Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:        Add('FROM ((tDataCollection');                                    // 20.
SaveToTransaction.pas:              SQL.Add('SELECT * FROM tServiceSplit');
SaveToTransaction.pas:              qryStringList.Add('INSERT INTO tTransaction');
SaveToTransaction.pas:      // Remove transactions from the tDataCollection table.
SaveToTransaction.pas:      // Remove transactions from the tTransaction table.
Security.pas:    FromDate   : string[8];
Security.pas:  sFromDate : string;
Security.pas:  sFromDate := FormattedDateString(dStartDate);
Security.pas:  qryDC.SQL.Add('FROM tTransactionType');
Security.pas:  qryDC.SQL.Add('FROM tSystem');
Security.pas:  qryStringList.Add('FROM (tServiceID');
Security.pas:FROM (tServiceID
Security.pas:      sListFields := sListFields + 'FromDate,';
Security.pas:      sListValues := sListValues +''''+ sFromDate +''',';
Security.pas:      qryStringList.Add('INSERT INTO tDataCollection');
Security.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Security.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Security.pas:      qryStringList.Add('FROM (tDataCollection');
Security.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Security.pas:      qryStringList.Add('FROM tDataCollection');
Security.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Services.pas:    FromDate   : string[8];
Services.pas:  qInsert : TQuery;
Services.pas:procedure InsertRate(const sServiceTypeID, sCustomerID: string; const fRate: real);
Services.pas:  with qInsert do begin
Services.pas:    SQL.Add('INSERT INTO tDiscountedRate');
Services.pas:end;  // InsertRate.
Services.pas:  qInsert := TQuery.Create(MainForm);
Services.pas:  qInsert.DatabaseName := 'dbPPdata';
Services.pas:    SQL.Add('(CASE WHEN ST1.Rate IS NULL THEN 1 ELSE 0 END) AS "InsertNew"');
Services.pas:    SQL.Add('FROM (SELECT ST0.*,');
Services.pas:    SQL.Add('FROM (SELECT ST.ServiceTypeID, ST.CustomerID, ST.Rate, '+
Services.pas:    SQL.Add('FROM (SELECT SID.*, SI.ServiceID, SI.ServiceTypeID, '+
Services.pas:    SQL.Add('FROM ( SELECT SI0.ID, SI1.Rate,');
Services.pas:    SQL.Add(' FROM (SELECT SC1.ID, tDiscountedRate.Rate');
Services.pas:    SQL.Add('  FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    SQL.Add('  FROM tServiceID');
Services.pas:      if FieldByName('InsertNew').AsBoolean then
Services.pas:        InsertRate(sServiceTypeID, sCustomerID, fRate)
Services.pas:  sFromDate : string;
Services.pas:  sFromDate := FormattedDateString(dStartDate);
Services.pas:  qryServices.SQL.Add('FROM tTransactionType');     // Service Records Invoice.
Services.pas:  qryServices.SQL.Add('FROM tStatus');
Services.pas:  qryServices.SQL.Add('FROM tCustomer');
Services.pas:  qryServices.SQL.Add('FROM tSystem');
Services.pas:    Add(' RateDescription, BatchID, FromDate, ToDate, TransactionTypeID,');
Services.pas:    Add('FROM (SELECT CID2.*, CAST((CID2.AmountExGST + CID2.GSTAmount) AS money) '+
Services.pas:    Add('FROM (SELECT CID1.*, CAST((CASE WHEN CID1.GSTFlag LIKE ''Y'' '+
Services.pas:    Add('FROM (SELECT (tCustomer.ShipTo + '' Services Pre July 1999'') '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM tCustomer');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:      Add('INSERT INTO tDataCollection');
Services.pas:        'FromDate, ToDate, TransactionTypeID)');
Services.pas:        'FromDate, ToDate, TransactionTypeID');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:      Add('INSERT INTO tDataCollection');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas://    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID, '+
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:      Add('INSERT INTO tDataCollection');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:  qryStringList.Add('FROM (SELECT SI0.ID, Max(tRate.Cost) AS "CostAmt", '+
Services.pas:  qryStringList.Add('FROM tServiceID AS SI0');
Services.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Telmax.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
Telmax.pas:  qryTelmax.SQL.Add('FROM tSupplier');
Telmax.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
Telmax.pas:      qry.SQL.Add('FROM tCustomer');
Telmax.pas:      qryRef.SQL.Add('FROM tServiceType');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM (tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := FormattedDateString(dStartDate);
Telmax.pas:    qryDC.SQL.Add('FROM tTransactionType');
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC3.*, '+
Telmax.pas:        qryStringList.Add('FROM (SELECT DC2.ID, DC2.AmountExGST,');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC1.ID, (Max(tRate.Cost)/12) AS "AmountExGST"');
Telmax.pas:        qryStringList.Add('FROM ((SELECT DC0.ID, DC0.ServiceID, (CASE');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:            qryStringList.Add('INSERT INTO tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:            qryStringList.Add('INSERT INTO tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            // Remove any inserted leading '0' used to gain an outside line.
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:  fGSTRate : Real;                    // GST Rate for Calcs-read from MainForm.
TelmaxUniComms.pas:    SQL.Add('FROM tTransactionGroup');
TelmaxUniComms.pas:    SQL.Add('FROM tSystem');
TelmaxUniComms.pas:    SQL.Add('FROM tSupplier');
TelmaxUniComms.pas:      qryTelmax.SQL.Add('FROM tTransactionType');
TelmaxUniComms.pas:      SQL.Add('INSERT INTO tSupplierServiceCode');
TelmaxUniComms.pas:      SQL.Add('FROM (');
TelmaxUniComms.pas:      SQL.Add('  FROM (');
TelmaxUniComms.pas:      SQL.Add('    FROM tRate');
TelmaxUniComms.pas:      SQL.Add('FROM   tSupplierServiceCode');                              // 1.
TelmaxUniComms.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tCustomer');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');                                   // 1.
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:      qryRef.SQL.Add('FROM tServiceType');
TelmaxUniComms.pas:        qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:          sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:          qryStringList.Add('INSERT INTO tDataCollection');
TelmaxUniComms.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
TelmaxUniComms.pas:        qryStringList.Add('FROM (tDataCollection');
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := FormattedDateString(dStartDate);
TelmaxUniComms.pas:    SQL.Add('FROM   tRate');                                          // 1.
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:          qryStringList.Add('INSERT INTO tDataCollection');
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          qryStringList.Add('INSERT INTO tDataCollection');
TelmaxUniComms.pas:        // Done. Values updated from the tRates table for TEC & SFC values.
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:            sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelmaxUniComms.pas:      DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:      slCust.Add('FROM tServiceID');                                       // 1.
TelmaxUniComms.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
TelmaxUniComms.pas:        slCust.Add('FROM tDataCollection');
TelmaxUniComms.pas:        slCust.Clear;   // When empty, all entries deleted from tDataCollection.
TelmaxUniComms.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelstraFixed.pas:            GetPhoneAccountBills - Added reading code from input, not default.
TelstraFixed.pas:    RentFrom : TDateTime;
TelstraFixed.pas:    CallFrom : TDateTime;
TelstraFixed.pas:    FromDate        : string[8];
TelstraFixed.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraFixed.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixed.pas:    Add('FromDate');
TelstraFixed.pas:    SQL.Add('FROM tDataCollection');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixed.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixed.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixed.pas:FROM tDataCollect_Temp
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixed.pas:    SQL.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:    SQL.Add(' FromDate, ');
TelstraFixed.pas:    SQL.Add('   FromDate, ');
TelstraFixed.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDS.SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixed.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixed.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              qryStringList.Add('INSERT INTO tDataCollect_Temp');
TelstraFixed.pas:              SubString := ConvertString.Strings[DESC16_C]; // DateFrom.
TelstraFixed.pas:                if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixed.pas:                  RentFrom := dStartBillingPeriod;
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:                SubString := ConvertString.Strings[DESC12_C]; // DateFrom.
TelstraFixed.pas:                if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixed.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  if (Length(DBfromDate) = 0) then
TelstraFixed.pas:                    DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                else if (Length(DBfromDate) > 0) then begin
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  sListValues := sListValues + DBfromDate;
TelstraFixed.pas:                end;  // FromDate.
TelstraFixed.pas:                qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixed.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixed.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixed.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraFixedEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedEBS.pas:    RentFrom : TDateTime;
TelstraFixedEBS.pas:    CallFrom : TDateTime;
TelstraFixedEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedEBS.pas:    Add('FromDate');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollection');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas://    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixedEBS.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixedEBS.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixedEBS.pas:FROM tDataCollect_Temp
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixedEBS.pas:    SQL.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:    SQL.Add(' FromDate, ');
TelstraFixedEBS.pas:    SQL.Add('   FromDate, ');
TelstraFixedEBS.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              qryStringList.Add('INSERT INTO tDataCollect_Temp');
TelstraFixedEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedEBS.pas:              end;  // FromDate.
TelstraFixedEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedOrigEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedOrigEBS.pas:    RentFrom : TDateTime;
TelstraFixedOrigEBS.pas:    CallFrom : TDateTime;
TelstraFixedOrigEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedOrigEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedOrigEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedOrigEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedOrigEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedOrigEBS.pas:                // entry is provided.   (Copied from following else-if section.)
TelstraFixedOrigEBS.pas:              end;  // if LastEntryIs_1. (Copied from section immed. following.)
TelstraFixedOrigEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedOrigEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedOrigEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedOrigEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedOrigEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedOrigEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedOrigEBS.pas:              end;  // FromDate.
TelstraFixedOrigEBS.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraFixedOrigEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:    SQL.Add(' FromDate, ');
TelstraFunctions.pas:    SQL.Add('   FromDate, ');
TelstraFunctions.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:  sFromDate : string;
TelstraFunctions.pas:    Add('FROM tCustomer');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('FROM tServiceType');
TelstraFunctions.pas:    Add('FROM tTransactionType');
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Try to get the dates from the tDataCollection table.
TelstraFunctions.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraFunctions.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraFunctions.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraFunctions.pas:    // Read the dates from the tBatch table.
TelstraFunctions.pas:      Add('FROM tBatch');
TelstraFunctions.pas:      sFromDate := 'NULL';
TelstraFunctions.pas:      sFromDate := ''''+
TelstraFunctions.pas:  end;  // FromDate or EndDate unknown.
TelstraFunctions.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraFunctions.pas:      Add('FROM tParameter');
TelstraFunctions.pas:        Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:        Add(sFromDate);
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tRate');
TelstraFunctions.pas:          Add(' FROM tRate');
TelstraFunctions.pas:            Add('FROM tParameter');
TelstraFunctions.pas:              Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:              Add(sFromDate);
TelstraFunctions.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraFunctions.pas:        Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:      Add('FROM tTransactionType');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tRate');
TelstraFunctions.pas:      Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:      Add(sFromDate+' AS "FromDate",');
TelstraFunctions.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.*');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:          Add('FROM tParameter');
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tDataCollection');
TelstraFunctions.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:          Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:          Add(sFromDate+',');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('INSERT INTO tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraFunctions.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraFunctions.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraFunctions.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraMobile.pas:    RentFrom : TDateTime;
TelstraMobile.pas:    CallFrom : TDateTime;
TelstraMobile.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobile.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobile.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobile.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobile.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobile.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraMobile.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobile.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobile.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraMobileData.pas:    RentFrom : TDateTime;
TelstraMobileData.pas:    CallFrom : TDateTime;
TelstraMobileData.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobileData.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobileData.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileData.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                  DBfromDate :=
TelstraMobileData.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:              qryStringList.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:          end;  // not empty string read from the input file.
TelstraMobileData.pas:  sFromDate : string;
TelstraMobileData.pas:  slDC.Add('FROM tCustomer');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('FROM tServiceType');
TelstraMobileData.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileData.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileData.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileData.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileData.pas:    // Read the dates from the tBatch table.
TelstraMobileData.pas:    slDC.Add('FROM tBatch');
TelstraMobileData.pas:      sFromDate := 'NULL';
TelstraMobileData.pas:      sFromDate := ''''+
TelstraMobileData.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileData.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileData.pas:    slDC.Add('FROM tParameter');
TelstraMobileData.pas:      slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileData.pas:      slDC.Add(sFromDate);
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('FROM tRate');
TelstraMobileData.pas:        slDC.Add(' FROM tRate');
TelstraMobileData.pas:          slDC.Add('FROM tParameter');
TelstraMobileData.pas:            slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:            slDC.Add(sFromDate);
TelstraMobileData.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileData.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileData.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM tRate');
TelstraMobileData.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:        slDC.Add('FROM tParameter');
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:        slDC.Add(sFromDate+',');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    SQL.Add('FROM tSupplier');
TelstraMobileData.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileData.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileData.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileData.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                DBfromDate :=
TelstraMobileDataEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:  sFromDate : string;
TelstraMobileDataEBS.pas:    Add('FROM tCustomer');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('FROM tServiceType');
TelstraMobileDataEBS.pas:    Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataEBS.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataEBS.pas:      Add('FROM tBatch');
TelstraMobileDataEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataEBS.pas:      sFromDate := ''''+
TelstraMobileDataEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataEBS.pas:      Add('FROM tParameter');
TelstraMobileDataEBS.pas:        Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:        Add(sFromDate);
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tRate');
TelstraMobileDataEBS.pas:          Add(' FROM tRate');
TelstraMobileDataEBS.pas:            Add('FROM tParameter');
TelstraMobileDataEBS.pas:              Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:              Add(sFromDate);
TelstraMobileDataEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataEBS.pas:        Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:      Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tRate');
TelstraMobileDataEBS.pas:      Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:      Add(sFromDate+' AS "FromDate",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.*');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:          Add('FROM tParameter');
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:          Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:          Add(sFromDate+',');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('INSERT INTO tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataOldEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataOldEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataOldEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataOldEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                DBfromDate :=
TelstraMobileDataOldEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:  sFromDate : string;
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tCustomer');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tServiceType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataOldEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataOldEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataOldEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tBatch');
TelstraMobileDataOldEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataOldEBS.pas:      sFromDate := ''''+
TelstraMobileDataOldEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataOldEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:      slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataOldEBS.pas:      slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:        slDC.Add(' FROM tRate');
TelstraMobileDataOldEBS.pas:          slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:            slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:            slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataOldEBS.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.*');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:        slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:        slDC.Add(sFromDate+',');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('INSERT INTO tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataOldEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileEBS.pas:    RentFrom : TDateTime;
TelstraMobileEBS.pas:    CallFrom : TDateTime;
TelstraMobileEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileEBS.pas:            qryStringList.Add('INSERT INTO tDataCollection');
TelstraMobileEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobileEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
Vodafone.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
Vodafone.pas:  qryVodafone.SQL.Add('SELECT ParmNumber FROM tParameter');
Vodafone.pas:    qryVodafone.SQL.Add('INSERT INTO tParameter');
Vodafone.pas:  qryVodafone.SQL.Add('FROM tSupplier');
Vodafone.pas:    qryVodafone.SQL.Add('FROM tSupplierServiceCode');
Vodafone.pas:// Data handled is for calls made from mobile phones.
Vodafone.pas:  ReadString: string;                  // Read in from the text file.
Vodafone.pas:  sRentFrom : string;
Vodafone.pas:  sCallFrom : string;
Vodafone.pas:  sRentFrom := '';
Vodafone.pas:  sCallFrom := '';
Vodafone.pas:              sListFields := sListFields + 'FromDate,';
Vodafone.pas:              sListValues := sListValues + sCallFrom;
Vodafone.pas:                sListFields := sListFields + 'FromDate,';
Vodafone.pas:                // Deduct discount sum from the total charge.
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:                  qryStringList.Add('INSERT INTO tDataCollection');
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC2_C]) +''',';
Vodafone.pas:              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sRentFrom;
Vodafone.pas:            qryStringList.Add('INSERT INTO tDataCollection');
Vodafone.pas:        // Deduct discount sum from the total charge.
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Vodafone.pas:        qryDC.SQL.Add('FROM tDataCollection');
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          qryStringList.Add('INSERT INTO tDataCollection');
Vodafone.pas:      DeleteFromDC( nBatch, EmptyList, lContinue);


DB update (change)
AccessRights.pas:    q.SQL.Add('FROM tUser');
AccessRights.pas:        q.SQL.Add('FROM tUserFunction');
AdminCharges.pas:  qryStringList.Add('DELETE FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (tTransaction INNER JOIN tTransactionType '+
AdminCharges.pas:  qryStringList.Add('SELECT ParmNumber FROM tParameter');
AdminCharges.pas:  qryStringList.Add('SELECT id FROM tStatus');
AdminCharges.pas:  qryLook.SQL.Add('SELECT id, description FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tCustomer ' +
AdminCharges.pas://  if qryTN['RentFrom'] <> Null then begin
AdminCharges.pas:  if qryTN['FromDate'] <> Null then begin
AdminCharges.pas:    sListFields := sListFields+ 'FromDate,';
AdminCharges.pas:      StandardDateString(qryTN.FieldByName('FromDate').AsDateTime) +''',';
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add(' FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add('  Min(tTransaction.FromDate) AS "FromDate",');
AdminCharges.pas://    'THEN tTransaction.FromDate END) AS RENTFROM,');
AdminCharges.pas:  qryStringList.Add(' FROM (tTransaction');
AdminCharges.pas:  // Update and execute the query.
AdminCharges.pas:  // Create the query that will update the tTransaction table.
AdminCharges.pas:  // Must gather the data from the tTransaction table - it is best to
AdminCharges.pas:    SQL.Add('FROM tParameter');
AdminCharges.pas:      SQL.Add('FROM tBatch');
AdminCharges.pas:    qryStringList.Add('FROM (SELECT (TN2.RENT + TN2.CALL + TN2.OTHER) AS TOTAL, TN2.*,'+
AdminCharges.pas:    qryStringList.Add('FROM ((SELECT TN1.ServiceID,' +
AdminCharges.pas:    qryStringList.Add('  Min(TN1.FromDate) AS "FromDate",');
AdminCharges.pas://      ' TN1.FromDate END) AS RENTFROM,');
AdminCharges.pas:    qryStringList.Add(' FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:    qryStringList.Add('   tTransaction.FromDate, tTransaction.ToDate,');
AdminCharges.pas:    qryStringList.Add('  FROM tTransaction LEFT JOIN ');
AdminCharges.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_ADMINRVW);
AdminCharges.pas:  UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_ADMINRVW);
AnnualCharges.pas:  sFromDate : string;
AnnualCharges.pas:  sFromDate := FormattedDateString(dStartDate);
AnnualCharges.pas:  qryDC.SQL.Add('FROM tTransactionType');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tCustomer');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tSystem');
AnnualCharges.pas:    Add('FROM (SELECT tServiceID.ServiceID, tServiceID.Description, '+
AnnualCharges.pas:    Add('FROM (((tServiceID');
AnnualCharges.pas:      sListFields := sListFields + 'FromDate,';
AnnualCharges.pas:      sListValues := sListValues +''''+ sFromDate +''',';
AnnualCharges.pas:      // Update and execute the query.
AnnualCharges.pas:      qryStringList.Add('UPDATE tDataCollection');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
AnnualCharges.pas:      qryStringList.Add('FROM ((tDataCollection');
AnnualCharges.pas:      // Now update the values stored in the tBatch table.
AnnualCharges.pas:      qryStringList.Add('UPDATE tBatch');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
AnnualCharges.pas:      qryStringList.Add('FROM tDataCollection');
AnnualCharges.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
AnnualCharges.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
AnnualData.pas:function UpdateFaultsTable(const nBatchID: integer;const sPeriod: string): boolean;
AnnualData.pas:    SQL.Add('DELETE FROM tFaultDetails');
AnnualData.pas:    // NB A separate program updates Availability, AvailabilityTargetMet.
AnnualData.pas:    This section is constant for all transactions and updated using Params so
AnnualData.pas:    SQL.Add('FROM Call');
AnnualData.pas:      SQL.Add('UPDATE tFaultDetails');
AnnualData.pas:      SQL.Add('FROM (SELECT tBatchType.Description');
AnnualData.pas:      SQL.Add('FROM tBatchType');
AnnualData.pas:end;  // UpdateFaultsTable.
AnnualData.pas:    SQL.Add('FROM tFaultDetails');
AnnualData.pas:          UpdateFaultsTable(nBatchID, sPeriod);
AnnualData.pas:          'from Quetzal?', mtConfirmation, [mbYes, mbNo], 0) = mrYes) then begin
AnnualData.pas:          UpdateFaultsTable(nBatchID, sPeriod);
AnnualData.pas:      SQL.Add('UPDATE tDataCollection');
AnnualData.pas:      SQL.Add('UPDATE tDataCollection');
AnnualData.pas://      SQL.Add('FROM (SELECT DC.ID, CAST(fd.Availability AS varchar) AS Var02');
AnnualData.pas://      SQL.Add('	FROM tFaultDetails fd');
AnnualData.pas:      SQL.Add('FROM (SELECT TmpDC.ID, TmpDC.Var02');
AnnualData.pas:      SQL.Add('	FROM (SELECT TOP 10000 DC.ID, CAST(fd.Availability AS varchar) AS Var02, '+
AnnualData.pas:      SQL.Add('  FROM tDataCollection dc');
AnnualData.pas:      SQL.Add('	FROM tDataCollection dc');
AnnualData.pas:      SQL.Add(' FromDate, ToDate, BatchID, Var01, Var02)');
AnnualData.pas:      SQL.Add(' DC.FromDate, DC.ToDate, DC.BatchID,');
AnnualData.pas:      SQL.Add('FROM tDataCollection DC');
AnnualData.pas:      // Now update the values stored in the tBatch table.
AnnualData.pas:      SQL.Add('UPDATE tBatch');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) '+
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('UPDATE tBatch');
AnnualData.pas:      SQL.Add('FROM (SELECT COUNT(*) AS "InvoiceNo"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('UPDATE tBatch');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "TotalCredits"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
CodeFile.pas:  qryString.Add('FROM ((((((((((SELECT TXN.ServiceID, TXN.ServiceTypeID, '+
CodeFile.pas:  qryString.Add('FROM ('+TransactionTable+' TXN');
CodeFile.pas:      SQL.Add('FROM tBatch');
CodeFile.pas:          SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:          SQL.Add('FROM tTransaction');
CodeFile.pas:              SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:                // Update the field value.
CodeFile.pas:                SQL.Add('UPDATE tParameter');
CriticalTests.pas:  procedure UpdateCriticalTestList( const nThisBatch, Test_nn: LongInt;
CriticalTests.pas:  // Flush the results from all previous Critical Tests.
CriticalTests.pas:procedure UpdateCriticalTestList( const nThisBatch, Test_nn: LongInt;
CriticalTests.pas:  qryStringList.Add('SELECT * FROM tCriticalCheck');
CriticalTests.pas:    // Already entered - must update it.
CriticalTests.pas:    qryStringList.Add('UPDATE tCriticalCheck');
CriticalTests.pas:    qryStringList.Add('FROM tCriticalCheck');
CriticalTests.pas:end;  // UpdateCriticalTestList.
CriticalTests.pas:// Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryDC.SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:      qryStringList.Add('FROM (SELECT tServiceID.ServiceID, '+
CriticalTests.pas:      qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:      qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:          ' Services Omitted From The Invoice');
CriticalTests.pas:  qryDC2: TQuery;                   // Update tDataCollection.
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:  qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:    qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:      sBatchTypeID+') AS DCupdate');
CriticalTests.pas:    qryStringList.Add('AND tDataCollection.ServiceID = DCupdate.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT ServiceID,');
CriticalTests.pas:  qryStringList.Add('FROM tServiceSplit');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ID AS SID, DC.ServiceID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('UPDATE tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatchType INNER JOIN tBatch');
CriticalTests.pas:      // Update the tCriticalCheck table.
CriticalTests.pas:      UpdateCriticalTestList(nBatch,1,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,1,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,2,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,3,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,4,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,5,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,6,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,7,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,8,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,9,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas:        UpdateCriticalTestList(nBatch,10,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas://        UpdateCriticalTestList(nBatch,11,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas://        UpdateCriticalTestList(nBatch,12,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas://        UpdateCriticalTestList(nBatch,13,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas://        UpdateCriticalTestList(nBatch,14,lResultIsGood);
CriticalTests.pas:        // Update the tCriticalCheck table.
CriticalTests.pas://        UpdateCriticalTestList(nBatch,15,lResultIsGood);
CriticalTests.pas:    // Update the tBatch Status.
CriticalTests.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_CPASS);
CriticalTests.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_CERRS);
CurrentRentCalls.pas:procedure UpdateCurrentRentCalls(const nBatch: integer);
CurrentRentCalls.pas:procedure UpdateCurrentRentCalls(const nBatch: integer);
CurrentRentCalls.pas:// Update the tServiceID fields:
CurrentRentCalls.pas:// Called when tTransaction transactions are created from tDataCollection data.
CurrentRentCalls.pas:    Add('UPDATE tTransaction');
CurrentRentCalls.pas:    Add('UPDATE tServiceID');
CurrentRentCalls.pas:    Add(' FROM tTransaction');
CurrentRentCalls.pas:    Add('UPDATE tServiceID');
CurrentRentCalls.pas:    Add('FROM (SELECT tTransaction.ServiceID, tTransaction.ServiceTypeID,');
CurrentRentCalls.pas:    Add('FROM ((tTransaction');
CurrentRentCalls.pas:end;  // UpdateCurrentRentCalls.
DataMod.pas:  NewPPIniFile.UpdateFile;
DataMod.pas:  NewPPIniFile.UpdateFile;
DateFunctions.pas:{ Some general functions first to simplify the transition from dBase to Delphi4.}
DateFunctions.pas:// Retrieve the month name from the stringlist slMonth,
DateFunctions.pas:// Retrieve the month number from the stringlist slMonth,
DCEdit.pas:    slManual.Add('UPDATE tDataCollection');
DubiousTests.pas:  procedure UpdateDubiousTestList(
DubiousTests.pas:procedure UpdateDubiousTestList(
DubiousTests.pas:    Add('SELECT * FROM tDubiousResult');
DubiousTests.pas:end;  // UpdateDubiousTestList().
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (SELECT tTransaction.ServiceID, '+
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:        UpdateDubiousTestList(nBatch, nDubious,
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM ((SELECT tTransaction.ServiceID, ' +
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:        UpdateDubiousTestList(nBatch, nDubious,
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('FROM tBatch');
DubiousTests.pas:    SQL.Add('FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN3.ServiceID, TN3.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN2.ServiceID, TN2.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN1.*,');
DubiousTests.pas:    Add('FROM (SELECT ServiceID, CustomerID, Count(*) AS "NumCalls",');
DubiousTests.pas:    Add('FROM tTransaction');
DubiousTests.pas:        UpdateDubiousTestList(nBatch, nDubious,
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('SELECT ParmNumber FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN.ServiceID, TN.CustomerID,'+
DubiousTests.pas:    Add('FROM (SELECT DISTINCT tTransaction.ServiceID, '+
DubiousTests.pas:    Add(' FROM tTransaction');
DubiousTests.pas:        UpdateDubiousTestList(nBatch, nDubious,
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    Add('AND tCostRange.CostRangeFrom IS NOT NULL');
DubiousTests.pas:    Add('AND (tTransaction.AmountIncGST < tCostRange.CostRangeFrom');
DubiousTests.pas:        UpdateDubiousTestList(nBatch, nDubious,
DubiousTests.pas:    SQL.Add('FROM tDubiousResult');
DubiousTests.pas:    Add('FROM tBatchType INNER JOIN tBatch');
DubiousTests.pas:    // Update the tBatchStatus table - Dubious Errors check passed.
DubiousTests.pas:    UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_DCHECKOK);
DubiousTests.pas:    // Update the tBatchStatus table - Dubious errors.
DubiousTests.pas:    UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_DCHECK);
FileFunctions.pas: Reads a delimited string from FName and saves each line into a single
FileFunctions.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
FileFunctions.pas:  ReadString: string;                  // Read in from the text file.
FileFunctions.pas:          // Let windows update all messages.
FileFunctions.pas:        raise;            // Raise the exception to avoid call to CommitUpdates.
Filter.pas:    edtFromDate: TDateEdit;
Filter.pas:    lblFromDate: TLabel;
Filter.pas:  slQuery1.Add('FROM (SELECT FT1.*, tCustomer.ShipTo, tServiceID.ServiceID, '+
Filter.pas:  slQuery1.Add('FROM (SELECT tFinalisedTransaction.ServiceID AS "SID", '+
Filter.pas:  slQuery1.Add('FROM tFinalisedTransaction');                              // 8.
Filter.pas:  lblFromDate.Enabled := cbDate.Checked;
Filter.pas:  edtFromDate.Enabled := cbDate.Checked;
Filter.pas:  if cbDate.Checked then edtFromDate.SetFocus;
Filter.pas:  // Update the SQL statement.
Filter.pas:  // Update the final Query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenFns.pas:  procedure UpdateBatchStatus(const nThisBatch, nStatus: LongInt);
GenFns.pas:  procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:  procedure UpdateBatchTotals(const BatchID: integer);
GenFns.pas:  function UpdateFaultsTable(const nBatchID: integer;const sPeriod: string): boolean;
GenFns.pas:  q.SQL.Add('FROM tParameter');
GenFns.pas:  qryParam.SQL.Add('SELECT ParmNumber FROM tParameter');
GenFns.pas:procedure UpdateBatchStatus(const nThisBatch, nStatus: LongInt);
GenFns.pas:  qryStringList.Add('SELECT BatchStatusID FROM tBatch');
GenFns.pas:      // Update the tBatch table.
GenFns.pas:      qryStringList.Add('UPDATE tBatch');
GenFns.pas:      qryStringList.Add('FROM tBatch');
GenFns.pas:    // Update the tBatchStatusHistory table.
GenFns.pas:  // Now update the list of viewable Batch numbers in tDataCollection
GenFns.pas:end;  // UpdateBatchStatus().
GenFns.pas:    sQueryString.Add('SELECT id FROM tUser');
GenFns.pas:      qry.SQL.Add('SELECT ID FROM tUser WHERE UserLogin = '''+sOp+'''');
GenFns.pas:      qryFunction.SQL.Add('SELECT ID FROM tFunction');
GenFns.pas:      qry.SQL.Add('UPDATE tUser');
GenFns.pas:    qry.SQL.Add('UPDATE tUser');
GenFns.pas:  qryStringList.Add('FROM '+sTable);
GenFns.pas:  qryStringList.Add('FROM tDataCollection');
GenFns.pas:procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:    qryStringList.Add('FROM tDataCollection');
GenFns.pas:end;  // procedure DeleteFromDC().
GenFns.pas:// A function to remove any apostrophe from the passed string.
GenFns.pas:// Over-rides the default "ffGeneral" format, used to insert/update with SQL.
GenFns.pas:// Some general functions to simplify the transition from dBase to Delphi4.
GenFns.pas:procedure UpdateBatchTotals(const BatchID: integer);
GenFns.pas:    SQL.Add('FROM tDataCollection AS DC');
GenFns.pas:    SQL.Add('UPDATE tBatch');
GenFns.pas:end;  // UpdateBatchTotals.
GenFns.pas:  sFromDate : string;
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      sFromDate := 'NULL';
GenFns.pas:      sFromDate := ''''+FormattedDateString(FieldByName('RentStartDate').AsDateTime)+'''';
GenFns.pas:    SQL.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID, '+
GenFns.pas:    SQL.Add('SELECT SID.ServiceID, SID.BatchID, SID.FromDate, SID.ToDate, '+
GenFns.pas:    SQL.Add('FROM (SELECT tServiceID.ServiceID AS "ServiceID",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "FromDate",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "ToDate",');
GenFns.pas:    SQL.Add('FROM tServiceID');
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:function UpdateFaultsTable(const nBatchID: integer;const sPeriod: string): boolean;
GenFns.pas:    SQL.Add('DELETE FROM tFaultDetails');
GenFns.pas:    SQL.Add('FROM Call c');
GenFns.pas:end;  // UpdateFaultsTable.
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:      SQL.Add('UPDATE tParameter');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:// This procedure creates a CSV file from the query parameter and saves it
GenFns.pas:      // Use the default directory obtained from tParameters.
GenFns.pas:    // Update the tFaultDetails table (if processed) now.
GenFns.pas:    SQL.Add('FROM tFaultDetails');
GenFns.pas:      // tFaultDetails is used, so update that table and tTransaction entries.
GenFns.pas:      SQL.Add('UPDATE tTransaction');
GenFns.pas:      SQL.Add('FROM (SELECT LTRIM(CAST(tFaultDetails.Availability AS varchar(12)))'+
GenFns.pas:      SQL.Add(' FROM tFaultDetails');
GenFns.pas:      SQL.Add('UPDATE tFaultDetails');
GenFns.pas:    // Prepare to update the VRTquote table.
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:    // Update the VRTquote table if processed now.
GenFns.pas:      SQL.Add('FROM tDataCollection');
GenFns.pas:      SQL.Add('UPDATE Quote_Items');
GenFns.pas:        // This is actually where VRTquote is updated for each CallNumber.
InitFns.pas:  qryStringList.Add('SELECT id FROM tBatchStatus');
Main.pas:    mnuUpdateItem: TMenuItem;
Main.pas:    qAdminDetailDateFrom: TDateTimeField;
Main.pas:    qAdminSummaryDateFrom: TDateTimeField;
Main.pas:    mnuUpdateSystemdata: TMenuItem;
Main.pas:    qRelExpTransactSummaryDateFrom: TDateTimeField;
Main.pas:    qTransactionsFromDate: TStringField;
Main.pas:    uqMultiManual: TUpdateSQL;
Main.pas:    qMultiManualFromDate: TStringField;
Main.pas:    procedure mnuUpdateSystemDataClick(Sender: TObject);
Main.pas:    procedure qMultiManualUpdateRecord(DataSet: TDataSet;
Main.pas:      UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction);
Main.pas:  TreeViewBeingUpdated : boolean;
Main.pas://  InitiateTabUpdated : boolean;
Main.pas:  TreeViewBeingUpdated := False;
Main.pas:    qFormCreate.SQL.Add('FROM tBatch');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    GetGSTRate;                   // Read GST rate from tParameter - ref GenFns.
Main.pas:  slQueryStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:  slQueryStringList.Add(' FROM tBatch');
Main.pas:  TreeViewBeingUpdated := True;
Main.pas:  PPTreeView.Items.BeginUpdate;
Main.pas:  PPTreeView.Items.EndUpdate;
Main.pas:  TreeViewBeingUpdated := False;
Main.pas:  if not TreeViewBeingUpdated then begin
Main.pas:      slStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:      slStringList.Add(' FROM tBatch');
Main.pas:  end;  // if not TreeViewBeingUpdated then begin.
Main.pas:    qryStringList.Add('FROM tBatchType');
Main.pas:  qryStringList.Add('FROM tValidAccountNumber');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qrySetBatch.SQL.Add('FROM (tBatch');
Main.pas:  qryHeadings.SQL.Add('FROM tBatch');
Main.pas:    slSQL.Add('FROM (SELECT tBatch.ID AS BatchID, '+
Main.pas:    slSQL.Add('FROM (tBatch');
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT P.BatchID, P.PayableDate, '+
Main.pas:    slSQL.Add('FROM tPayable P');
Main.pas:    slSQL.Add('FROM (SELECT tFinalisedTransaction.RevenueFlag, '+
Main.pas:    slSQL.Add('FROM tFinalisedTransaction');
Main.pas:    slSQL.Add('FROM (SELECT TN.*, tDubiousResult.DubiousTypeID, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tTransaction.BatchID, tTransaction.ServiceID, '+
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM ((((SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:    slSQL.Add('FROM (((((((((tServiceID AS SID '+
Main.pas:    slSQL.Add('SELECT TN.BatchID, tServiceID.ServiceID, TN.DateFrom, '+
Main.pas:    slSQL.Add('FROM (SELECT tTransaction.BatchID, tTransaction.ServiceID,');
Main.pas:      'THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM (tAdjustment');
Main.pas:    slSQL.Add('FROM (SELECT DC2.*, tCriticalType.Description AS "Reason"');
Main.pas:    slSQL.Add('FROM (SELECT DC1.*, (DC1.RENT + DC1.CALL + DC1.OTHER) '+
Main.pas:    slSQL.Add('FROM ((((((SELECT DC0.ServiceID, DC0.StatusID, DC0.ServiceTypeID, '+
Main.pas:    slSQL.Add(' Min(DC0.FromDate) AS "FromDate",');
Main.pas://      'DC0.FromDate END) AS "RentFrom",');
Main.pas:    slSQL.Add('FROM ((SELECT DC.*, tServiceType.ID AS ServiceTypeID');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.*, (CASE '+
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slSQL.Add('FROM ((tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT TN.BatchID, tServiceID.ServiceID, '+
Main.pas:      'tServiceType.Code, TN.DateFrom, TN.DateTo, TN.Rent, TN.Calls, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tBatch.BillingPeriod, tTransaction.BatchID, '+
Main.pas:    slSQL.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas://      ' THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:        if (MessageDlg('Update the details for this Invoice?', mtWarning,
Main.pas:          qBatchSettings.SQL.Add('FROM tBatch');
Main.pas:          qry.SQL.Add('UPDATE tBatch');
Main.pas:          // Remove adjustments from tDataCollection.
Main.pas:          DeleteFromDC(nThisBatch, slCopyList, lSuccessful);
Main.pas:  slStrings.Add('FROM (SELECT SID1.ServiceID, SID1.Code, SID1.ServiceType, '+
Main.pas:  slStrings.Add('FROM (SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:  slStrings.Add('FROM ((((((((tServiceID AS SID '+
Main.pas:      'Min(tTransaction.FromDate) AS "DateFrom",');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  slStrings.Add('FROM (SELECT tDataCollection.BatchID, tDataCollection.ServiceID,'+
Main.pas:  slStrings.Add('FROM (tDataCollection');
Main.pas:  lUpdateBatch : boolean;
Main.pas:  lUpdateBatch := (not lNewBatch);
Main.pas:    if lUpdateBatch then sListValues := sListValues +'InvoiceNo =';
Main.pas:  if not lUpdateBatch or edtTenderNo.Visible then begin
Main.pas:    if lUpdateBatch then sListValues := sListValues +'TenderNo =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'TotalRevenue =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'TotalPayable =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'TotalCredits =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'OpeningBalance =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'PaymentsReceived =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'TotalAdjustments =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'GSTAdjustment =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'GSTAmount =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'PaymentDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'IssueDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +' Rounding =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'RentStartDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'RentEndDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'CallsStartDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'CallsEndDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'PayByDate =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'OrderNumber =';
Main.pas:    if lUpdateBatch then sListValues := sListValues +'RequisitionNumber =';
Main.pas:      SQL.Add('SELECT id FROM tBatchStatus');
Main.pas:      qryStringList.Add('UPDATE tBatch');
Main.pas:    if lUpdateBatch then
Main.pas:      // Update the Batch number on the form.
Main.pas:      qryStringList.Add('SELECT ID FROM tBatch');
Main.pas:    SQL.Add('SELECT BatchStatusID FROM tBatch');
Main.pas:  qMultiManual.ApplyUpdates;
Main.pas:  // Test if Revenue entries are to be added to tDataCollection from tRate.
Main.pas:  qryStringList.Add('FROM tBatchType');
Main.pas:    // from tDataCollection to tTransactions later by setting RevenueFlag=0.
Main.pas:    qryStringList.Add('UPDATE tDataCollection');
Main.pas:    qryStringList.Add('FROM tTransactionType TT');
Main.pas:    qryStringList.Add(' RateDescription, FromDate, ToDate, TransactionTypeID,');
Main.pas:    qryStringList.Add(' DC3.RateDescription, DC3.FromDate, DC3.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC2.SequenceNo, DC2.ServiceID, DC2.BatchID,');
Main.pas:    qryStringList.Add(' DC2.RateDescription, DC2.FromDate, DC2.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:    qryStringList.Add('FROM (SELECT DC00.DataCollectionID, DC00.ServicetypeID,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:  UpdateBatchTotals(StrToInt(sBatchID));
Main.pas:  UpdateBatchStatus(StrToInt(sBatchID), BATCH_STATUS_IMPORT);
Main.pas:  sImportFromDir : string;
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:            qry.SQL.Add('FROM tParameter');
Main.pas:            if qry.Eof then sImportFromDir := ''
Main.pas:            else sImportFromDir := qry.FieldByName('ParmText').AsString;
Main.pas:              TelstraInvoiceFixedEBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceFixedOrigEBS( nNewBatchNumber, sImportFromDir);
Main.pas:              TelstraInvoiceFixedOBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceMobileEBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceMobileOBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              VodafoneInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusFixedInvoice( nProgramID, nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileDataInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousValidResolution');
Main.pas:              slStrings.Add('UPDATE tDubiousResult');
Main.pas:  slStrings.Add('FROM tDubiousValidResolution');
Main.pas:    slStrings.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousResult');
Main.pas:        UpdateBatchStatus(nBatchID, MainForm.BATCH_STATUS_DCHECKOK);
Main.pas:    SQL.Add('FROM (SELECT DISTINCT BatchID');
Main.pas:    SQL.Add('FROM tPayableDetail');
Main.pas:    SQL.Add('FROM tInvoiceDetail');
Main.pas:  // Done, update the final SQL statement.
Main.pas:  // Update the Payables query.
Main.pas:  // Update the Invoice query.
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:      UpdateBatchStatus(nBatch, BATCHSTAT_ADMINOK);
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:        UpdateBatchStatus(nBatch, BATCH_STATUS_PAYEXP);
Main.pas:        // The following is repeated EXACTLY from the previous test.
Main.pas:    slStrings.Add('FROM (SELECT tTransaction.BatchID, tServiceID.ServiceID,');
Main.pas:    slStrings.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:procedure TMainForm.mnuUpdateSystemdataClick(Sender: TObject);
Main.pas:end;  // MenuUpdateSystemdataItemClick.
Main.pas:  sDateFrom : string;
Main.pas:    // First, update the date fields from tBatch.
Main.pas:    sDateFrom := FormattedDateString(FirstDayInMonth(dManual));
Main.pas:    slManual.Add('UPDATE tMultiManualData');
Main.pas:    slManual.Add('SET FromDate = '''+sDateFrom+''',');
Main.pas:    slManual.Add('FROM tMultiManualData');
Main.pas:      slManual.Add('FROM ((tBatchType');
Main.pas:          AddManualForm.FromDate := dtpCallStartDate.Date
Main.pas:          AddManualForm.FromDate := dtpRentStartDate.Date
Main.pas:          AddManualForm.FromDate := dManual;
Main.pas:          UpdateBatchTotals(StrToInt(sInitiateBatchID));
Main.pas:          UpdateBatchStatus(StrToInt(edtBatchID.Text), BATCH_STATUS_IMPORT);
Main.pas:    slStrings.Add('FROM (SELECT DCD.BatchID, DCD.ServiceID, DCD.Code, '+
Main.pas:    slStrings.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slStrings.Add('FROM ((tDataCollection');
Main.pas:  qry.SQL.Add('FROM tBatchType');
Main.pas:procedure TMainForm.qMultiManualUpdateRecord(DataSet: TDataSet;
Main.pas:  UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction);
Main.pas:// This routine is called by calling qMultiManual.ApplyUpdates
Main.pas:  // Updates done by the update SQl object uqMultiManual (linked to qMultiManual).
Main.pas:  if (UpdateKind = ukInsert) then begin
Main.pas:      ' FromDate, ToDate, RateDescription)');
Main.pas:      ' :FromDate, :ToDate, :RateDescription)');
Main.pas:  uqMultiManual.Apply(UpdateKind);
Main.pas:  UpdateAction := uaApplied;
Main.pas:end;  // qMultiManualUpdateRecord.
Main.pas:// This program manages the importing of data from a Telstra file that
Main.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
Main.pas:      SQL.Add('FROM tValidAccountNumber');
Manual.pas:    lblFrom: TLabel;
Manual.pas:    edtFrom: TDateEdit;
Manual.pas:    procedure SetFromDate(Value: TDateTime);
Manual.pas:    function GetFromDate: TDateTime;
Manual.pas:    property FromDate: TDateTime read GetFromDate write SetFromDate;
Manual.pas:procedure TManualForm.SetFromDate(Value: TDateTime);
Manual.pas:  edtFrom.Date := Value;
Manual.pas:end;    // SetFromDate.
Manual.pas:function TManualForm.GetFromDate: TDateTime;
Manual.pas:  Result := edtFrom.Date;
Manual.pas:end;    // GetFromDate.
Manual.pas:// When a ServiceType is selected, the options available to select from
Manual.pas:    qManualService.SQL.Add('FROM tServiceType');
Manual.pas:// Called from Main when establishing this Form.
Manual.pas:    sTemp := 'ServiceID,GSTFlag,AmountExGST,GSTAmount,AmountIncGST,FromDate,ToDate';
Manual.pas:    if (Copy(Trim(edtFrom.Text),1,1) = '/') then
Manual.pas:      sTemp := sTemp + ''''+ FormattedDateString(edtFrom.Date) +''',';
Manual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:  sFromDate : string;
MultiManual.pas:    SQL.Add('if exists (select * from dbo.sysobjects '+
MultiManual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:    SQL.Add('FROM tBatch');
MultiManual.pas:      sFromDate := FormattedDateString(FieldByName('BatchStartDate').AsDateTime);
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Rent AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Call AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Other AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    // FromDate.
MultiManual.pas:    SQL.Add('UPDATE tMultiManualData');
MultiManual.pas:    SQL.Add('SET FromDate = NULL');
MultiManual.pas:    SQL.Add('AND FromDate IS NOT NULL');
MultiManual.pas:    SQL.Add('AND DATALENGTH(FromDate) <> 10');
MultiManual.pas:    SQL.Add('UPDATE tMultiManualData');
OptusFixed.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
OptusFixed.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusFixed.pas:    SQL.Add('FROM tSupplier');
OptusFixed.pas:      SQL.Add('FROM tSupplierServiceCode');
OptusFixed.pas:// Data handled is for calls made from Optus fixed phones (PABX).
OptusFixed.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
OptusFixed.pas:  ReadString: string;                  // Read in from the text file.
OptusFixed.pas:            //        for local calls + gst, so omitted from processing (RJC).
OptusFixed.pas:            // Reinstated, but Calls omitted from processing-RJC20060218.
OptusFixed.pas:            // Calls omitted from processing.
OptusFixed.pas:            // Update and execute the query.
OptusFixed.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
OptusFixed.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusFixed.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
OptusMobile.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobile.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusMobile.pas:  sCallFrom : string;
OptusMobile.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobile.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobile.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobile.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
OptusMobile.pas:  ReadString: string;                  // Read in from the text file.
OptusMobile.pas://  sRentFrom : string;
OptusMobile.pas://  sCallFrom : string;    // Use global variable instead => update all values.
OptusMobile.pas:  sMonthFrom: string;
OptusMobile.pas:  sYearFrom : string;
OptusMobile.pas://  sRentFrom := '';
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:  sMonthFrom := '';
OptusMobile.pas:  sYearFrom := '';
OptusMobile.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobile.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                  sListValues := sListValues + sCallFrom;
OptusMobile.pas:                sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobile.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobile.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobile.pas://              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
OptusMobile.pas:            // Update and execute the query.
OptusMobile.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
OptusMobile.pas:  sFromDate : string;
OptusMobile.pas:    SQL.Add('  Sum(AmountIncGST) AS AmtActualSpend, FromDate,');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('GROUP BY FromDate, ToDate, TransactionTypeID,');
OptusMobile.pas:  sFromDate := qMinSpend.FieldByName('FromDate').AsString;
OptusMobile.pas:      SQL.Add('FROM');
OptusMobile.pas:      SQL.Add('  FROM tDataCollection');
OptusMobile.pas:        sListFields := sListFields + 'FromDate,';
OptusMobile.pas:        sListValues := sListValues + sFromDate +',';
OptusMobile.pas:        // Update and execute the query.
OptusMobile.pas:          // Update and execute the query.
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobile.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('UPDATE tDataCollection');
OptusMobile.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobile.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobile.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobile.pas:    SQL.Add('UPDATE tDataCollection');
OptusMobile.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobile.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
OptusMobileData.pas:// 131105-RJC Copy from OptusMobile to OptusMobileData.
OptusMobileData.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobileData.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobileData.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobileData.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobileData.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
OptusMobileData.pas:  ReadString: string;                  // Read in from the text file.
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sMonthFrom: string;
OptusMobileData.pas:  sYearFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:  sMonthFrom := '';
OptusMobileData.pas:  sYearFrom := '';
OptusMobileData.pas:              // 'DV' included but must omit ' AGG' from rental a/c duplicates.
OptusMobileData.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobileData.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                  // If removed 'DV' from calls then use this condition:
OptusMobileData.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                  sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobileData.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobileData.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobileData.pas:            // Update and execute the query.
OptusMobileData.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('UPDATE tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM (');
OptusMobileData.pas:      SQL.Add('  FROM (');
OptusMobileData.pas:      SQL.Add('    FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobileData.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:    SQL.Add('UPDATE tDataCollection');
OptusMobileData.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobileData.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobileData.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobileData.pas:    SQL.Add('UPDATE tDataCollection');
OptusMobileData.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobileData.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Quetzal.pas:    RentFrom : TDateTime;
Quetzal.pas:    CallFrom : TDateTime;
Quetzal.pas:    qryDC.SQL.Add('FROM tDataCollection');
Quetzal.pas:qryDC.SQL.Add('SELECT ParmText FROM tParameter');
Quetzal.pas:        qryDC.SQL.Add('DELETE FROM tDataCollection');
Quetzal.pas:// Shipto changed from MEG to MEF a/c RLD 080620 (Mainco billing change).RJC.
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE Assign');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE');
Quetzal.pas:  qryStringList.Append('FROM ((SELECT Name2.*, Client.Ref3 AS Owner');
Quetzal.pas:  qryStringList.Append('FROM (SELECT Call.ClientCode, Call.CallNumber, '+
Quetzal.pas:  qryStringList.Append('FROM (SELECT CONVERT(Char(10),Call.LogDatTim,103) '+
Quetzal.pas:  qryStringList.Append('FROM Call');
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Logon '+
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Configuration '+
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      // Update and execute the query.
Quetzal.pas:      // Now update the charged rates.
Quetzal.pas:      qryStringList.Add('UPDATE tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      // Now update the values stored in the tBatch table.
Quetzal.pas:      qryStringList.Add('UPDATE tBatch');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:    Add('FROM call');
Quetzal.pas:// Added Radio Services a/c RLD-transition in name from Dynon - RJC:110108.
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate ;
Quetzal.pas:      // Update and execute the query.
Quetzal.pas:      // Now update the values stored in the tBatch table.
Quetzal.pas:      qryStringList.Add('UPDATE tBatch');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Add('FROM Call');
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      // Update and execute the query.
Quetzal.pas:      qryStringList.Add('UPDATE tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      // Now update the values stored in the tBatch table.
Quetzal.pas:      qryStringList.Add('UPDATE tBatch');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:// 121008: TransactionType name check generalised from (6,50) to (nPos,50).
QuoteSystem.pas:    RentFrom : TDateTime;
QuoteSystem.pas:    CallFrom : TDateTime;
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:    Add('FROM BillPurchasing');
QuoteSystem.pas:    SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      // Update and execute the query.
QuoteSystem.pas:      // Now update the values stored in the tBatch table.
QuoteSystem.pas:      qryStringList.Add('UPDATE tBatch');
QuoteSystem.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:      qryStringList.Add('FROM tDataCollection');
QuoteSystem.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:  qryStringList.Add('FROM BillJobs');
QuoteSystem.pas:  qryLook.SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      // Update and execute the query.
QuoteSystem.pas:      // Now update the values stored in the tBatch table.
QuoteSystem.pas:        Add('UPDATE tBatch');
QuoteSystem.pas:        Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:        Add('FROM tDataCollection');
QuoteSystem.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
ReleaseTransactions.pas:  qryStringList.Add(' FromDate, ToDate, CustomerID, CustomerCentreID, '+
ReleaseTransactions.pas:  qryStringList.Add(' tTransaction.FromDate, tTransaction.ToDate, '+
ReleaseTransactions.pas:  qryStringList.Add('FROM ((tTransaction');
ReleaseTransactions.pas:    // Remove transactions from the tTransaction table.
ReleaseTransactions.pas:      UpdateBatchStatus(nBatchID, MainForm.BATCH_STATUS_RELEASED);
ReleaseTransactions.pas:        SQL.Add('UPDATE tBatch');
ReleaseTransactions.pas:      UpdateBatchStatus(nBatchID, MainForm.BATCH_STATUS_PAYEXP);
SaveToTransaction.pas:  qAns.SQL.Add('FROM tTransactionType');
SaveToTransaction.pas:  if not VarIsNull(qryDC['FromDate']) then begin
SaveToTransaction.pas:    sListFields := sListFields+ 'FromDate,';
SaveToTransaction.pas:      Trim(qryDC.FieldByName('FromDate').AsString) +''',';
SaveToTransaction.pas:  end;  // FromDate.
SaveToTransaction.pas:  // ElementID is recorded last in this SQL - read from tTransactionType.
SaveToTransaction.pas:  // Must gather the data from the tDataCollection table - it is best to
SaveToTransaction.pas:  // Update the references first to speed it up.
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM ((SELECT tDataCollection.*, tServiceID.ID AS SID,');
SaveToTransaction.pas:    SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:      SQL.Add('FROM (SELECT DC.SID, DC.ServiceID, Sum(RentPercentage) AS "Rent",'+
SaveToTransaction.pas:      SQL.Add('FROM ((SELECT DISTINCT tDataCollection.ServiceID,'+
SaveToTransaction.pas:      SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:        'TxnDate, AmountExGST, GSTAmount, AmountIncGST, FromDate, ToDate,');
SaveToTransaction.pas:      Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');
SaveToTransaction.pas:      Add('FROM (((((SELECT DC1.*');
SaveToTransaction.pas:      Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:      Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:      Add('FROM ((tDataCollection');
SaveToTransaction.pas:        Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');             // 4.
SaveToTransaction.pas:        Add('FROM ((((((((SELECT DC1.*');                                 // 15.
SaveToTransaction.pas:        Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:        Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:        Add('FROM ((tDataCollection');                                    // 20.
SaveToTransaction.pas:          nMaxBlock := 100;        // Update the screen every 100 records.
SaveToTransaction.pas:          nMaxBlock := 10;         // Update the screen every 10 records.
SaveToTransaction.pas:          nMaxBlock := 1;          // Update the screen every record.
SaveToTransaction.pas:        // Create the query that will update the tTransaction table.
SaveToTransaction.pas:            // Update the display of the current service being processed.
SaveToTransaction.pas:              SQL.Add('SELECT * FROM tServiceSplit');
SaveToTransaction.pas:              // Update and execute the query.
SaveToTransaction.pas:      // Update the current rent & calls in the tServiceID table.
SaveToTransaction.pas:      UpdateCurrentRentCalls(nBatch);
SaveToTransaction.pas:      // Remove transactions from the tDataCollection table.
SaveToTransaction.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_TRANSNS);
SaveToTransaction.pas:      // Remove transactions from the tTransaction table.
SaveToTransaction.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_CPASS);
Security.pas:    FromDate   : string[8];
Security.pas:  sFromDate : string;
Security.pas:  sFromDate := FormattedDateString(dStartDate);
Security.pas:  qryDC.SQL.Add('FROM tTransactionType');
Security.pas:  qryDC.SQL.Add('FROM tSystem');
Security.pas:  qryStringList.Add('FROM (tServiceID');
Security.pas:FROM (tServiceID
Security.pas:      sListFields := sListFields + 'FromDate,';
Security.pas:      sListValues := sListValues +''''+ sFromDate +''',';
Security.pas:      // Update and execute the query.
Security.pas:      qryStringList.Add('UPDATE tDataCollection');
Security.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Security.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Security.pas:      qryStringList.Add('FROM (tDataCollection');
Security.pas:      // Now update the values stored in the tBatch table.
Security.pas:      qryStringList.Add('UPDATE tBatch');
Security.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Security.pas:      qryStringList.Add('FROM tDataCollection');
Security.pas:      UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
Security.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Services.pas:    FromDate   : string[8];
Services.pas:  qUpdate : TQuery;
Services.pas:procedure UpdateRate(const sServiceTypeID, sCustomerID: string; const fRate: real);
Services.pas:  with qUpdate do begin
Services.pas:    SQL.Add('UPDATE tDiscountedRate');
Services.pas:end;  // UpdateRate.
Services.pas:  qUpdate := TQuery.Create(MainForm);
Services.pas:  qUpdate.DatabaseName := 'dbPPdata';
Services.pas:    SQL.Add('FROM (SELECT ST0.*,');
Services.pas:    SQL.Add('FROM (SELECT ST.ServiceTypeID, ST.CustomerID, ST.Rate, '+
Services.pas:    SQL.Add('FROM (SELECT SID.*, SI.ServiceID, SI.ServiceTypeID, '+
Services.pas:    SQL.Add('FROM ( SELECT SI0.ID, SI1.Rate,');
Services.pas:    SQL.Add(' FROM (SELECT SC1.ID, tDiscountedRate.Rate');
Services.pas:    SQL.Add('  FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    SQL.Add('  FROM tServiceID');
Services.pas:        UpdateRate(sServiceTypeID, sCustomerID, fRate);
Services.pas:  sFromDate : string;
Services.pas:  sFromDate := FormattedDateString(dStartDate);
Services.pas:  qryServices.SQL.Add('FROM tTransactionType');     // Service Records Invoice.
Services.pas:  qryServices.SQL.Add('FROM tStatus');
Services.pas:  qryServices.SQL.Add('FROM tCustomer');
Services.pas:  qryServices.SQL.Add('FROM tSystem');
Services.pas:    Add(' RateDescription, BatchID, FromDate, ToDate, TransactionTypeID,');
Services.pas:    Add('FROM (SELECT CID2.*, CAST((CID2.AmountExGST + CID2.GSTAmount) AS money) '+
Services.pas:    Add('FROM (SELECT CID1.*, CAST((CASE WHEN CID1.GSTFlag LIKE ''Y'' '+
Services.pas:    Add('FROM (SELECT (tCustomer.ShipTo + '' Services Pre July 1999'') '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM tCustomer');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID)');
Services.pas:        'FromDate, ToDate, TransactionTypeID');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas://    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID, '+
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    // Update the status of the batch.
Services.pas:    UpdateBatchStatus(nBatchNumber, MainForm.BATCH_STATUS_IMPORT);
Services.pas:  qryStringList.Add('UPDATE tServiceID');
Services.pas:  qryStringList.Add('FROM (SELECT SI0.ID, Max(tRate.Cost) AS "CostAmt", '+
Services.pas:  qryStringList.Add('FROM tServiceID AS SI0');
Services.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Telmax.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
Telmax.pas:  qryTelmax.SQL.Add('FROM tSupplier');
Telmax.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
Telmax.pas:      qry.SQL.Add('FROM tCustomer');
Telmax.pas:      qryRef.SQL.Add('FROM tServiceType');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
Telmax.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:          // Update and execute the query.
Telmax.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Telmax.pas:        qryStringList.Add('UPDATE tDataCollection');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM (tDataCollection');
Telmax.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := FormattedDateString(dStartDate);
Telmax.pas:    qryDC.SQL.Add('FROM tTransactionType');
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:          // Update and execute the query.
Telmax.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Telmax.pas:        // Now update the values stored in the tDataCollection table with
Telmax.pas:        qryStringList.Add('UPDATE tDataCollection');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC3.*, '+
Telmax.pas:        qryStringList.Add('FROM (SELECT DC2.ID, DC2.AmountExGST,');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC1.ID, (Max(tRate.Cost)/12) AS "AmountExGST"');
Telmax.pas:        qryStringList.Add('FROM ((SELECT DC0.ID, DC0.ServiceID, (CASE');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM tDataCollection');
Telmax.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:            // Update and execute the query.
Telmax.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Telmax.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:            // Update and execute the query.
Telmax.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Telmax.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:          // Update and execute the query.
Telmax.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        // Now update the values stored in the tBatch table.
Telmax.pas:        slCust.Add('UPDATE tBatch');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Telmax.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:  fGSTRate : Real;                    // GST Rate for Calcs-read from MainForm.
TelmaxUniComms.pas:    SQL.Add('FROM tTransactionGroup');
TelmaxUniComms.pas:    SQL.Add('FROM tSystem');
TelmaxUniComms.pas:    SQL.Add('FROM tSupplier');
TelmaxUniComms.pas:      qryTelmax.SQL.Add('FROM tTransactionType');
TelmaxUniComms.pas:      SQL.Add('FROM (');
TelmaxUniComms.pas:      SQL.Add('  FROM (');
TelmaxUniComms.pas:      SQL.Add('    FROM tRate');
TelmaxUniComms.pas:    // Line 4 updated in the Rent prog loop for each TEC & SFC.
TelmaxUniComms.pas:      SQL.Add('FROM   tSupplierServiceCode');                              // 1.
TelmaxUniComms.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tCustomer');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');                                   // 1.
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:      qryRef.SQL.Add('FROM tServiceType');
TelmaxUniComms.pas:        qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:  // Update slCust - defined in UniCommsInvoice().
TelmaxUniComms.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
TelmaxUniComms.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:          sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:          // Update and execute the query.
TelmaxUniComms.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
TelmaxUniComms.pas:        qryStringList.Add('UPDATE tDataCollection');
TelmaxUniComms.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
TelmaxUniComms.pas:        qryStringList.Add('FROM (tDataCollection');
TelmaxUniComms.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := FormattedDateString(dStartDate);
TelmaxUniComms.pas:  // Line 3 updated in prog loop when ServiceID (ServiceType) updated,
TelmaxUniComms.pas:  // Line 4 updated in prog loop for each TEC & SFC.
TelmaxUniComms.pas:    SQL.Add('FROM   tRate');                                          // 1.
TelmaxUniComms.pas:            // Update the SQL statement for TEC & SFC.
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:          // Update and execute the query.
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          // Update and execute the query.
TelmaxUniComms.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
TelmaxUniComms.pas:        // Now update the values stored in the tDataCollection table with
TelmaxUniComms.pas:        // Done. Values updated from the tRates table for TEC & SFC values.
TelmaxUniComms.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:            sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:            // Update and execute the query.
TelmaxUniComms.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
TelmaxUniComms.pas:      DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:      slCust.Add('FROM tServiceID');                                       // 1.
TelmaxUniComms.pas:        // Now update the values stored in the tBatch table.
TelmaxUniComms.pas:        slCust.Add('UPDATE tBatch');
TelmaxUniComms.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
TelmaxUniComms.pas:        slCust.Add('FROM tDataCollection');
TelmaxUniComms.pas:        UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelmaxUniComms.pas:        slCust.Clear;   // When empty, all entries deleted from tDataCollection.
TelmaxUniComms.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelstraFixed.pas:            GetPhoneAccountBills - Added reading code from input, not default.
TelstraFixed.pas:    RentFrom : TDateTime;
TelstraFixed.pas:    CallFrom : TDateTime;
TelstraFixed.pas:    FromDate        : string[8];
TelstraFixed.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraFixed.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixed.pas://  qryDCUpdate : TQuery;
TelstraFixed.pas:    Add('FromDate');
TelstraFixed.pas:    SQL.Add('FROM tDataCollection');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDCUpdate := TQuery.Create(MainForm);
TelstraFixed.pas:  qryDCUpdate.DatabaseName := 'dbPPdata';
TelstraFixed.pas:  with qryDCUpdate do begin
TelstraFixed.pas:    SQL.Add('UPDATE tDataCollect_Temp');
TelstraFixed.pas:  end;  // qryDCUpdate.
TelstraFixed.pas:    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixed.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixed.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixed.pas:FROM tDataCollect_Temp
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixed.pas:          // Update the number of calls saved in the tDataCollection table.
TelstraFixed.pas:        qryDCUpdate.SQL.Strings[2] := 'WHERE ServiceID LIKE '''+
TelstraFixed.pas:        qryDCUpdate.SQL.Strings[3] := 'AND CallCode LIKE '''+
TelstraFixed.pas:        qryDCUpdate.SQL.Strings[4] := 'AND NumCalls = '+IntToStr(nSummaryCalls);
TelstraFixed.pas:        qryDCUpdate.ExecSQL;
TelstraFixed.pas://  qryDCUpdate.Close;
TelstraFixed.pas:  with qryDCUpdate do begin
TelstraFixed.pas:    SQL.Add(' FromDate, ');
TelstraFixed.pas:    SQL.Add('   FromDate, ');
TelstraFixed.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixed.pas:  end;  // qryDCUpdate.
TelstraFixed.pas://  qryDCUpdate.Free;
TelstraFixed.pas:  qryDS.SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixed.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixed.pas:              // Update and execute the query.
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              // Update and execute the query.
TelstraFixed.pas:              SubString := ConvertString.Strings[DESC16_C]; // DateFrom.
TelstraFixed.pas:                if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixed.pas:                  RentFrom := dStartBillingPeriod;
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              // Update and execute the query.
TelstraFixed.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              // Update and execute the query.
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                // Update and execute the query.
TelstraFixed.pas:                SubString := ConvertString.Strings[DESC12_C]; // DateFrom.
TelstraFixed.pas:                if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixed.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  if (Length(DBfromDate) = 0) then
TelstraFixed.pas:                    DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                else if (Length(DBfromDate) > 0) then begin
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  sListValues := sListValues + DBfromDate;
TelstraFixed.pas:                end;  // FromDate.
TelstraFixed.pas:                // Update and execute the query.
TelstraFixed.pas:          raise;         // Raise the exception to avoid call to CommitUpdates.
TelstraFixed.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixed.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixed.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraFixed.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraFixedEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedEBS.pas:    RentFrom : TDateTime;
TelstraFixedEBS.pas:    CallFrom : TDateTime;
TelstraFixedEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedEBS.pas://  qryDCUpdate : TQuery;
TelstraFixedEBS.pas:    Add('FromDate');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollection');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  qryDCUpdate := TQuery.Create(MainForm);
TelstraFixedEBS.pas:  qryDCUpdate.DatabaseName := 'dbPPdata';
TelstraFixedEBS.pas:  with qryDCUpdate do begin
TelstraFixedEBS.pas:    SQL.Add('UPDATE tDataCollect_Temp');
TelstraFixedEBS.pas:  end;  // qryDCUpdate.
TelstraFixedEBS.pas://    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixedEBS.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixedEBS.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixedEBS.pas:FROM tDataCollect_Temp
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixedEBS.pas:          // Update the number of calls saved in the tDataCollection table.
TelstraFixedEBS.pas:        qryDCUpdate.SQL.Strings[2] := 'WHERE ServiceID LIKE '''+
TelstraFixedEBS.pas:        qryDCUpdate.SQL.Strings[3] := 'AND CallCode LIKE '''+
TelstraFixedEBS.pas:        qryDCUpdate.SQL.Strings[4] := 'AND NumCalls = '+IntToStr(nSummaryCalls);
TelstraFixedEBS.pas:        qryDCUpdate.ExecSQL;
TelstraFixedEBS.pas:    // Update the user's screen.
TelstraFixedEBS.pas://  qryDCUpdate.Close;
TelstraFixedEBS.pas:  with qryDCUpdate do begin
TelstraFixedEBS.pas:    SQL.Add(' FromDate, ');
TelstraFixedEBS.pas:    SQL.Add('   FromDate, ');
TelstraFixedEBS.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  end;  // qryDCUpdate.
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas://  qryDCUpdate.Free;
TelstraFixedEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedEBS.pas:              // Update and execute the query.
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              // Update and execute the query.
TelstraFixedEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:            // Update and execute the query.
TelstraFixedEBS.pas:            // Update and execute the query.
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              // Update and execute the query.
TelstraFixedEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedEBS.pas:              end;  // FromDate.
TelstraFixedEBS.pas:              // Update and execute the query.
TelstraFixedEBS.pas:        raise;         // Raise the exception to avoid call to CommitUpdates.
TelstraFixedEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedEBS.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraFixedOrigEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedOrigEBS.pas:    RentFrom : TDateTime;
TelstraFixedOrigEBS.pas:    CallFrom : TDateTime;
TelstraFixedOrigEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedOrigEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedOrigEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedOrigEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedOrigEBS.pas:              // Update and execute the query.
TelstraFixedOrigEBS.pas:                // entry is provided.   (Copied from following else-if section.)
TelstraFixedOrigEBS.pas:              end;  // if LastEntryIs_1. (Copied from section immed. following.)
TelstraFixedOrigEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedOrigEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:            // Update and execute the query.
TelstraFixedOrigEBS.pas:            // Update and execute the query.
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              // Update and execute the query.
TelstraFixedOrigEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedOrigEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedOrigEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedOrigEBS.pas:              end;  // FromDate.
TelstraFixedOrigEBS.pas:              // Update and execute the query.
TelstraFixedOrigEBS.pas:        raise;         // Raise the exception to avoid call to CommitUpdates.
TelstraFixedOrigEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedOrigEBS.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraFunctions.pas:  qryDCUpdate : TQuery;
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:  qryDCUpdate := TQuery.Create(MainForm);
TelstraFunctions.pas:  qryDCUpdate.DatabaseName := 'dbPPdata';
TelstraFunctions.pas:  with qryDCUpdate do begin
TelstraFunctions.pas:    SQL.Add('UPDATE tDataCollect_Temp');          // 0.
TelstraFunctions.pas:  end;  // qryDCUpdate.
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:          qryDCUpdate.SQL.Strings[2] := 'WHERE ID ='+
TelstraFunctions.pas:          qryDCUpdate.ExecSQL;
TelstraFunctions.pas:          qryDCUpdate.SQL.Strings[2] := 'WHERE ID ='+
TelstraFunctions.pas:          qryDCUpdate.ExecSQL;
TelstraFunctions.pas:              qryDCUpdate.SQL.Strings[2] := 'WHERE ID ='+
TelstraFunctions.pas:              qryDCUpdate.ExecSQL;
TelstraFunctions.pas:            qryDCUpdate.SQL.Strings[2] := 'WHERE ID ='+
TelstraFunctions.pas:            qryDCUpdate.ExecSQL;
TelstraFunctions.pas:    // Update the user's screen.
TelstraFunctions.pas:  qryDCUpdate.Close;
TelstraFunctions.pas:  with qryDCUpdate do begin
TelstraFunctions.pas:    SQL.Add(' FromDate, ');
TelstraFunctions.pas:    SQL.Add('   FromDate, ');
TelstraFunctions.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFunctions.pas:  end;  // qryDCUpdate.
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:  qryDCUpdate.Free;
TelstraFunctions.pas:  sFromDate : string;
TelstraFunctions.pas:    Add('FROM tCustomer');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('FROM tServiceType');
TelstraFunctions.pas:    Add('FROM tTransactionType');
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Try to get the dates from the tDataCollection table.
TelstraFunctions.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraFunctions.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraFunctions.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraFunctions.pas:    // Read the dates from the tBatch table.
TelstraFunctions.pas:      Add('FROM tBatch');
TelstraFunctions.pas:      sFromDate := 'NULL';
TelstraFunctions.pas:      sFromDate := ''''+
TelstraFunctions.pas:  end;  // FromDate or EndDate unknown.
TelstraFunctions.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraFunctions.pas:      Add('FROM tParameter');
TelstraFunctions.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:        Add(sFromDate);
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tRate');
TelstraFunctions.pas:          Add(' FROM tRate');
TelstraFunctions.pas:            Add('FROM tParameter');
TelstraFunctions.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:              Add(sFromDate);
TelstraFunctions.pas:        Add('UPDATE tDataCollection');
TelstraFunctions.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraFunctions.pas:        Add('FROM tDataCollection');
TelstraFunctions.pas:        Add('UPDATE tDataCollection');
TelstraFunctions.pas:      // Update the values stored in the tBatch table.
TelstraFunctions.pas:        Add('UPDATE tBatch');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:      Add('FROM tTransactionType');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tRate');
TelstraFunctions.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:      Add(sFromDate+' AS "FromDate",');
TelstraFunctions.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.*');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:          Add('FROM tParameter');
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tDataCollection');
TelstraFunctions.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:          Add(sFromDate+',');
TelstraFunctions.pas:      Add('UPDATE tDataCollection');
TelstraFunctions.pas:    // Update the values stored in the tBatch table.
TelstraFunctions.pas:      Add('UPDATE tBatch');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    // The usage for each ServiceID is calculated and the transactions updated.
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraFunctions.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraFunctions.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraFunctions.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    // Read a value to include in the update of the tBatch table.
TelstraFunctions.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('UPDATE tDataCollection');
TelstraFunctions.pas:    // Update some more of the values stored in the tBatch table.
TelstraFunctions.pas:      Add('UPDATE tBatch');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraMobile.pas:    RentFrom : TDateTime;
TelstraMobile.pas:    CallFrom : TDateTime;
TelstraMobile.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobile.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobile.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobile.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobile.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobile.pas:              // Update and execute the query.
TelstraMobile.pas:          raise;            // Raise the exception to avoid call to CommitUpdates.
TelstraMobile.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobile.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobile.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraMobile.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraMobileData.pas:    RentFrom : TDateTime;
TelstraMobileData.pas:    CallFrom : TDateTime;
TelstraMobileData.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobileData.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobileData.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileData.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                  DBfromDate :=
TelstraMobileData.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:              // Update and execute the query.
TelstraMobileData.pas:          end;  // not empty string read from the input file.
TelstraMobileData.pas:        raise;            // Raise the exception to avoid call to CommitUpdates.
TelstraMobileData.pas:  sFromDate : string;
TelstraMobileData.pas:  slDC.Add('FROM tCustomer');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('FROM tServiceType');
TelstraMobileData.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileData.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileData.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileData.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileData.pas:    // Read the dates from the tBatch table.
TelstraMobileData.pas:    slDC.Add('FROM tBatch');
TelstraMobileData.pas:      sFromDate := 'NULL';
TelstraMobileData.pas:      sFromDate := ''''+
TelstraMobileData.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileData.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileData.pas:    slDC.Add('FROM tParameter');
TelstraMobileData.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileData.pas:      slDC.Add(sFromDate);
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('FROM tRate');
TelstraMobileData.pas:        slDC.Add(' FROM tRate');
TelstraMobileData.pas:          slDC.Add('FROM tParameter');
TelstraMobileData.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:            slDC.Add(sFromDate);
TelstraMobileData.pas:      slDC.Add('UPDATE tDataCollection');
TelstraMobileData.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileData.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:      slDC.Add('UPDATE tDataCollection');
TelstraMobileData.pas:      // Update the values stored in the tBatch table.
TelstraMobileData.pas:      slDC.Add('UPDATE tBatch');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileData.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM tRate');
TelstraMobileData.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:        slDC.Add('FROM tParameter');
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:        slDC.Add(sFromDate+',');
TelstraMobileData.pas:    slDC.Add('UPDATE tDataCollection');
TelstraMobileData.pas:    // Update the values stored in the tBatch table.
TelstraMobileData.pas:    slDC.Add('UPDATE tBatch');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    // The usage for each ServiceID is calculated and the transactions updated.
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    // Read a value to include in the update of the tBatch table.
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('UPDATE tDataCollection');
TelstraMobileData.pas:    // Update some more of the values stored in the tBatch table.
TelstraMobileData.pas:    slDC.Add('UPDATE tBatch');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    SQL.Add('FROM tSupplier');
TelstraMobileData.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileData.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileData.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileData.pas:      if not LumpedCosts then UpdateBatchTotals(nBatch);
TelstraMobileData.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraMobileData.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                DBfromDate :=
TelstraMobileDataEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:            // Update and execute the query.
TelstraMobileDataEBS.pas:        raise;            // Raise the exception to avoid call to CommitUpdates.
TelstraMobileDataEBS.pas:  sFromDate : string;
TelstraMobileDataEBS.pas:    Add('FROM tCustomer');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('FROM tServiceType');
TelstraMobileDataEBS.pas:    Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataEBS.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataEBS.pas:      Add('FROM tBatch');
TelstraMobileDataEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataEBS.pas:      sFromDate := ''''+
TelstraMobileDataEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataEBS.pas:      Add('FROM tParameter');
TelstraMobileDataEBS.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:        Add(sFromDate);
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tRate');
TelstraMobileDataEBS.pas:          Add(' FROM tRate');
TelstraMobileDataEBS.pas:            Add('FROM tParameter');
TelstraMobileDataEBS.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:              Add(sFromDate);
TelstraMobileDataEBS.pas:        Add('UPDATE tDataCollection');
TelstraMobileDataEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataEBS.pas:        Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:        Add('UPDATE tDataCollection');
TelstraMobileDataEBS.pas:      // Update the values stored in the tBatch table.
TelstraMobileDataEBS.pas:        Add('UPDATE tBatch');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:      Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tRate');
TelstraMobileDataEBS.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:      Add(sFromDate+' AS "FromDate",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.*');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:          Add('FROM tParameter');
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:          Add(sFromDate+',');
TelstraMobileDataEBS.pas:      Add('UPDATE tDataCollection');
TelstraMobileDataEBS.pas:    // Update the values stored in the tBatch table.
TelstraMobileDataEBS.pas:      Add('UPDATE tBatch');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    // The usage for each ServiceID is calculated and the transactions updated.
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    // Read a value to include in the update of the tBatch table.
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('UPDATE tDataCollection');
TelstraMobileDataEBS.pas:    // Update some more of the values stored in the tBatch table.
TelstraMobileDataEBS.pas:      Add('UPDATE tBatch');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:      if not LumpedCosts then UpdateBatchTotals(nBatch);
TelstraMobileDataEBS.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraMobileDataEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataOldEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataOldEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataOldEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataOldEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                DBfromDate :=
TelstraMobileDataOldEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:            // Update and execute the query.
TelstraMobileDataOldEBS.pas:        raise;            // Raise the exception to avoid call to CommitUpdates.
TelstraMobileDataOldEBS.pas:  sFromDate : string;
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tCustomer');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tServiceType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataOldEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataOldEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataOldEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tBatch');
TelstraMobileDataOldEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataOldEBS.pas:      sFromDate := ''''+
TelstraMobileDataOldEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataOldEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataOldEBS.pas:      slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:        slDC.Add(' FROM tRate');
TelstraMobileDataOldEBS.pas:          slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:            slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:      slDC.Add('UPDATE tDataCollection');
TelstraMobileDataOldEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataOldEBS.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:      slDC.Add('UPDATE tDataCollection');
TelstraMobileDataOldEBS.pas:      // Update the values stored in the tBatch table.
TelstraMobileDataOldEBS.pas:      slDC.Add('UPDATE tBatch');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.*');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:        slDC.Add(sFromDate+',');
TelstraMobileDataOldEBS.pas:    slDC.Add('UPDATE tDataCollection');
TelstraMobileDataOldEBS.pas:    // Update the values stored in the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('UPDATE tBatch');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    // The usage for each ServiceID is calculated and the transactions updated.
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    // Read a value to include in the update of the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('UPDATE tDataCollection');
TelstraMobileDataOldEBS.pas:    // Update some more of the values stored in the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('UPDATE tBatch');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataOldEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:      if not LumpedCosts then UpdateBatchTotals(nBatch);
TelstraMobileDataOldEBS.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
TelstraMobileDataOldEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileEBS.pas:    RentFrom : TDateTime;
TelstraMobileEBS.pas:    CallFrom : TDateTime;
TelstraMobileEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileEBS.pas:            // Update and execute the query.
TelstraMobileEBS.pas:        raise;            // Raise the exception to avoid call to CommitUpdates.
TelstraMobileEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobileEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileEBS.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);
Vodafone.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
Vodafone.pas:  qryVodafone.SQL.Add('SELECT ParmNumber FROM tParameter');
Vodafone.pas:  qryVodafone.SQL.Add('FROM tSupplier');
Vodafone.pas:    qryVodafone.SQL.Add('FROM tSupplierServiceCode');
Vodafone.pas:// Data handled is for calls made from mobile phones.
Vodafone.pas:  PROGRESS_COUNTER_C: Integer=100;     // Update Progress every 100 records read
Vodafone.pas:  ReadString: string;                  // Read in from the text file.
Vodafone.pas:  sRentFrom : string;
Vodafone.pas:  sCallFrom : string;
Vodafone.pas:  sRentFrom := '';
Vodafone.pas:  sCallFrom := '';
Vodafone.pas:              sListFields := sListFields + 'FromDate,';
Vodafone.pas:              sListValues := sListValues + sCallFrom;
Vodafone.pas:                sListFields := sListFields + 'FromDate,';
Vodafone.pas:                // Deduct discount sum from the total charge.
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:                  // Update and execute the query.
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC2_C]) +''',';
Vodafone.pas:              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sRentFrom;
Vodafone.pas:            // Update and execute the query.
Vodafone.pas:          Progress.ProcessWinMessages(MainForm);    // Let windows update all messages.
Vodafone.pas:        // Deduct discount sum from the total charge.
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          // Update and execute the query.
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          // Update and execute the query.
Vodafone.pas:        qryDC.SQL.Add('FROM tDataCollection');
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          // Update and execute the query.
Vodafone.pas:      DeleteFromDC( nBatch, EmptyList, lContinue);
Vodafone.pas:      UpdateBatchStatus(nBatch, MainForm.BATCH_STATUS_IMPORT);


DB delete (remove)
AccessRights.pas:    q.SQL.Add('FROM tUser');
AccessRights.pas:        q.SQL.Add('FROM tUserFunction');
AdminCharges.pas:  procedure DeleteOldAdminFees;
AdminCharges.pas:procedure DeleteOldAdminFees;
AdminCharges.pas:  qryStringList.Add('DELETE FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('DELETE tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (tTransaction INNER JOIN tTransactionType '+
AdminCharges.pas:end;  //   procedure DeleteOldAdminFees();
AdminCharges.pas:  qryStringList.Add('SELECT ParmNumber FROM tParameter');
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Delete(qryStringList.Count-1);
AdminCharges.pas:  qryStringList.Add('SELECT id FROM tStatus');
AdminCharges.pas:  qryLook.SQL.Add('SELECT id, description FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tTransactionType ' +
AdminCharges.pas:  qryLook.SQL.Add('SELECT id FROM tCustomer ' +
AdminCharges.pas://  if qryTN['RentFrom'] <> Null then begin
AdminCharges.pas:  if qryTN['FromDate'] <> Null then begin
AdminCharges.pas:    sListFields := sListFields+ 'FromDate,';
AdminCharges.pas:      StandardDateString(qryTN.FieldByName('FromDate').AsDateTime) +''',';
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  end;  // FromDate.
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add(' FROM tTransaction');
AdminCharges.pas:  qryStringList.Add('FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:  qryStringList.Add('  Min(tTransaction.FromDate) AS "FromDate",');
AdminCharges.pas://    'THEN tTransaction.FromDate END) AS RENTFROM,');
AdminCharges.pas:  qryStringList.Add(' FROM (tTransaction');
AdminCharges.pas:  // Must gather the data from the tTransaction table - it is best to
AdminCharges.pas:    SQL.Add('FROM tParameter');
AdminCharges.pas:      SQL.Add('FROM tBatch');
AdminCharges.pas:    qryStringList.Add('FROM (SELECT (TN2.RENT + TN2.CALL + TN2.OTHER) AS TOTAL, TN2.*,'+
AdminCharges.pas:    qryStringList.Add('FROM ((SELECT TN1.ServiceID,' +
AdminCharges.pas:    qryStringList.Add('  Min(TN1.FromDate) AS "FromDate",');
AdminCharges.pas://      ' TN1.FromDate END) AS RENTFROM,');
AdminCharges.pas:    qryStringList.Add(' FROM (SELECT tTransaction.ServiceID, ' +
AdminCharges.pas:    qryStringList.Add('   tTransaction.FromDate, tTransaction.ToDate,');
AdminCharges.pas:    qryStringList.Add('  FROM tTransaction LEFT JOIN ');
AdminCharges.pas:      DeleteOldAdminFees;      // Calls GetAdminReferences().
AnnualCharges.pas:  sFromDate : string;
AnnualCharges.pas:  sFromDate := FormattedDateString(dStartDate);
AnnualCharges.pas:  qryDC.SQL.Add('FROM tTransactionType');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tCustomer');
AnnualCharges.pas:  qryDC.SQL.Add('FROM tSystem');
AnnualCharges.pas:    Add('FROM (SELECT tServiceID.ServiceID, tServiceID.Description, '+
AnnualCharges.pas:    Add('FROM (((tServiceID');
AnnualCharges.pas:      sListFields := sListFields + 'FromDate,';
AnnualCharges.pas:      sListValues := sListValues +''''+ sFromDate +''',';
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
AnnualCharges.pas:      qryStringList.Add('FROM ((tDataCollection');
AnnualCharges.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
AnnualCharges.pas:      qryStringList.Add('FROM tDataCollection');
AnnualCharges.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
AnnualData.pas:    SQL.Add('DELETE FROM tFaultDetails');
AnnualData.pas:    SQL.Add('FROM Call');
AnnualData.pas:      SQL.Add('FROM (SELECT tBatchType.Description');
AnnualData.pas:      SQL.Add('FROM tBatchType');
AnnualData.pas:    SQL.Add('FROM tFaultDetails');
AnnualData.pas:          'from Quetzal?', mtConfirmation, [mbYes, mbNo], 0) = mrYes) then begin
AnnualData.pas://      SQL.Add('FROM (SELECT DC.ID, CAST(fd.Availability AS varchar) AS Var02');
AnnualData.pas://      SQL.Add('	FROM tFaultDetails fd');
AnnualData.pas:      SQL.Add('FROM (SELECT TmpDC.ID, TmpDC.Var02');
AnnualData.pas:      SQL.Add('	FROM (SELECT TOP 10000 DC.ID, CAST(fd.Availability AS varchar) AS Var02, '+
AnnualData.pas:      SQL.Add('  FROM tDataCollection dc');
AnnualData.pas:      SQL.Add('	FROM tDataCollection dc');
AnnualData.pas:      SQL.Add(' FromDate, ToDate, BatchID, Var01, Var02)');
AnnualData.pas:      SQL.Add(' DC.FromDate, DC.ToDate, DC.BatchID,');
AnnualData.pas:      SQL.Add('FROM tDataCollection DC');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) '+
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT COUNT(*) AS "InvoiceNo"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
AnnualData.pas:      SQL.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "TotalCredits"');
AnnualData.pas:      SQL.Add('FROM tDataCollection');
CodeFile.pas:  qryString.Add('FROM ((((((((((SELECT TXN.ServiceID, TXN.ServiceTypeID, '+
CodeFile.pas:  qryString.Add('FROM ('+TransactionTable+' TXN');
CodeFile.pas:      SQL.Add('FROM tBatch');
CodeFile.pas:          SQL.Add('SELECT ParmText FROM tParameter');
CodeFile.pas:          SQL.Add('FROM tTransaction');
CodeFile.pas:              SQL.Add('SELECT ParmText FROM tParameter');
CriticalTests.pas:  // Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('SELECT * FROM tCriticalCheck');
CriticalTests.pas:    qryStringList.Add('FROM tCriticalCheck');
CriticalTests.pas:// Flush the results from all previous Critical Tests.
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryDC.SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    SQL.Add('SELECT SupplierAccountID FROM tBatch');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:      qryStringList.Add('FROM (SELECT tServiceID.ServiceID, '+
CriticalTests.pas:      qryStringList.Add(' FROM tServiceID');
CriticalTests.pas:      qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:          ' Services Omitted From The Invoice');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:  qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.NoCalls');
CriticalTests.pas:    qryStringList.Add(' FROM (SELECT DC.ServiceID, DC.Call, ''Code'' = CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add('  FROM (tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, ');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatch');
CriticalTests.pas:  qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (((SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection LEFT JOIN tServiceID');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:  qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:  qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID, tServiceID.ID AS SID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT ServiceID,');
CriticalTests.pas:  qryStringList.Add('FROM tServiceSplit');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC2.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC1.*, tServiceType.ID, '+
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tServiceID.ID AS SID, DC.ServiceID, (CASE');
CriticalTests.pas:    qryStringList.Add('FROM ((SELECT tDataCollection.ServiceID, '+
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:  qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT DC.ServiceID');
CriticalTests.pas:    qryStringList.Add('FROM (SELECT tDataCollection.ServiceID');
CriticalTests.pas:    qryStringList.Add(' FROM tDataCollection');
CriticalTests.pas:  qryStringList.Add('FROM tBatchType INNER JOIN tBatch');
CurrentRentCalls.pas:// Called when tTransaction transactions are created from tDataCollection data.
CurrentRentCalls.pas:    Add(' FROM tTransaction');
CurrentRentCalls.pas:    Add('FROM (SELECT tTransaction.ServiceID, tTransaction.ServiceTypeID,');
CurrentRentCalls.pas:    Add('FROM ((tTransaction');
DateFunctions.pas:{ Some general functions first to simplify the transition from dBase to Delphi4.}
DateFunctions.pas:// Retrieve the month name from the stringlist slMonth,
DateFunctions.pas:// Retrieve the month number from the stringlist slMonth,
DubiousTests.pas:    Add('SELECT * FROM tDubiousResult');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (SELECT tTransaction.ServiceID, '+
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM ((SELECT tTransaction.ServiceID, ' +
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('FROM tBatch');
DubiousTests.pas:    SQL.Add('FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN3.ServiceID, TN3.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN2.ServiceID, TN2.CustomerID, '+
DubiousTests.pas:    Add('FROM (SELECT TN1.*,');
DubiousTests.pas:    Add('FROM (SELECT ServiceID, CustomerID, Count(*) AS "NumCalls",');
DubiousTests.pas:    Add('FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    SQL.Add('SELECT ParmNumber FROM tParameter');
DubiousTests.pas:    Add('FROM (SELECT TN.ServiceID, TN.CustomerID,'+
DubiousTests.pas:    Add('FROM (SELECT DISTINCT tTransaction.ServiceID, '+
DubiousTests.pas:    Add(' FROM tTransaction');
DubiousTests.pas:    SQL.Add('SELECT ID FROM tDubiousType');
DubiousTests.pas:    Add('FROM (tTransaction');
DubiousTests.pas:    Add('AND tCostRange.CostRangeFrom IS NOT NULL');
DubiousTests.pas:    Add('AND (tTransaction.AmountIncGST < tCostRange.CostRangeFrom');
DubiousTests.pas:    SQL.Add('DELETE');
DubiousTests.pas:    SQL.Add('FROM tDubiousResult');
DubiousTests.pas:    Add('FROM tBatchType INNER JOIN tBatch');
FileFunctions.pas: Reads a delimited string from FName and saves each line into a single
FileFunctions.pas:  ReadString: string;                  // Read in from the text file.
Filter.pas:    edtFromDate: TDateEdit;
Filter.pas:    lblFromDate: TLabel;
Filter.pas:  slQuery1.Add('FROM (SELECT FT1.*, tCustomer.ShipTo, tServiceID.ServiceID, '+
Filter.pas:  slQuery1.Add('FROM (SELECT tFinalisedTransaction.ServiceID AS "SID", '+
Filter.pas:  slQuery1.Add('FROM tFinalisedTransaction');                              // 8.
Filter.pas:  lblFromDate.Enabled := cbDate.Checked;
Filter.pas:  edtFromDate.Enabled := cbDate.Checked;
Filter.pas:  if cbDate.Checked then edtFromDate.SetFocus;
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenericPrint.pas:  // Get the column names from the fields in the query.
GenFns.pas:  procedure DeleteTransactions(const sTable: string; const nThisBatch: LongInt;
GenFns.pas:  procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:  q.SQL.Add('FROM tParameter');
GenFns.pas:  qryParam.SQL.Add('SELECT ParmNumber FROM tParameter');
GenFns.pas:  qryStringList.Add('SELECT BatchStatusID FROM tBatch');
GenFns.pas:      qryStringList.Add('FROM tBatch');
GenFns.pas:    sQueryString.Add('SELECT id FROM tUser');
GenFns.pas:      qry.SQL.Add('SELECT ID FROM tUser WHERE UserLogin = '''+sOp+'''');
GenFns.pas:      qryFunction.SQL.Add('SELECT ID FROM tFunction');
GenFns.pas:procedure DeleteTransactions(const sTable: string; const nThisBatch: LongInt;
GenFns.pas:  qryStringList.Add('DELETE');
GenFns.pas:  qryStringList.Add('FROM '+sTable);
GenFns.pas:end;  // procedure DeleteTransactions().
GenFns.pas:  qryStringList.Add('FROM tDataCollection');
GenFns.pas:procedure DeleteFromDC(const nThisBatch:LongInt;
GenFns.pas:    qryStringList.Add('DELETE');
GenFns.pas:    qryStringList.Add('FROM tDataCollection');
GenFns.pas:end;  // procedure DeleteFromDC().
GenFns.pas:// A function to remove any apostrophe from the passed string.
GenFns.pas:// Some general functions to simplify the transition from dBase to Delphi4.
GenFns.pas:    SQL.Add('FROM tDataCollection AS DC');
GenFns.pas:  sFromDate : string;
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      sFromDate := 'NULL';
GenFns.pas:      sFromDate := ''''+FormattedDateString(FieldByName('RentStartDate').AsDateTime)+'''';
GenFns.pas:    SQL.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID, '+
GenFns.pas:    SQL.Add('SELECT SID.ServiceID, SID.BatchID, SID.FromDate, SID.ToDate, '+
GenFns.pas:    SQL.Add('FROM (SELECT tServiceID.ServiceID AS "ServiceID",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "FromDate",');
GenFns.pas:    SQL.Add('('+sFromDate+') AS "ToDate",');
GenFns.pas:    SQL.Add('FROM tServiceID');
GenFns.pas:    SQL.Add('FROM tDataCollection');
GenFns.pas:    SQL.Add('DELETE FROM tFaultDetails');
GenFns.pas:    SQL.Add('FROM Call c');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:    SQL.Add('FROM tParameter');
GenFns.pas:// This procedure creates a CSV file from the query parameter and saves it
GenFns.pas:      // Use the default directory obtained from tParameters.
GenFns.pas:    SQL.Add('FROM tFaultDetails');
GenFns.pas:      SQL.Add('FROM (SELECT LTRIM(CAST(tFaultDetails.Availability AS varchar(12)))'+
GenFns.pas:      SQL.Add(' FROM tFaultDetails');
GenFns.pas:    SQL.Add('FROM tBatch');
GenFns.pas:      SQL.Add('FROM tDataCollection');
InitFns.pas:  qryStringList.Add('SELECT id FROM tBatchStatus');
Main.pas:    qAdminDetailDateFrom: TDateTimeField;
Main.pas:    qAdminSummaryDateFrom: TDateTimeField;
Main.pas:    qRelExpTransactSummaryDateFrom: TDateTimeField;
Main.pas:    qTransactionsFromDate: TStringField;
Main.pas:    qMultiManualFromDate: TStringField;
Main.pas:    qFormCreate.SQL.Add('FROM tBatch');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    qFormCreate.SQL.Add('FROM tParameter');
Main.pas:    GetGSTRate;                   // Read GST rate from tParameter - ref GenFns.
Main.pas:  slQueryStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:  slQueryStringList.Add(' FROM tBatch');
Main.pas:      slStringList.Add('FROM (tBatchType LEFT JOIN tDataSourceType '+
Main.pas:      slStringList.Add(' FROM tBatch');
Main.pas:    qryStringList.Add('FROM tBatchType');
Main.pas:  qryStringList.Add('FROM tValidAccountNumber');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qryStringList.Add('FROM tBatch');
Main.pas:  qrySetBatch.SQL.Add('FROM (tBatch');
Main.pas:  qryHeadings.SQL.Add('FROM tBatch');
Main.pas:    slSQL.Add('FROM (SELECT tBatch.ID AS BatchID, '+
Main.pas:    slSQL.Add('FROM (tBatch');
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT P.BatchID, P.PayableDate, '+
Main.pas:    slSQL.Add('FROM tPayable P');
Main.pas:    slSQL.Add('FROM (SELECT tFinalisedTransaction.RevenueFlag, '+
Main.pas:    slSQL.Add('FROM tFinalisedTransaction');
Main.pas:    slSQL.Add('FROM (SELECT TN.*, tDubiousResult.DubiousTypeID, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tTransaction.BatchID, tTransaction.ServiceID, '+
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM ((((SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:    slSQL.Add('FROM (((((((((tServiceID AS SID '+
Main.pas:    slSQL.Add('SELECT TN.BatchID, tServiceID.ServiceID, TN.DateFrom, '+
Main.pas:    slSQL.Add('FROM (SELECT tTransaction.BatchID, tTransaction.ServiceID,');
Main.pas:      'THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:    slSQL.Add('FROM (tAdjustment');
Main.pas:    slSQL.Add('FROM (SELECT DC2.*, tCriticalType.Description AS "Reason"');
Main.pas:    slSQL.Add('FROM (SELECT DC1.*, (DC1.RENT + DC1.CALL + DC1.OTHER) '+
Main.pas:    slSQL.Add('FROM ((((((SELECT DC0.ServiceID, DC0.StatusID, DC0.ServiceTypeID, '+
Main.pas:    slSQL.Add(' Min(DC0.FromDate) AS "FromDate",');
Main.pas://      'DC0.FromDate END) AS "RentFrom",');
Main.pas:    slSQL.Add('FROM ((SELECT DC.*, tServiceType.ID AS ServiceTypeID');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.*, (CASE '+
Main.pas:    slSQL.Add('FROM (tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slSQL.Add('FROM ((tDataCollection');
Main.pas:    slSQL.Add('FROM (SELECT TN.BatchID, tServiceID.ServiceID, '+
Main.pas:      'tServiceType.Code, TN.DateFrom, TN.DateTo, TN.Rent, TN.Calls, '+
Main.pas:    slSQL.Add('FROM ((((SELECT tBatch.BillingPeriod, tTransaction.BatchID, '+
Main.pas:    slSQL.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas://      ' THEN tTransaction.FromDate END) AS DateFrom,');
Main.pas:    slSQL.Add('FROM ((tTransaction');
Main.pas:          qBatchSettings.SQL.Add('FROM tBatch');
Main.pas:          // Remove adjustments from tDataCollection.
Main.pas:          DeleteFromDC(nThisBatch, slCopyList, lSuccessful);
Main.pas:  slStrings.Add('FROM (SELECT SID1.ServiceID, SID1.Code, SID1.ServiceType, '+
Main.pas:  slStrings.Add('FROM (SELECT SID.ServiceID, tServiceType.Code, '+
Main.pas:  slStrings.Add('FROM ((((((((tServiceID AS SID '+
Main.pas:      'Min(tTransaction.FromDate) AS "DateFrom",');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  slStrings.Add('FROM (SELECT tDataCollection.BatchID, tDataCollection.ServiceID,'+
Main.pas:  slStrings.Add('FROM (tDataCollection');
Main.pas:      SQL.Add('SELECT id FROM tBatchStatus');
Main.pas:      qryStringList.Add('SELECT ID FROM tBatch');
Main.pas:    SQL.Add('SELECT BatchStatusID FROM tBatch');
Main.pas:  DeleteTransactions('tDataCollection', StrToInt(sBatchID), '', '',
Main.pas:  // Test if Revenue entries are to be added to tDataCollection from tRate.
Main.pas:  qryStringList.Add('FROM tBatchType');
Main.pas:    // from tDataCollection to tTransactions later by setting RevenueFlag=0.
Main.pas:    qryStringList.Add('FROM tTransactionType TT');
Main.pas:    qryStringList.Add(' RateDescription, FromDate, ToDate, TransactionTypeID,');
Main.pas:    qryStringList.Add(' DC3.RateDescription, DC3.FromDate, DC3.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC2.SequenceNo, DC2.ServiceID, DC2.BatchID,');
Main.pas:    qryStringList.Add(' DC2.RateDescription, DC2.FromDate, DC2.ToDate,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:    qryStringList.Add('FROM (SELECT DC00.DataCollectionID, DC00.ServicetypeID,');
Main.pas:    qryStringList.Add('FROM (SELECT DC0.*, (Min(tRate.Cost) / 12 * '+
Main.pas:    qryStringList.Add('FROM (SELECT DC.ID AS "DataCollectionID", '+
Main.pas:    qryStringList.Add('FROM tDataCollection DC');
Main.pas:  sImportFromDir : string;
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                sBatchTypeName, sImportFromDir );
Main.pas:                  SQL.Add('FROM tParameter');
Main.pas:                    sImportFromDir := ''
Main.pas:                    sImportFromDir := FieldByName('ParmText').AsString;
Main.pas:                  sBatchTypeName, sImportFromDir );
Main.pas:            qry.SQL.Add('FROM tParameter');
Main.pas:            if qry.Eof then sImportFromDir := ''
Main.pas:            else sImportFromDir := qry.FieldByName('ParmText').AsString;
Main.pas:              TelstraInvoiceFixedEBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceFixedOrigEBS( nNewBatchNumber, sImportFromDir);
Main.pas:              TelstraInvoiceFixedOBS( nNewBatchNumber, sImportFromDir, nProgramID);
Main.pas:              TelstraInvoiceMobileEBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceMobileOBS( nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( False, True, nNewBatchNumber, sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:                sImportFromDir );
Main.pas:              TelstraInvoiceDataEBS( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              TelstraInvoiceData( True, False, nNewBatchNumber, sImportFromDir );
Main.pas:              VodafoneInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusFixedInvoice( nProgramID, nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:              OptusMobileDataInvoice( nNewBatchNumber, sImportFromDir );
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:  slQuery.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousValidResolution');
Main.pas:  slStrings.Add('FROM tDubiousValidResolution');
Main.pas:    slStrings.Add('FROM tBatch');
Main.pas:      slStrings.Add('FROM tDubiousResult');
Main.pas:    SQL.Add('FROM (SELECT DISTINCT BatchID');
Main.pas:    SQL.Add('FROM tPayableDetail');
Main.pas:    SQL.Add('FROM tInvoiceDetail');
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    if qBatchSummary.Active then                      // Read from BatchSummary.
Main.pas:    qry.SQL.Add('FROM tBatch');
Main.pas:        // The following is repeated EXACTLY from the previous test.
Main.pas:    slStrings.Add('FROM (SELECT tTransaction.BatchID, tServiceID.ServiceID,');
Main.pas:    slStrings.Add(' Min(tTransaction.FromDate) AS DateFrom,');
Main.pas:    slStrings.Add('FROM ((tTransaction');
Main.pas:  sDateFrom : string;
Main.pas:    // First, update the date fields from tBatch.
Main.pas:    sDateFrom := FormattedDateString(FirstDayInMonth(dManual));
Main.pas:    slManual.Add('SET FromDate = '''+sDateFrom+''',');
Main.pas:    slManual.Add('FROM tMultiManualData');
Main.pas:      slManual.Add('FROM ((tBatchType');
Main.pas:          AddManualForm.FromDate := dtpCallStartDate.Date
Main.pas:          AddManualForm.FromDate := dtpRentStartDate.Date
Main.pas:          AddManualForm.FromDate := dManual;
Main.pas:    slStrings.Add('FROM (SELECT DCD.BatchID, DCD.ServiceID, DCD.Code, '+
Main.pas:    slStrings.Add('FROM (SELECT tDataCollection.BatchID, '+
Main.pas:    slStrings.Add('FROM ((tDataCollection');
Main.pas:  qry.SQL.Add('FROM tBatchType');
Main.pas:  // The default ModifySQL and DeleteSQL statements in uqMultiManual are okay.
Main.pas:      ' FromDate, ToDate, RateDescription)');
Main.pas:      ' :FromDate, :ToDate, :RateDescription)');
Main.pas:// This program manages the importing of data from a Telstra file that
Main.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
Main.pas:      SQL.Add('FROM tValidAccountNumber');
Manual.pas:    lblFrom: TLabel;
Manual.pas:    edtFrom: TDateEdit;
Manual.pas:    procedure SetFromDate(Value: TDateTime);
Manual.pas:    function GetFromDate: TDateTime;
Manual.pas:    property FromDate: TDateTime read GetFromDate write SetFromDate;
Manual.pas:procedure TManualForm.SetFromDate(Value: TDateTime);
Manual.pas:  edtFrom.Date := Value;
Manual.pas:end;    // SetFromDate.
Manual.pas:function TManualForm.GetFromDate: TDateTime;
Manual.pas:  Result := edtFrom.Date;
Manual.pas:end;    // GetFromDate.
Manual.pas:// When a ServiceType is selected, the options available to select from
Manual.pas:    qManualService.SQL.Add('FROM tServiceType');
Manual.pas:// Called from Main when establishing this Form.
Manual.pas:    sTemp := 'ServiceID,GSTFlag,AmountExGST,GSTAmount,AmountIncGST,FromDate,ToDate';
Manual.pas:    if (Copy(Trim(edtFrom.Text),1,1) = '/') then
Manual.pas:      sTemp := sTemp + ''''+ FormattedDateString(edtFrom.Date) +''',';
Manual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:  sFromDate : string;
MultiManual.pas:    SQL.Add('if exists (select * from dbo.sysobjects '+
MultiManual.pas:    SQL.Add('FROM tTransactionType');
MultiManual.pas:    SQL.Add('FROM tBatch');
MultiManual.pas:      sFromDate := FormattedDateString(FieldByName('BatchStartDate').AsDateTime);
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Rent AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Call AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    SQL.Add('FromDate, ToDate, RateDescription, ');
MultiManual.pas:    SQL.Add('FROM (SELECT MM2.ServiceID, '+
MultiManual.pas:    SQL.Add(' MM2.FromDate, MM2.ToDate, MM2.RateDescription,');
MultiManual.pas:    SQL.Add('FROM (SELECT MM1.Other AS "AmountExGST",');
MultiManual.pas:    SQL.Add('FROM (SELECT (MM.Rent + MM.Call + MM.Other) AS "Total", MM.*');
MultiManual.pas:    SQL.Add('FROM (SELECT MMD.ServiceID,');
MultiManual.pas:    SQL.Add(' (CASE WHEN (MMD.FromDate IS NULL OR '+
MultiManual.pas:      'DATALENGTH(MMD.FromDate) <> 10) THEN NULL');
MultiManual.pas:    SQL.Add('       ELSE MMD.FromDate END) AS "FromDate",');
MultiManual.pas:    SQL.Add('FROM tMultiManualData AS MMD');
MultiManual.pas:    SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add(' GSTAmount, AmountIncGST, FromDate, ToDate,');
MultiManual.pas:      SQL.Add('FROM tDCMM_Temprjc2006');
MultiManual.pas:    // FromDate.
MultiManual.pas:    SQL.Add('SET FromDate = NULL');
MultiManual.pas:    SQL.Add('AND FromDate IS NOT NULL');
MultiManual.pas:    SQL.Add('AND DATALENGTH(FromDate) <> 10');
OptusFixed.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
OptusFixed.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusFixed.pas:    SQL.Add('FROM tSupplier');
OptusFixed.pas:      SQL.Add('FROM tSupplierServiceCode');
OptusFixed.pas:        qryOptus.SQL.Delete(qryOptus.SQL.Count-1);
OptusFixed.pas:// Data handled is for calls made from Optus fixed phones (PABX).
OptusFixed.pas:  ReadString: string;                  // Read in from the text file.
OptusFixed.pas:            //        for local calls + gst, so omitted from processing (RJC).
OptusFixed.pas:            // Reinstated, but Calls omitted from processing-RJC20060218.
OptusFixed.pas:            // Calls omitted from processing.
OptusFixed.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobile.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobile.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
OptusMobile.pas:  sCallFrom : string;
OptusMobile.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobile.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobile.pas:      qryOptus.SQL.Delete(qryOptus.SQL.Count-1);
OptusMobile.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobile.pas:  ReadString: string;                  // Read in from the text file.
OptusMobile.pas://  sRentFrom : string;
OptusMobile.pas://  sCallFrom : string;    // Use global variable instead => update all values.
OptusMobile.pas:  sMonthFrom: string;
OptusMobile.pas:  sYearFrom : string;
OptusMobile.pas://  sRentFrom := '';
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:  sMonthFrom := '';
OptusMobile.pas:  sYearFrom := '';
OptusMobile.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobile.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                  sListValues := sListValues + sCallFrom;
OptusMobile.pas:                sListFields := sListFields + 'FromDate,';
OptusMobile.pas:                sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sListFields := sListFields + 'FromDate,';
OptusMobile.pas:              sListValues := sListValues + sCallFrom;
OptusMobile.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobile.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobile.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobile.pas://              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
OptusMobile.pas:  sFromDate : string;
OptusMobile.pas:    SQL.Add('  Sum(AmountIncGST) AS AmtActualSpend, FromDate,');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('GROUP BY FromDate, ToDate, TransactionTypeID,');
OptusMobile.pas:  sFromDate := qMinSpend.FieldByName('FromDate').AsString;
OptusMobile.pas:      SQL.Add('FROM');
OptusMobile.pas:      SQL.Add('  FROM tDataCollection');
OptusMobile.pas:        sListFields := sListFields + 'FromDate,';
OptusMobile.pas:        sListValues := sListValues + sFromDate +',';
OptusMobile.pas:    SQL.Add('DELETE');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  sCallFrom := '';
OptusMobile.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobile.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobile.pas:    SQL.Add('FROM tDataCollection');
OptusMobile.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobile.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobile.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobile.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
OptusMobileData.pas:// 131105-RJC Copy from OptusMobile to OptusMobileData.
OptusMobileData.pas:  fGSTRate : Real;                   // GST Rate - read from MainForm.
OptusMobileData.pas:  qryOptus.SQL.Add('FROM tSupplier');
OptusMobileData.pas:    qryOptus.SQL.Add('FROM tSupplierServiceCode');
OptusMobileData.pas:      qryOptus.SQL.Delete(qryOptus.SQL.Count-1);
OptusMobileData.pas:// Data handled is for calls made from Optus mobile phones.
OptusMobileData.pas:  ReadString: string;                  // Read in from the text file.
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sMonthFrom: string;
OptusMobileData.pas:  sYearFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:  sMonthFrom := '';
OptusMobileData.pas:  sYearFrom := '';
OptusMobileData.pas:              // 'DV' included but must omit ' AGG' from rental a/c duplicates.
OptusMobileData.pas:                If (Copy(SubString,4,2)=sMonthFrom) then
OptusMobileData.pas:                  SubString := Copy(SubString,1,6) + sYearFrom
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                  // If removed 'DV' from calls then use this condition:
OptusMobileData.pas:                  sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                  sListValues := sListValues + sCallFrom;
OptusMobileData.pas:                sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:                sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sListFields := sListFields + 'FromDate,';
OptusMobileData.pas:              sListValues := sListValues + sCallFrom;
OptusMobileData.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC3_C]) +''',';
OptusMobileData.pas:              sMonthFrom := Copy(sCallFrom,5,2);    // Allow for quote marks.
OptusMobileData.pas:              sYearFrom := Copy(sCallFrom,8,4);
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('DELETE');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('FROM (');
OptusMobileData.pas:      SQL.Add('  FROM (');
OptusMobileData.pas:      SQL.Add('    FROM tDataCollection');
OptusMobileData.pas:      SQL.Add('DELETE');
OptusMobileData.pas:      SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  sCallFrom : string;
OptusMobileData.pas:  sCallFrom := '';
OptusMobileData.pas:    SQL.Add('SELECT LTRIM(RTRIM(FromDate)) AS FromDate');
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:  while not qryDC.Eof and (Length(sCallFrom) < 10) do begin
OptusMobileData.pas:    sCallFrom := qryDC.FieldByName('FromDate').AsString;
OptusMobileData.pas:    SQL.Add('FROM tDataCollection');
OptusMobileData.pas:    SQL.Add('SET FromDate = '''+sCallFrom+'''');
OptusMobileData.pas:    SQL.Add('  (FromDate IS NOT null) AND');
OptusMobileData.pas:    SQL.Add('  (LEN(LTRIM(RTRIM(FromDate))) < 10)');
OptusMobileData.pas:      DeleteFromDC(nBatch, slDummy, lContinue);
Quetzal.pas:    RentFrom : TDateTime;
Quetzal.pas:    CallFrom : TDateTime;
Quetzal.pas:    qryDC.SQL.Add('FROM tDataCollection');
Quetzal.pas:qryDC.SQL.Add('SELECT ParmText FROM tParameter');
Quetzal.pas:        qryDC.SQL.Add('DELETE FROM tDataCollection');
Quetzal.pas:// Shipto changed from MEG to MEF a/c RLD 080620 (Mainco billing change).RJC.
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE Assign');
Quetzal.pas:  qryStringList.Append('FROM (SELECT (CASE');
Quetzal.pas:  qryStringList.Append('FROM ((SELECT Name2.*, Client.Ref3 AS Owner');
Quetzal.pas:  qryStringList.Append('FROM (SELECT Call.ClientCode, Call.CallNumber, '+
Quetzal.pas:  qryStringList.Append('FROM (SELECT CONVERT(Char(10),Call.LogDatTim,103) '+
Quetzal.pas:  qryStringList.Append('FROM Call');
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Logon '+
Quetzal.pas:  qryStringList.Append('FROM (Call LEFT JOIN Configuration '+
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:    Add('FROM call');
Quetzal.pas:// Added Radio Services a/c RLD-transition in name from Dynon - RJC:110108.
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate ;
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  sFromDate : string;
Quetzal.pas:  sFromDate := ''''+ FormattedDateString(dStartDate) +''',';
Quetzal.pas:  qryDC.SQL.Add('FROM tTransactionType');
Quetzal.pas:  qryStringList.Add('FROM Call');
Quetzal.pas:      sListFields := sListFields + 'FromDate,';
Quetzal.pas:      sListValues := sListValues + sFromDate;
Quetzal.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Quetzal.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Quetzal.pas:      qryStringList.Add('FROM (tDataCollection');
Quetzal.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Quetzal.pas:      qryStringList.Add('FROM tDataCollection');
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Quetzal.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:// 121008: TransactionType name check generalised from (6,50) to (nPos,50).
QuoteSystem.pas:    RentFrom : TDateTime;
QuoteSystem.pas:    CallFrom : TDateTime;
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:    Add('FROM BillPurchasing');
QuoteSystem.pas:    SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:      qryStringList.Add('FROM tDataCollection');
QuoteSystem.pas:  sFromDate : string;
QuoteSystem.pas:  sFromDate := FormattedDateString(dStartDate);
QuoteSystem.pas:    SQL.Add('FROM tTransactionType');
QuoteSystem.pas:  qryStringList.Add('FROM BillJobs');
QuoteSystem.pas:  qryLook.SQL.Add('FROM tServiceType');
QuoteSystem.pas:      sListFields := sListFields + 'FromDate,';
QuoteSystem.pas:      sListValues := sListValues +''''+ sFromDate +''',';
QuoteSystem.pas:        Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
QuoteSystem.pas:        Add('FROM tDataCollection');
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
QuoteSystem.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
ReleaseTransactions.pas:  qryStringList.Add(' FromDate, ToDate, CustomerID, CustomerCentreID, '+
ReleaseTransactions.pas:  qryStringList.Add(' tTransaction.FromDate, tTransaction.ToDate, '+
ReleaseTransactions.pas:  qryStringList.Add('FROM ((tTransaction');
ReleaseTransactions.pas:    // Remove transactions from the tTransaction table.
ReleaseTransactions.pas:    DeleteTransactions('tTransaction', nBatchID, 'RevenueFlag', 'B',
ReleaseTransactions.pas:    DeleteTransactions('tProcessedTransaction', nBatchID, 'RevenueFlag', 'B',
SaveToTransaction.pas:  qAns.SQL.Add('FROM tTransactionType');
SaveToTransaction.pas:  if not VarIsNull(qryDC['FromDate']) then begin
SaveToTransaction.pas:    sListFields := sListFields+ 'FromDate,';
SaveToTransaction.pas:      Trim(qryDC.FieldByName('FromDate').AsString) +''',';
SaveToTransaction.pas:  end;  // FromDate.
SaveToTransaction.pas:  // ElementID is recorded last in this SQL - read from tTransactionType.
SaveToTransaction.pas:  // Must gather the data from the tDataCollection table - it is best to
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM tDataCollection');
SaveToTransaction.pas:    SQL.Add('FROM ((SELECT tDataCollection.*, tServiceID.ID AS SID,');
SaveToTransaction.pas:    SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:      SQL.Add('FROM (SELECT DC.SID, DC.ServiceID, Sum(RentPercentage) AS "Rent",'+
SaveToTransaction.pas:      SQL.Add('FROM ((SELECT DISTINCT tDataCollection.ServiceID,'+
SaveToTransaction.pas:      SQL.Add(' FROM (tDataCollection');
SaveToTransaction.pas:        'TxnDate, AmountExGST, GSTAmount, AmountIncGST, FromDate, ToDate,');
SaveToTransaction.pas:      Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:        'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');
SaveToTransaction.pas:      Add('FROM (((((SELECT DC1.*');
SaveToTransaction.pas:      Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:      Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:      Add('FROM ((tDataCollection');
SaveToTransaction.pas:        Add(' (CASE DC2.FromDate WHEN NULL THEN NULL ELSE '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,7,4) + SUBSTRING(DC2.FromDate,4,2) + '+
SaveToTransaction.pas:          'SUBSTRING(DC2.FromDate,1,2) END) AS "FromDate",');             // 4.
SaveToTransaction.pas:        Add('FROM ((((((((SELECT DC1.*');                                 // 15.
SaveToTransaction.pas:        Add('FROM (SELECT DC.*, tServiceType.ID AS "ServiceTypeID", '+
SaveToTransaction.pas:        Add('FROM (SELECT tDataCollection.*, '+
SaveToTransaction.pas:        Add('FROM ((tDataCollection');                                    // 20.
SaveToTransaction.pas:              SQL.Add('SELECT * FROM tServiceSplit');
SaveToTransaction.pas:              // Delete any Where and Order By statements at the end of
SaveToTransaction.pas:                qryStringList.Delete(nWhereIsAt);
SaveToTransaction.pas:      // Remove transactions from the tDataCollection table.
SaveToTransaction.pas:      DeleteTransactions('tDataCollection', nBatch, '', '',
SaveToTransaction.pas:      // Remove transactions from the tTransaction table.
SaveToTransaction.pas:      DeleteTransactions('tTransaction', nBatch, '', '',
Security.pas:    FromDate   : string[8];
Security.pas:  sFromDate : string;
Security.pas:  sFromDate := FormattedDateString(dStartDate);
Security.pas:  qryDC.SQL.Add('FROM tTransactionType');
Security.pas:  qryDC.SQL.Add('FROM tSystem');
Security.pas:  qryStringList.Add('FROM (tServiceID');
Security.pas:FROM (tServiceID
Security.pas:      sListFields := sListFields + 'FromDate,';
Security.pas:      sListValues := sListValues +''''+ sFromDate +''',';
Security.pas:      qryStringList.Add('FROM (SELECT GSTrate.ID, GSTrate.AmtExGST,');
Security.pas:      qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Security.pas:      qryStringList.Add('FROM (tDataCollection');
Security.pas:      qryStringList.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Security.pas:      qryStringList.Add('FROM tDataCollection');
Security.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Services.pas:    FromDate   : string[8];
Services.pas:    SQL.Add('FROM (SELECT ST0.*,');
Services.pas:    SQL.Add('FROM (SELECT ST.ServiceTypeID, ST.CustomerID, ST.Rate, '+
Services.pas:    SQL.Add('FROM (SELECT SID.*, SI.ServiceID, SI.ServiceTypeID, '+
Services.pas:    SQL.Add('FROM ( SELECT SI0.ID, SI1.Rate,');
Services.pas:    SQL.Add(' FROM (SELECT SC1.ID, tDiscountedRate.Rate');
Services.pas:    SQL.Add('  FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    SQL.Add('  FROM tServiceID');
Services.pas:  sFromDate : string;
Services.pas:  sFromDate := FormattedDateString(dStartDate);
Services.pas:    tblTemp.DeleteTable;
Services.pas:  qryServices.SQL.Add('FROM tTransactionType');     // Service Records Invoice.
Services.pas:  qryServices.SQL.Add('FROM tStatus');
Services.pas:  qryServices.SQL.Add('FROM tCustomer');
Services.pas:  qryServices.SQL.Add('FROM tSystem');
Services.pas:    Add(' RateDescription, BatchID, FromDate, ToDate, TransactionTypeID,');
Services.pas:    Add('FROM (SELECT CID2.*, CAST((CID2.AmountExGST + CID2.GSTAmount) AS money) '+
Services.pas:    Add('FROM (SELECT CID1.*, CAST((CASE WHEN CID1.GSTFlag LIKE ''Y'' '+
Services.pas:    Add('FROM (SELECT (tCustomer.ShipTo + '' Services Pre July 1999'') '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM tCustomer');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID)');
Services.pas:        'FromDate, ToDate, TransactionTypeID');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:    Add(' AmountExGST, GSTFlag, GSTAmount, AmountIncGST, FromDate, '+
Services.pas:    Add('FROM (SELECT SID2.*, '+
Services.pas:    Add('FROM (SELECT SID1.*,');
Services.pas:    Add('FROM (SELECT SID.*, SI.ServiceID, ''Network Access'' AS "RateDescription", '+
Services.pas:    Add(' ('''+sFromDate+''') AS "FromDate", ('''+sToDate+''') AS "ToDate",');
Services.pas:    Add('FROM (SELECT SI0.ID, SI1.Rate, Max(tRate.Cost) AS "Cost",'+
Services.pas:    Add('FROM (SELECT SC.ID, SC.Rate');
Services.pas:    Add(' FROM (SELECT SC1.ID, (CASE WHEN tDiscountedRate.Rate '+
Services.pas:    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID,');
Services.pas://    Add(' FROM (SELECT tServiceID.ID, tServiceID.ServiceTypeID, '+
Services.pas:    Add(' FROM tServiceID');
Services.pas:    Add('FROM tDC_TempRJC_ExService');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:        'FromDate, ToDate, TransactionTypeID,');
Services.pas:      Add('FROM tDC_TempRJC_ExService');
Services.pas:  // NOTE: Do not delete temporary table as existence persists for the session
Services.pas:  // even if dropped or deleted.
Services.pas:  qryStringList.Add('FROM (SELECT SI0.ID, Max(tRate.Cost) AS "CostAmt", '+
Services.pas:  qryStringList.Add('FROM tServiceID AS SI0');
Services.pas:  DeleteFromDC( nBatch, EmptyList, lContinue);
Telmax.pas:  fGSTRate : Real;             // GST Rate - read from MainForm.
Telmax.pas:  qryTelmax.SQL.Add('FROM tSupplier');
Telmax.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
Telmax.pas:      qryTelmax.SQL.Delete(qryTelmax.SQL.Count-1);
Telmax.pas:      qry.SQL.Add('FROM tCustomer');
Telmax.pas:      qryRef.SQL.Add('FROM tServiceType');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:          qry.SQL.Add('FROM tRate');
Telmax.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM (tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := FormattedDateString(dStartDate);
Telmax.pas:    qryDC.SQL.Add('FROM tTransactionType');
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:        qryStringList.Add('FROM (SELECT DC3.*, '+
Telmax.pas:        qryStringList.Add('FROM (SELECT DC2.ID, DC2.AmountExGST,');
Telmax.pas:        qryStringList.Add('FROM (SELECT DC1.ID, (Max(tRate.Cost)/12) AS "AmountExGST"');
Telmax.pas:        qryStringList.Add('FROM ((SELECT DC0.ID, DC0.ServiceID, (CASE');
Telmax.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
Telmax.pas:        qryStringList.Add('FROM tDataCollection');
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas://  sServiceType  : string;            Deleted-default ok.
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas://                sServiceType  := '''VM1'',';   (or VVI) Deleted-default ok.
Telmax.pas://                sServiceType  := '''VM'','; (orVOS,VOI)Deleted-default ok.
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas://  sServiceType  : string;            Deleted-default ok.
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas://                sServiceType  := '''SW1'',';            Deleted-default ok.
Telmax.pas://                sServiceType  := '''SW'',';            Deleted-default ok.
Telmax.pas:            sListFields := sListFields + 'FromDate,';
Telmax.pas:            sListValues := sListValues + sFromDate;
Telmax.pas:  ReadString: string;                  // Read in from the text file.
Telmax.pas:  sFromDate : string;
Telmax.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
Telmax.pas:          sListFields := sListFields + 'FromDate,';
Telmax.pas:          sListValues := sListValues + sFromDate;
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:      DeleteFromDC( nBatch, slCust, lContinue);
Telmax.pas:      slCust.Add('FROM tServiceID');
Telmax.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
Telmax.pas:        slCust.Add('FROM tDataCollection');
Telmax.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:  fGSTRate : Real;                    // GST Rate for Calcs-read from MainForm.
TelmaxUniComms.pas:    SQL.Add('FROM tTransactionGroup');
TelmaxUniComms.pas:    SQL.Add('FROM tSystem');
TelmaxUniComms.pas:    SQL.Add('FROM tSupplier');
TelmaxUniComms.pas:      qryTelmax.SQL.Add('FROM tTransactionType');
TelmaxUniComms.pas:      SQL.Add('FROM (');
TelmaxUniComms.pas:      SQL.Add('  FROM (');
TelmaxUniComms.pas:      SQL.Add('    FROM tRate');
TelmaxUniComms.pas:      SQL.Add('FROM   tSupplierServiceCode');                              // 1.
TelmaxUniComms.pas:    qryTelmax.SQL.Add('FROM tSupplierServiceCode');
TelmaxUniComms.pas:      qryTelmax.SQL.Delete(qryTelmax.SQL.Count-1);
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tCustomer');
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');                                   // 1.
TelmaxUniComms.pas:      qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:      qryRef.SQL.Add('FROM tServiceType');
TelmaxUniComms.pas:        qryTemp.SQL.Add('FROM tRate');
TelmaxUniComms.pas:// Data handled is for calls made from the Victrack fixed phones (PABX) network
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:          sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:        qryStringList.Add('FROM (SELECT tDataCollection.ID, '+
TelmaxUniComms.pas:        qryStringList.Add('FROM (tDataCollection');
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := FormattedDateString(dStartDate);
TelmaxUniComms.pas:    SQL.Add('FROM   tRate');                                          // 1.
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:          sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:            // Determine the cost from the values read from the tRate table.
TelmaxUniComms.pas:        // Done. Values updated from the tRates table for TEC & SFC values.
TelmaxUniComms.pas:  ReadString: string;                  // Read in from the text file.
TelmaxUniComms.pas:  sFromDate : string;
TelmaxUniComms.pas:  sFromDate := ''''+FormattedDateString(dStartDate)+''',';
TelmaxUniComms.pas:            sListFields := sListFields + 'FromDate,';
TelmaxUniComms.pas:            sListValues := sListValues + sFromDate;
TelmaxUniComms.pas:      DeleteFromDC( nBatch, slCust, lContinue);
TelmaxUniComms.pas:      slCust.Add('FROM tServiceID');                                       // 1.
TelmaxUniComms.pas:        slCust.Add('FROM (SELECT Sum(tDataCollection.AmountIncGST) '+
TelmaxUniComms.pas:        slCust.Add('FROM tDataCollection');
TelmaxUniComms.pas:        slCust.Clear;   // When empty, all entries deleted from tDataCollection.
TelmaxUniComms.pas:        DeleteFromDC( nBatch, slCust, lContinue);
TelstraFixed.pas:            GetPhoneAccountBills - Added reading code from input, not default.
TelstraFixed.pas:    RentFrom : TDateTime;
TelstraFixed.pas:    CallFrom : TDateTime;
TelstraFixed.pas:    FromDate        : string[8];
TelstraFixed.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraFixed.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixed.pas:    Add('FromDate');
TelstraFixed.pas:    SQL.Add('FROM tDataCollection');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixed.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixed.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixed.pas:FROM tDataCollect_Temp
TelstraFixed.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixed.pas:    SQL.Add(' FromDate, ');
TelstraFixed.pas:    SQL.Add('   FromDate, ');
TelstraFixed.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDS.SQL.Add('DELETE');                    // Flush any old data left behind.
TelstraFixed.pas:  qryDS.SQL.Add('FROM tDataCollect_Temp');
TelstraFixed.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixed.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              SubString := ConvertString.Strings[DESC16_C]; // DateFrom.
TelstraFixed.pas:                if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixed.pas:                  RentFrom := dStartBillingPeriod;
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                SubString := ConvertString.Strings[DESC12_C]; // DateFrom.
TelstraFixed.pas:                if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixed.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  if (Length(DBfromDate) = 0) then
TelstraFixed.pas:                    DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixed.pas:                else if (Length(DBfromDate) > 0) then begin
TelstraFixed.pas:                  sListFields := sListFields + 'FromDate,';
TelstraFixed.pas:                  sListValues := sListValues + DBfromDate;
TelstraFixed.pas:                end;  // FromDate.
TelstraFixed.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixed.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixed.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraFixed.pas:    qryTelstra.SQL.Delete(qryTelstra.SQL.Count-1);
TelstraFixedEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedEBS.pas:            ImportFile & GetMobileAccountBills routines also deleted.
TelstraFixedEBS.pas:    RentFrom : TDateTime;
TelstraFixedEBS.pas:    CallFrom : TDateTime;
TelstraFixedEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedEBS.pas:    Add('FromDate');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollection');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas://    SQL.Add('FROM (SELECT TOP 10000 *');
TelstraFixedEBS.pas:    SQL.Add('  FROM tDataCollect_Temp');
TelstraFixedEBS.pas:from (SELECT TOP 10000 BatchID, ServiceID, CallCode, NumCalls, Var01
TelstraFixedEBS.pas:FROM tDataCollect_Temp
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:            Add(''''+qryDS.FieldByName('FromDate').AsString+'''');
TelstraFixedEBS.pas:    SQL.Add(' FromDate, ');
TelstraFixedEBS.pas:    SQL.Add('   FromDate, ');
TelstraFixedEBS.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  // DONE - Delete the DS entries in the temporary table.
TelstraFixedEBS.pas:    SQL.Add('DELETE');
TelstraFixedEBS.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFixedEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedEBS.pas:                Delete(T, nPos, 1);
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedEBS.pas:              end;  // FromDate.
TelstraFixedEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedEBS.pas:    qryTelstra.SQL.Delete(qryTelstra.SQL.Count-1);
TelstraFixedOrigEBS.pas:            ImportFile & GetMobileAccountBills routines also deleted.
TelstraFixedOrigEBS.pas:            GetPhoneAccountBills - Added reading code from file, not default.
TelstraFixedOrigEBS.pas:    RentFrom : TDateTime;
TelstraFixedOrigEBS.pas:    CallFrom : TDateTime;
TelstraFixedOrigEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraFixedOrigEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraFixedOrigEBS.pas:  qryDC.SQL.Add('FROM tBatch');
TelstraFixedOrigEBS.pas:    // From prev. data: 30,930 lines in a file of 12,135,424 bytes.
TelstraFixedOrigEBS.pas:                // entry is provided.   (Copied from following else-if section.)
TelstraFixedOrigEBS.pas:              end;  // if LastEntryIs_1. (Copied from section immed. following.)
TelstraFixedOrigEBS.pas:              if (RentFrom<dMinDate) or (dStartBillingPeriod<RentFrom) then
TelstraFixedOrigEBS.pas:                RentFrom := dStartBillingPeriod;
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                FormattedDateString(aResultSet[ nResultSet ].RentFrom) +''',';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:              if (Length(DBfromDate) = 0) and (Length(SubString)=8) then
TelstraFixedOrigEBS.pas:                DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                if (Length(DBfromDate) = 0) then
TelstraFixedOrigEBS.pas:                  DBfromDate := ''''+YMD2DMY(SubString)+''',';
TelstraFixedOrigEBS.pas:              else if (Length(DBfromDate) > 0) then begin
TelstraFixedOrigEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraFixedOrigEBS.pas:                sListValues := sListValues + DBfromDate;
TelstraFixedOrigEBS.pas:              end;  // FromDate.
TelstraFixedOrigEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraFixedOrigEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraFixedOrigEBS.pas:    qryTelstra.SQL.Delete(qryTelstra.SQL.Count-1);
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollection');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:    SQL.Add(' FromDate, ');
TelstraFunctions.pas:    SQL.Add('   FromDate, ');
TelstraFunctions.pas:    SQL.Add(' FROM tDataCollect_Temp');
TelstraFunctions.pas:  // DONE - Delete the DS entries in the temporary table.
TelstraFunctions.pas:    SQL.Add('DELETE');
TelstraFunctions.pas:    SQL.Add('FROM tDataCollect_Temp');
TelstraFunctions.pas:  sFromDate : string;
TelstraFunctions.pas:    Add('FROM tCustomer');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('FROM tServiceType');
TelstraFunctions.pas:    Add('FROM tTransactionType');
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraFunctions.pas:    Add('FROM tRate');
TelstraFunctions.pas:  // Try to get the dates from the tDataCollection table.
TelstraFunctions.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraFunctions.pas:    Add('FROM tDataCollection');
TelstraFunctions.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraFunctions.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraFunctions.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraFunctions.pas:    // Read the dates from the tBatch table.
TelstraFunctions.pas:      Add('FROM tBatch');
TelstraFunctions.pas:      sFromDate := 'NULL';
TelstraFunctions.pas:      sFromDate := ''''+
TelstraFunctions.pas:  end;  // FromDate or EndDate unknown.
TelstraFunctions.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraFunctions.pas:      Add('FROM tParameter');
TelstraFunctions.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:        Add(sFromDate);
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tRate');
TelstraFunctions.pas:          Add(' FROM tRate');
TelstraFunctions.pas:            Add('FROM tParameter');
TelstraFunctions.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraFunctions.pas:              Add(sFromDate);
TelstraFunctions.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraFunctions.pas:        Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:      Add('FROM tTransactionType');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tRate');
TelstraFunctions.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:      Add(sFromDate+' AS "FromDate",');
TelstraFunctions.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.*');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:          Add('FROM tParameter');
TelstraFunctions.pas:          Add('FROM tTransactionType');
TelstraFunctions.pas:          Add('FROM tDataCollection');
TelstraFunctions.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraFunctions.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraFunctions.pas:          Add(sFromDate+',');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraFunctions.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraFunctions.pas:      Add('FROM (SELECT DC2.*,');
TelstraFunctions.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraFunctions.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraFunctions.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraFunctions.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraFunctions.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraFunctions.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraFunctions.pas:      Add('FROM tDataCollection');
TelstraMobile.pas:    RentFrom : TDateTime;
TelstraMobile.pas:    CallFrom : TDateTime;
TelstraMobile.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobile.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobile.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobile.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobile.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobile.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobile.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobile.pas:    qryTelstra.SQL.Add('FROM tSupplierServiceCode');
TelstraMobile.pas:    qryTelstra.SQL.Delete(qryTelstra.SQL.Count-1);
TelstraMobileData.pas:    RentFrom : TDateTime;
TelstraMobileData.pas:    CallFrom : TDateTime;
TelstraMobileData.pas:  T: string;                           // Line of data read from ReadString.
TelstraMobileData.pas:  ReadString: string;                  // Line of data read from TextFile.
TelstraMobileData.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileData.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                  if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                    DBfromDate :=
TelstraMobileData.pas:                  sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                  sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileData.pas:                  DBfromDate :=
TelstraMobileData.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileData.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileData.pas:          end;  // not empty string read from the input file.
TelstraMobileData.pas:  sFromDate : string;
TelstraMobileData.pas:  slDC.Add('FROM tCustomer');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('FROM tServiceType');
TelstraMobileData.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileData.pas:  slDC.Add('FROM tRate');
TelstraMobileData.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileData.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileData.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileData.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileData.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileData.pas:    // Read the dates from the tBatch table.
TelstraMobileData.pas:    slDC.Add('FROM tBatch');
TelstraMobileData.pas:      sFromDate := 'NULL';
TelstraMobileData.pas:      sFromDate := ''''+
TelstraMobileData.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileData.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileData.pas:    slDC.Add('FROM tParameter');
TelstraMobileData.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileData.pas:      slDC.Add(sFromDate);
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('FROM tRate');
TelstraMobileData.pas:        slDC.Add(' FROM tRate');
TelstraMobileData.pas:          slDC.Add('FROM tParameter');
TelstraMobileData.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:            slDC.Add(sFromDate);
TelstraMobileData.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileData.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileData.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM tRate');
TelstraMobileData.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:        slDC.Add('FROM tParameter');
TelstraMobileData.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileData.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileData.pas:        slDC.Add(sFromDate+',');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileData.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileData.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileData.pas:    SQL.Add('FROM tSupplier');
TelstraMobileData.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileData.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileData.pas:      SQL.Delete(SQL.Count-1);
TelstraMobileData.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileData.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                  DBfromDate :=
TelstraMobileDataEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataEBS.pas:                DBfromDate :=
TelstraMobileDataEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataEBS.pas:  sFromDate : string;
TelstraMobileDataEBS.pas:    Add('FROM tCustomer');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('FROM tServiceType');
TelstraMobileDataEBS.pas:    Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataEBS.pas:    Add('FROM tRate');
TelstraMobileDataEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataEBS.pas:    Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataEBS.pas:    Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataEBS.pas:      Add('FROM tBatch');
TelstraMobileDataEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataEBS.pas:      sFromDate := ''''+
TelstraMobileDataEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataEBS.pas:      Add('FROM tParameter');
TelstraMobileDataEBS.pas:        Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:        Add(sFromDate);
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tRate');
TelstraMobileDataEBS.pas:          Add(' FROM tRate');
TelstraMobileDataEBS.pas:            Add('FROM tParameter');
TelstraMobileDataEBS.pas:              Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataEBS.pas:              Add(sFromDate);
TelstraMobileDataEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataEBS.pas:        Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:      Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tRate');
TelstraMobileDataEBS.pas:      Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:      Add(sFromDate+' AS "FromDate",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.*');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:          Add('FROM tParameter');
TelstraMobileDataEBS.pas:          Add('FROM tTransactionType');
TelstraMobileDataEBS.pas:          Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataEBS.pas:          Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataEBS.pas:          Add(sFromDate+',');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataEBS.pas:      Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC2.*,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:      Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataEBS.pas:      Add('FROM tDataCollection');
TelstraMobileDataEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataEBS.pas:      SQL.Delete(SQL.Count-1);
TelstraMobileDataEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:    RentFrom : TDateTime;
TelstraMobileDataOldEBS.pas:    CallFrom : TDateTime;
TelstraMobileDataOldEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileDataOldEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileDataOldEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:                if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                  DBfromDate :=
TelstraMobileDataOldEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:                sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:              if (Length(DBfromDate) = 0) or (Length(DBtoDate) = 0) then begin
TelstraMobileDataOldEBS.pas:                DBfromDate :=
TelstraMobileDataOldEBS.pas:              sListFields := sListFields + 'FromDate,';
TelstraMobileDataOldEBS.pas:              sListValues := sListValues +''''+ DBfromDate +''',';
TelstraMobileDataOldEBS.pas:  sFromDate : string;
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tCustomer');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tServiceType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Look up the appropriate rate from tRate and convert to monthly rates.
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:  // Try to get the dates from the tDataCollection table.
TelstraMobileDataOldEBS.pas:  slDC.Add('SELECT DISTINCT tDataCollection.FromDate, tDataCollection.ToDate');
TelstraMobileDataOldEBS.pas:  slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:  slDC.Add('AND tDataCollection.FromDate IS NOT NULL');
TelstraMobileDataOldEBS.pas:    sFromDate := ''''+ qryDC.FieldByName('FromDate').AsString +''', ';
TelstraMobileDataOldEBS.pas:  if (Length(sFromDate) = 0) or (Length(sToDate) = 0) then begin
TelstraMobileDataOldEBS.pas:    // Read the dates from the tBatch table.
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tBatch');
TelstraMobileDataOldEBS.pas:      sFromDate := 'NULL';
TelstraMobileDataOldEBS.pas:      sFromDate := ''''+
TelstraMobileDataOldEBS.pas:  end;  // FromDate or EndDate unknown.
TelstraMobileDataOldEBS.pas:    // any ServiceID not on the invoice is to be added from the tServiceID
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:      slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID, '+
TelstraMobileDataOldEBS.pas:      slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:        slDC.Add(' FROM tRate');
TelstraMobileDataOldEBS.pas:          slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:            slDC.Add('(BatchID, ServiceID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:            slDC.Add(sFromDate);
TelstraMobileDataOldEBS.pas:      // Get the TransactionTypeID from the tDataCollection table where
TelstraMobileDataOldEBS.pas:      slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID", '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tRate');
TelstraMobileDataOldEBS.pas:    slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:    slDC.Add(sFromDate+' AS "FromDate",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DISTINCT tDataCollection.ServiceID, tDataCollection.BatchID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.*');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ServiceID,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tParameter');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tTransactionType');
TelstraMobileDataOldEBS.pas:        slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:        sFromDate := Copy(sFromDate, 1, Length(sFromDate) - 2);
TelstraMobileDataOldEBS.pas:        slDC.Add('(ServiceID, BatchID, FromDate, ToDate, TransactionTypeID,'+
TelstraMobileDataOldEBS.pas:        slDC.Add(sFromDate+',');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add(' FromDate, ToDate, TransactionTypeID,');
TelstraMobileDataOldEBS.pas:    slDC.Add(' tDataCollection.FromDate, tDataCollection.ToDate, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC2.*,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC1.DataCollectionID, DC1.Cost,');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCFullRate.DataCollectionID, '+
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DCRate.*, tRate.Length AS "Usage",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT DC0.*, Min(tRate.Cost) AS "Cost"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tDataCollection.ID AS "DataCollectionID",');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Min(tRate.Cost) AS "Cost", DC0.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT tServiceID.ServiceTypeID');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM (SELECT Sum(tDataCollection.AmountExGST) AS "RevenueAmt"');
TelstraMobileDataOldEBS.pas:    slDC.Add('FROM tDataCollection');
TelstraMobileDataOldEBS.pas:    SQL.Add('FROM tSupplier');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileDataOldEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileDataOldEBS.pas:      SQL.Delete(SQL.Count-1);
TelstraMobileDataOldEBS.pas:    DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileDataOldEBS.pas:        DeleteFromDC( nBatch, EmptyList, lContinue);
TelstraMobileEBS.pas:    RentFrom : TDateTime;
TelstraMobileEBS.pas:    CallFrom : TDateTime;
TelstraMobileEBS.pas:  T: string;                           // Line of data read from TextFile.
TelstraMobileEBS.pas:  DBfromDate : string;                 // Section DB - save read dates.
TelstraMobileEBS.pas:    // From prev. data: 8876 lines in a file of 1,585,557 bytes.
TelstraMobileEBS.pas:                sListFields := sListFields + 'FromDate,';
TelstraMobileEBS.pas:  qryTelstra.SQL.Add('FROM tSupplier');
TelstraMobileEBS.pas:      SQL.Add('FROM tValidAccountNumber');
TelstraMobileEBS.pas:      SQL.Add('FROM tSupplierServiceCode');
TelstraMobileEBS.pas:    qryTelstra.SQL.Delete(qryTelstra.SQL.Count-1);
Vodafone.pas://  sCreditAccount : string;    // Read from Config-acct for all credits.
Vodafone.pas:  qryVodafone.SQL.Add('SELECT ParmNumber FROM tParameter');
Vodafone.pas:  qryVodafone.SQL.Add('FROM tSupplier');
Vodafone.pas:    qryVodafone.SQL.Add('FROM tSupplierServiceCode');
Vodafone.pas:    qryVodafone.SQL.Delete(qryVodafone.SQL.Count-1);
Vodafone.pas:// Data handled is for calls made from mobile phones.
Vodafone.pas:  ReadString: string;                  // Read in from the text file.
Vodafone.pas:  sRentFrom : string;
Vodafone.pas:  sCallFrom : string;
Vodafone.pas:  sRentFrom := '';
Vodafone.pas:  sCallFrom := '';
Vodafone.pas:              sListFields := sListFields + 'FromDate,';
Vodafone.pas:              sListValues := sListValues + sCallFrom;
Vodafone.pas:                sListFields := sListFields + 'FromDate,';
Vodafone.pas:                // Deduct discount sum from the total charge.
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sCallFrom;
Vodafone.pas:              sCallFrom := ''''+YMD2DMY(ConvertString.Strings[DESC2_C]) +''',';
Vodafone.pas:              sRentFrom := ''''+YMD2DMY(ConvertString.Strings[DESC4_C]) +''',';
Vodafone.pas:                  sListFields := sListFields + 'FromDate,';
Vodafone.pas:                  sListValues := sListValues + sRentFrom;
Vodafone.pas:        // Deduct discount sum from the total charge.
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:        qryDC.SQL.Add('FROM tDataCollection');
Vodafone.pas:          sListFields := sListFields + 'FromDate,';
Vodafone.pas:          sListValues := sListValues + sCallFrom;
Vodafone.pas:      DeleteFromDC( nBatch, EmptyList, lContinue);