Tip1: Type ls -d */ to list directories within the current directory using Linux. (The reason why I am posting it here, is that I forgot it.
The other thing that threw me tonight, was that I had a tab or multiple spaces in an SQL script, and I just got a huge listing every time that I tried to load the script. Again, I solved this issue before by taking out the extra multiple spaces and tabs, but I had forgotten this.
Hope this helps someone.
Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts
Java MySQL SQL Tip Comparing Timestamp in Column to Current DateTime

Here is the syntax of the snippet in Java for comparison to the current datetime:
java.util.Date utilDate = new java.util.Date();
java.sql.Timestamp sqlDate = new java.sql.Timestamp(utilDate.getTime());
try {
stmt = conn.createStatement();
String myQueryString = "SELECT * FROM sale_table where saleStart < {ts '" + sqlDate.toString() + "' }";
Subscribe to:
Posts (Atom)