En COUNTRIES.sql

Материал из MstarProject Manual
Перейти к: навигация, поиск

/* Display of all TecDoc countries' and groups of countries list */

/* COU_ID - Country ID */

/* COU_CC - Country code (3-letter) */

/* COU_ISO2 - Country code (2-letter), corresponds to Internet domains of the countries: ru, de etc. */

/* COU_CURRENCY_CODE - Currency code */

/* COU_DES_TEXT - Name of the country */

/**/

/* To see the values of bit fields for each country or group of countries add the field output into a query: */

/* COU_CTM */

SET @LNG_ID = 16; /* 1 - German; 16 - Russian*/
SELECT	COU_ID,	COU_CC,	COU_ISO2,	COU_CURRENCY_CODE,	TEX_TEXT AS COU_DES_TEXT
FROM	           COUNTRIES
INNER JOIN DESIGNATIONS ON DES_ID = COU_DES_ID
INNER JOIN DES_TEXTS ON TEX_ID = DES_TEX_ID
WHERE	DES_LNG_ID = @LNG_ID
ORDER BY	COU_ID;