domenica 20 settembre 2009

VMware: query per estrarre dati da listino

Chiunque abbia cercato un prodotto specifico nel listino VMware si sara' sicuramente smarrito a causa della marea di dati che questo contiene. Vediamo come semplificarci la vita affrontando questo compito con l'aiuto di un database SQL:

Creare una tabella contenente il listino VMware (nell'esempio e' chiamata vm)

L'esempio seguente visualizza prodotti, part number, commenti, prezzo di listino e sconti partner relativi ai pacchetti di supporto Gold per un anno per Vsphere4 standard.
SELECT "Product Family", "Product", "Part Number", "Comments", "List price", "Sconto ENT", "Sconto PRO" FROM "vm" WHERE
"Product Family" = 'VS4'
AND "Product" LIKE '%Support%'
AND NOT "Product" LIKE '%Academic%'
AND NOT "Product" LIKE '%Platinum%'
AND NOT "Product" LIKE '%2 year%'
AND NOT "Product" LIKE '%3 year%'
AND NOT "Product" LIKE '%month%'
AND NOT "Product" LIKE '%Platinum%'
AND NOT "Product" LIKE '%Upgrade%'
AND NOT "Product" LIKE '%Essential%'
AND NOT "Product" LIKE '%Advanced%'
ORDER BY "Product" ASC

Modificando i parametri di LIKE e NOT LIKE potete estrarre le informazioni che vi servono.

Nessun commento:

Posta un commento