Learn with Abdou

Chapter 10 · Concept 1 of 5 · Practice

A blank still becomes a word of spaces

.import, the staging table, NULLIF(TRIM()) · level 1 of 6

Opening your saved work…

Sign in to save across devices → · Download your guest work before switching accounts.

A blank still becomes a word of spaces · .import, the staging table, NULLIF(TRIM()) · level 1 of 6

What the import stored

Level 1: Watch it answered · Exercise 1 of 2

Before cleaning anything, look at what the import stored: serial, the raw note and the note's storage type, for all six staged rows in file order.

Data: Trail Gear: build rehearsal.

Why it works, clause by clause

  1. FROM stg_items: the staging table, the file exactly as it arrived.
  2. typeof(note) AS storage: the type SQLite stored. Every note is text, TG-106's empty cell and TG-102's three spaces included.
  3. ORDER BY rowid: file order. Row 1 is TG-101, the first line under the header.

From the reading: Import everything as text first, paragraph 2

The queryOpening the database…
SELECT serial, note, typeof(note) AS storage
FROM stg_items
ORDER BY rowid;
Open in the playground

Query results

Run it to see the result here.

Run it to see the result here.

Practice here is evidence for you and your instructor, never a grade. Grades live in Canvas.