SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: View not working, select working
Hybrid View
-
Nov 20, 2009, 01:33 #1
View not working, select working
When I run this, I get an empty set of results back (no errors though):
Code:drop view if exists wrentals; create view wrentals as select c.CustName from customer as c join transactions as t on t.MemberID=c.MemberID group by c.CustName;
Code:select c.CustName from customer as c join transactions as t on t.MemberID=c.MemberID group by c.CustName;
-
Nov 20, 2009, 02:51 #2select c.CustName from customer as c
join transactions as t on t.MemberID=c.MemberID
group by c.CustName;
why don't you use specific join (join simply means INNER JOIN)?
Before posting please do format your code with proper wrapping.
formatted mysql code:
-
Nov 20, 2009, 02:53 #3
Maybe I misunderstand your question, but the creation of a view doesn't return any result set, or does it?
Guido - Community Team Leader
The Votes Are In: The Winners of the 2013 Community Awards are...
Blog - Free Flash Slideshow Widget
-
Nov 20, 2009, 03:50 #4
- Join Date
- Jul 2005
- Location
- Kelowna, BC
- Posts
- 289
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Adrian Schneider - Web Developer
-
Nov 20, 2009, 13:57 #5
Not sure what I did differently but all of a sudden it works.
Thanks everyone!
-
Nov 20, 2009, 14:27 #6
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
that's called the "aoas" effect
post a question on a forum, and all of a sudden it works again
Bookmarks