Skip to content

Tag: sql

Using SQL*Plus from command line

I have a small vbscript to load data and process it using sqlldr and sqlplus. I have 2 questions about sqlplus usage though: 1) Can I exec a stored procedure without using an .sql script file? e.g. sqlplus user/pass@server @exec proc_myname 2) Can I use .sql script files on a shared UNC path? e.g. sqlplus use…

Mysql issue with WHERE in clause

What is wrong with my “where in” clause in mysql? My two tables SEATS and REGISTERS look like this The query to fetch the matching results is Can someone figure out what’s wrong ? Thanks, Answer IN requires the list to be a literal list, not a comma-delimited string. Use FIND_IN_SET for that…

SQL SERVER Insert Addition?

So this seems like something that should be easy. But say I had an insert: and I wanted X to go from 1-100. (Knowing there are some of those numbers that already exist, so if the insert fails I want it to keep going) how would I do such a thing? Answer Here’s a slightly faster way