开发者

Microsoft Access Data Base .. Select Query

开发者 https://www.devze.com 2022-12-19 19:16 出处:网络
i am doing queries practice in Microsoft access. i want to concatenate the first name with the fax number.. the fax number is like (123)555-0103 ..

i am doing queries practice in Microsoft access. i want to concatenate the first name with the fax number.. the fax number is like (123)555-0103 .. i`m doing that

select [first name] +' ''s Fax Number is' +str(fax number) as [Mariya`s Fax Number] 
from employees where id =4;

but it is giving er开发者_运维技巧ror..


That would be:

select [first name] & " ''s Fax Number is " & [fax number] as [Mariya`s Fax Number] 
from employees where id =4

You should use & to concatenate
You should use '' for each single quote
You should use double quotes (") for strings.

0

精彩评论

暂无评论...
验证码 换一张
取 消