Knowledge Base

Custom Word Fields

Hint Ref: 020704170006
Hint Date: 17/04/2007

Hint Details:

Syntax:

Query with the ID of the customer/contract or reservation passed as <ID> (not as a subqery)

Example 1:  

To show the site detail question 'VAT Number' with a tagid of VNO, on a customer letter:

Catagory: Customer
Field Name: VATNumber
Description: Site VAT Number
SQL:

select textvalue from tagvalue join site on sitepin=id join customer where taglocation='S' and tagid='VNO' and customer.customerid=<ID>;