Fork me on GitHub
#sql
<
2018-02-01
>
seancorfield01:02:34

@jisaacs46 That's because functions return the value of their last expression -- drop-tables will return the second string.

seancorfield01:02:37

You would see that by running this code in the REPL: (drop-tables)

Jacob08:02:46

How do I drop multiple tables using my function?

joost-diepenmaat12:02:12

I think you want something like

joost-diepenmaat12:02:01

note that now drop-tables returns a vector of statements

Jacob14:02:38

Yes thank you I’ll try that out @joost-diepenmaat

Will19:02:10

How would I use and call sql queries with named parameters?

Will19:02:15

For example SELECT * FROM pay WHERE pay_start_dt = :date OR pay_end_dt = :date

seancorfield19:02:39

java.jdbc only supports positional parameters SELECT * FROM pay WHERE pay_start_dt = ? OR pay_end_dt = ? and you'd specify the actual date twice in the parameter list.

Will19:02:05

Ok, I’ll just do that, thanks @seancorfield

Will22:02:28

Can I use the as keyword in my selects? Ex. SELECT start_dt as payDate FROM pay

Will23:02:34

Nvm, I was getting an error but I guess it was something else