Your first query to get just frist part of posatal code(Before space) is
Query = "SELECT substring(Pub_PostCode,1,charindex(' ',Pub_PostCode)-1) pub_PostCode FROM Publication WHERE Pub_PublicationId="+ThisPublication;
Query.SelectSql();
In second query just add single quote in...