It’s often useful to concatenate two fields together in an SQL query. In PostgreSQL, fields may be concatenated using the || operator. The syntax is really simple. Just place the double bar between the fields you want to join, and (optionally) give a label to that new field. Strings can also be concatenated with the [...]
Posts Tagged ‘SET’
Concatenation in PostgreSQL
Posted: 15th June 2010 by Tim in PostgreSQLTags: concat, concatenation, database, PostgreSQL, result, server, SET, sql, string
Union and Intersection symbols in LaTeX
Posted: 22nd May 2010 by Tim in LaTeXTags: cap, cup, document, intersection, LaTeX, layout, math, maths, SET, sets, union
Union (∪) and Intersection (∩) symbols in LaTeX can be produced via the \cup and \cap definitions while in math mode. No extra packages are required to use these symbols. For example: Let $L_C = L_A \cap (L_B \cup L_C)$ will produce:
Checking for empty string in Bash
Posted: 19th May 2010 by Tim in BashTags: Bash, coding, dash, empty, language, linux, null, programming, script, scripting, SET, shell, string, terminal
In Bash you quite often need to check to see if a variable has been set or has a value other than an empty string. This can be done using the -n or -z string comparison operators. The -n operator checks whether the string is not null. Effectively, this will return true for every case [...]
USE [schema_name] in PostgreSQL
Posted: 17th November 2009 by Tim in PostgreSQLTags: database, MySQL, PostgreSQL, select, SET, USE
For those moving from MySQL to PostgreSQL, there are a few differences which you will need to get used to. One of these differences is the USE command, used to select the schema to select tables, views, etc from. PostgreSQL does not have the USE command. Instead, you can use: SET search_path TO [schema_name] For [...]