Lenny
Lenny

Reputation: 65

Is it possible to export certain values from specific rows to a CSV in Datagrip

I'm wanting to export certain rows based on a user id & the time the row was created to a CSV. For example, I'd like to grab and export to the CSV a clock_in_time and clock_out_time if the user_id == "Bob" and the creation_time was less than two weeks ago. I'm hoping for a built-in way in Datagrip but am open to other options. Thanks for any help!

Upvotes: 0

Views: 825

Answers (1)

moscas
moscas

Reputation: 10335

  1. Write the query that retrieves the needed records. In your case it can be smth like
SELECTclock_in_time, clock_out_time 
FROM table
WHERE user_id = "Bob"
  1. Export the result to the CSV via Export button on the result's toolbar: enter image description here

Upvotes: 1

Related Questions