Catalog field contents

Attributes of a hierarchical catalog that have the Use property set to For item contain NULL values in the records that are groups. Similarly, those attributes that have the Use property set to For folder contain NULL in the records that are catalog items. Keep this in mind while writing queries to catalogs.

Example:

SELECT
	Items.Description, 
	Items.IsFolder, 
	Items.StockNumber, 
	CASE 
		WHEN (Items.StockNumber) IS NULL 
			THEN "NULL" 
		ELSE "NOT NULL" 
	END 
FROM 
	Catalog.Items AS Items

Result:

Name IsFolder Stock number Field1
Cigarettes true   NULL
Peter I lights false 18008 NOT NULL
Foods true   NULL
Sweets true   NULL
Truffles
false SN-999999 NOT NULL
Candy canes false SN-6666888 NOT NULL
Gummy bears
false SN-6666 NOT NULL
Mint chocolates
false SN-7777 NOT NULL
Fruities
false SN-999001 NOT NULL
Groceries true   NULL

This example shows that, for all the group records, the value of the StockNumber attribute contains NULL.

Next page: Complementing query result by days belonging to a specified period

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.