newdevs:code:import_csv_into_db
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:code:import_csv_into_db [2023/02/27 13:30] – [Importing the Data] tlittle | newdevs:code:import_csv_into_db [2024/06/13 10:52] (current) – more resources sleary | ||
---|---|---|---|
Line 14: | Line 14: | ||
This assumes that Column A is the no-dupe column (name, in this case) and Column B is the org. So basically, count the number of times that the name in A2 appears with the same org that's in B2. Then if we fill that down the entire column, if you get anything above a 1 you have a dupe that you can filter for and remove. | This assumes that Column A is the no-dupe column (name, in this case) and Column B is the org. So basically, count the number of times that the name in A2 appears with the same org that's in B2. Then if we fill that down the entire column, if you get anything above a 1 you have a dupe that you can filter for and remove. | ||
- | **TIP:** If you're not sure if your table includes a uniqueness constraint, here's a grep of Evergreen for the word " | + | **TIP:** If you're not sure if your table includes a uniqueness constraint, here's a grep of the Evergreen |
===== Importing the Data ===== | ===== Importing the Data ===== | ||
Line 60: | Line 60: | ||
So the second half is the SELECT--select all these from tlittle.acqprolist--which we then INSERT with the first portion. | So the second half is the SELECT--select all these from tlittle.acqprolist--which we then INSERT with the first portion. | ||
- | If it's successful, you'll get the INSERT 0 [NUMBER OF ROWS] message. You can then do a **select * from acq.provider** to see all your new data. | + | If it's successful, you'll get the INSERT 0 [NUMBER OF ROWS] message. You can then do a **select * from [YOUR TABLE]** to see all your new data. |
+ | |||
+ | ====== More Resources ====== | ||
+ | |||
+ | * [[https:// |
newdevs/code/import_csv_into_db.1677522654.txt.gz · Last modified: 2023/02/27 13:30 by tlittle