By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,207 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Combining 2 fields

P: 2
Hello,

I'm studying the basics of SQL.
Currently I'm using Northwind to experiment with SQL statements..
I ran into a problem..

Imagine:
Tablename: 'Employees'
Columnnames: 'FirstName, LastName'.

I want to show all the columns (Firstname, LastName) and add a third column called 'Code' (which consists of the first 3 chars of Firstname, and First 3 cahrs of Lastname)

Already tried some things with CONCAT (Access doesn't recognize the statement!?) and LEFT (Already know that I can combine 2 fields with "&")..

I'd really appreciate any help!
Sep 20 '07 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,638
Hello,

I'm studying the basics of SQL.
Currently I'm using Northwind to experiment with SQL statements..
I ran into a problem..

Imagine:
Tablename: 'Employees'
Columnnames: 'FirstName, LastName'.

I want to show all the columns (Firstname, LastName) and add a third column called 'Code' (which consists of the first 3 chars of Firstname, and First 3 cahrs of Lastname)

Already tried some things with CONCAT (Access doesn't recognize the statement!?) and LEFT (Already know that I can combine 2 fields with "&")..

I'd really appreciate any help!
Expand|Select|Wrap|Line Numbers
  1. SELECT FirstName, LastName, Left$([FirstName],3) & Left$([LastName],3) AS Code
  2. FROM tblEmployee;
Sep 20 '07 #2

P: 2
Thanks for your help, problem solved!
Sep 20 '07 #3

ADezii
Expert 5K+
P: 8,638
Thanks for your help, problem solved!
You are quite welcome.
Sep 20 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.