Bob-
By "returns nothing" do you mean ZERO rows? That's most bizarre.
Note that when you use + as the concatenation operator, the result will be blank (null) if any of the arguments is null. Try using & instead.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Jun 24, 2014, at 11:11 AM, 'Bob Phillips' bob.phillips@dsl.pipex.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Any idea why this query returns all of the rows fine
SELECT Staff.StaffID, Staff.Firstname+' '+Staff.Lastname AS Name, Staff.Role
FROM Staff;
whereas this query returns nothing
SELECT Staff.StaffID, Staff.Firstname+' '+Staff.Lastname AS Name, Staff.Role
FROM Staff
ORDER BY Staff.Priority;
Priority is a simple number field, 1,2,3,….
Only other thing that might be of any relevance is that it did work, I deleted all of the rows then re-inserted them.
(I tried renaming the field in case Access doesn't like Priority, but it made no difference).
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar