Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL and c# help

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-10-28 : 08:13:27
Luke writes "I am doing a project and having trouble with a select statement... It must be something simple, but I just can't get it...

The following is a code snippet containing my select statement for an access Database

"select customer.last_name, customer.first_name " +
"from customer order by customer.last_name, customer.first_name"
(the above statement works, but doesn't display the proper output.. I want to display a comma between the names)

the coressponding sql for oracle would be:

"select customer.last_name || ',' || customer.first_name " +
"from customer order by customer.last_name, customer.first_name"
(and I know this works as I used it in another applicatio)

what i want to do is display "Hay, Luke" in a dropdownlist
I can't figure out the escape sequence (|| ',' ||) or whatever it is called for access to display the comma

Any ideas?
Thanks
Lucas Hay"

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-10-29 : 12:20:52
In Access the concatenation operator is the & (ampersand). Use it like you do the | in Oracle.

-----------------------------------------------------
Words of Wisdom from AjarnMark, owner of Infoneering
Go to Top of Page
   

- Advertisement -