En MODELS.sql — различия между версиями

Материал из MstarProject Manual
Перейти к: навигация, поиск
(Created page with "/* Display of model list for a specified car brand (MFA_ID) */ /* MOD_ID - Model number */ MOD_CDS_TEXT - Model name: /* MOD_PCON_START - YYYYMM: model release Year/month...")
 
(нет различий)

Текущая версия на 09:41, 15 мая 2013

/* Display of model list for a specified car brand (MFA_ID) */

/* MOD_ID - Model number */

/* MOD_CDS_TEXT - Model name */

/* MOD_PCON_START - YYYYMM: model release Year/month */

/* MOD_PCON_END - YYYYMM: model production termination Year/month (NULL - unlimited) */

SET @MFA_ID = 502; /* ALFA ROMEO */
SET @LNG_ID = 16; /* 1 - German; 16 - Russian */
SELECT	MOD_ID,	TEX_TEXT AS MOD_CDS_TEXT,	MOD_PCON_START,	MOD_PCON_END
FROM	           MODELS
INNER JOIN COUNTRY_DESIGNATIONS ON CDS_ID = MOD_CDS_ID
INNER JOIN DES_TEXTS ON TEX_ID = CDS_TEX_ID
WHERE	MOD_MFA_ID = @MFA_ID AND	CDS_LNG_ID = @LNG_ID
ORDER BY	MOD_CDS_TEXT
LIMIT	100;