Tech-Today
How to output mysql query result into a file
See sql script below:
SELECT code, name, continent, region
FROM
country
INTO OUTFILE 'c:/temp/countries.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
-
Java Standalone Persistence Using Jpa
This application demonstrates the use of JPA in a standalone Java application. I. Getting StartedThis project is a standalone Java application that reads a server log file, parses and saves to a MySQL table access_log. It also executes a named query...
-
How To Write Left Join Sql On Entity Framework
In every limitation there is always a work around. For this specific limitation on entity framework 3.5 not having a left join. This is what I came up: For example you want to: SQL: select * from contact a left join country c on a.contactid=c.contactid...
-
Entity Framework Inserting Or Updating A Table With Foreign Key
For example you have 2 lookup entities: Country and Province And Your Person Entity has country and province field. In short both CountryId and ProvinceId are foreign keys to Person table. How to setup the Insert Statement (Update is almost the same,...
-
Using In Like Operator In Entity Framework
Entity Framework is a great advancement to sql unfortunately some old keywords are not supported. But reading the documentation and google you will find a lot of work arounds. Like for example in the case of IN operator. Old select * from table where...
-
This Article Explains How To Compare 2 Date Objects In Javascript
The best way to compare 2 Date objects using javascript is to get its long equivalent. For example we have a date in this format: mm-dd-yyyy and we want to compare them. We will declare the javascript function this way: function compareDate(a, b) { var...
Tech-Today