<?xml version="1.0" encoding="utf-8"?>
<Session ID="/baanerp/tt/adv/ttadv3182s000" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Query Field Data (ttadv3182s000)</Title>
	</Header>
	<HelpTopic xml:lang="en"><AimSection><Paragraph class="Default">
                                 Use this session to define functions, ranges, and sequences for <Link href="/baanerp/tt/glossary/glossary#100052" role="glossary">query</Link> fields. You can use this session to make a more specific query. If you do not specify functions or ranges, the values of all selected table fields are included in the query.</Paragraph>
		</AimSection>
		<RelatedTopics><SectionTitle>
                                 Related topics
                              </SectionTitle>
			<RelTopic><Link href="/baanerp/tt/onlinemanual/100032" role="manual">To define a query with Easy SQL</Link>
			</RelTopic>
		</RelatedTopics>
	</HelpTopic>
	<Fields><FieldHelp ID="ttadv382.fild"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Field</Title>
			</Header>
			<FuncDesc>The code of the selected table field.</FuncDesc>
			<RelatedTopics><SectionTitle>
                                    Related topics
                                 </SectionTitle>
				<RelTopic><Link href="/baanerp/tt/onlinemanual/100032" role="manual">To define a query with Easy SQL</Link>
				</RelTopic>
			</RelatedTopics>
		</FieldHelp>
		<FieldHelp ID="ttadv382.func"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Function</Title>
			</Header>
			<FuncDesc>The function to be applied to the selected field.</FuncDesc>
			<SimpleSection><Paragraph class="Default">If you select a function, <GUIRef href="/baanerp/tt" role="package">Tools</GUIRef> ignores value in the <GUIRef href="/baanerp/tt/adv/ttadv3182s000#ttadv382.prnt" role="manual">Print</GUIRef> field. As a result of this, the function is always printed.</Paragraph>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv382.oprr"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">1</Title>
			</Header>
			<FuncDesc>Select the operator of the where condition.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="ttadv382.rang"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">1</Title>
			</Header>
			<FuncDesc>The operand following the operator entered in the <GUIRef href="ttadv382.oprr" role="tablefield">Query Operator</GUIRef> field.</FuncDesc>
			<SimpleSection><SectionTitle>
                                    Example
                                 </SectionTitle>
				<Paragraph class="Default">You want to use the ttaad200.name (User Name) field in a query.</Paragraph>
				<ProcedureList><ListIntro>To generate a where condition for this field:</ListIntro>
					<ListItem>Select the field and select an operator. For example, Equal in <GUIRef href="ttadv382.oprr" role="tablefield">Query Operator</GUIRef> field.</ListItem>
					<ListItem>Enter the operand in this field. For example, John Smith. In this case, the operand is placed between quotes, as the data type of the field is string.</ListItem>
				</ProcedureList>
				<Paragraph class="Default">The query contains the following sentence:</Paragraph>
				<Paragraph class="Default">where</Paragraph>
				<Paragraph class="Default">ttaad200.name = "John Smith"</Paragraph>
				<Paragraph class="Default">If there are several ranges, AND is placed between two ranges.</Paragraph>
				<List><ListIntro>You can use the following operands:</ListIntro>
					<ListItem>Numeric constant (for example, 10)</ListItem>
					<ListItem>String constant (for example, "zzzzzz")</ListItem>
					<ListItem>Table fields (for example, ttaad200.user)</ListItem>
					<ListItem>Special fields (for example, enum constants and date)</ListItem>
				</List>
				<Paragraph class="Default">The syntax for comparing dates is: date(YYYY,MM,DD) or, date() for the current date.</Paragraph>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv382.refr"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Reference</Title>
			</Header>
			<FuncDesc>If the table field in the data dictionary has a reference to another table, this can be made use of in the query.</FuncDesc>
			<SimpleSection><Paragraph class="Default">
                                    If this check box is selected, you can use the reference.</Paragraph>
				<Paragraph class="Default">This prevents constructions such as:</Paragraph>
				<Paragraph class="Default">where</Paragraph>
				<Paragraph class="Default">tttxt002.ctxt &gt; 200 and</Paragraph>
				<Paragraph class="Default">tttxt002.ctxt = tttxt001.ctxt</Paragraph>
				<Paragraph class="Default">Instead, the following line is included in the where condition: where tttxt002.ctxt refers to tttxt001 and tttxt002.ctxt &gt; 200</Paragraph>
				<Paragraph class="Default">This prevents constructions such as: where tttxt002.ctxt &gt; 200 and tttxt002.ctxt = tttxt001.ctxt Instead, the following line is included in the where condition:</Paragraph>
				<Paragraph class="Default">where</Paragraph>
				<Paragraph class="Default">tttxt002.ctxt refers to tttxt001 and</Paragraph>
				<Paragraph class="Default">tttxt002.ctxt &gt; 200</Paragraph>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv382.reft"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Table</Title>
			</Header>
			<FuncDesc>The table to which the field is related.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="ttadv382.prnt"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Print</Title>
			</Header>
			<FuncDesc>
                                 If this check box is selected, the data in the selected field is printed.</FuncDesc>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<Paragraph class="Default">
                                    If this check box is cleared, you cannot change the print sequence in the <GUIRef href="/baanerp/tt/adv/ttadv3182m000#ttadv382.pord" role="manual">Print Seq.</GUIRef> field</Paragraph>
			</Note>
		</FieldHelp>
		<FieldHelp ID="ttadv382.sort"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Sort Mode</Title>
			</Header>
			<FuncDesc>In a query you can use an order by clause. You can use this clause to sort the data in the fields that must be printed.</FuncDesc>
			<SimpleSection><Paragraph class="Default">When you sort fields, the order by statement is added to the query as a last statement. If the sort is <GUIRef href="/baanerp/tt/domains/adv.qsrt#descending" role="option">Descending</GUIRef>, this is specified explicitly.</Paragraph>
			</SimpleSection>
			<SimpleSection><SectionTitle>
                                    Example
                                 </SectionTitle>
				<Paragraph class="Default">order by</Paragraph>
				<Paragraph class="Default">tttxt002.clan desc</Paragraph>
				<Paragraph class="Default">If no sort sequence is specified, the sequence is assumed to be <GUIRef href="/baanerp/tt/domains/adv.qsrt#ascending" role="option">Ascending</GUIRef>.</Paragraph>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv382.form"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">On Form</Title>
			</Header>
			<FuncDesc></FuncDesc>
			<SimpleSection><ProcedureList><ListIntro>Before <GUIRef href="/baanerp/tt" role="package">Tools</GUIRef> carries out a query, you can enter a selection on a form, within the conditions defined for the query. To do so:</ListIntro>
					<ListItem>Select this check box.</ListItem>
					<ListItem>When the query is carried out, a form appears for each table field for which this check box is selected. Enter the start and end values of the range.</ListItem>
				</ProcedureList>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv382.pord"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Print Seq.</Title>
			</Header>
			<FuncDesc>The sequence in which the content of the table fields is printed.</FuncDesc>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<Paragraph class="Default">If the <GUIRef href="/baanerp/tt/adv/ttadv3182s000#ttadv382.prnt" role="manual">Print</GUIRef> check box is cleared, you cannot modify the print sequence.</Paragraph>
			</Note>
		</FieldHelp>
		<FieldHelp ID="ttadv382.sord"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Sort Order</Title>
			</Header>
			<FuncDesc>The sequence in which the ranges of the fields that are printed can be selected on the form.</FuncDesc>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<Paragraph class="Default">The <GUIRef href="/baanerp/tt/adv/ttadv3182s000#ttadv382.sort" role="manual">Sort Mode</GUIRef> field must read <GUIRef href="/baanerp/tt/domains/adv.qsrt#ascending" role="option">Ascending</GUIRef> or <GUIRef href="/baanerp/tt/domains/adv.qsrt#descending" role="option">Descending</GUIRef>. If it is not, you cannot modify the sort order.</Paragraph>
			</Note>
		</FieldHelp>
		<FieldHelp ID="ttadv382.fose"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Form Seq.</Title>
			</Header>
			<FuncDesc>The sequence in which the fields appear on the form.</FuncDesc>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<Paragraph class="Default">If the <GUIRef href="/baanerp/tt/adv/ttadv3182s000#ttadv382.form" role="manual">On Form</GUIRef> check box is cleared, you cannot modify the sequence in which the fields appear on the form.</Paragraph>
			</Note>
		</FieldHelp>
	</Fields>
</Session>
