-- Opdracht 1 | Customers
/* Toon de cust_contact en een column met de eerste 4 karakters van de cust_contact beginnend vanaf positie 3. */
-- cust_contact (No column name)
-- John Smith hn S
-- Michelle Green chel
-- Jim Jones m Jo
-- Denise L. Stephens nise
-- Kim Howard m Ho
SELECT
-- Opdracht 2 | Customers
/* Toon de cust_contact en een column met de voornamen. */
-- cust_contact cust_first_name
-- John Smith John
-- Michelle Green Michelle
-- Jim Jones Jim
-- Denise L. Stephens Denise
-- Kim Howard Kim
SELECT
-- Opdracht 3 | Customers
/* Toon de cust_contact en een column met de achternamen. */
-- cust_contact cust_last_name
-- John Smith Smith
-- Michelle Green Green
-- Jim Jones Jones
-- Denise L. Stephens L. Stephens
-- Kim Howard Howard
SELECT
-- Opdracht 4
/* Bestudeer de onderstaande instructies. Toon uiteindelijk alleen de bestandsnaam. */
-- (No column name)
-- Bestand.docx
DECLARE @bestand varchar(50)
SET @bestand = 'C:\Map\Submap\Bestand.docx'
SELECT @bestand;
SELECT REVERSE(@bestand);
SELECT CHARINDEX('\', REVERSE(@bestand));
SELECT
Download hier het bestand.
