Hi, here is the problem I have to resolve, I'll try to be very clear about the situation (using MS Access):
- I have 2 tables (well, I have more but only two are relevant to the query) one table stores owner information (owner #, name, surname, phone number...) and the other stores car info (car #, brand, type, color and owner #)
- I want to make a query that gives me the owner info but only for owners that have MORE than one car (ie 2 or more). I tried many approaches but without any success, so far..
- It doesn't matter if I get the same user information 2,3,4 times, I will take the query and build a report with it, and I'll group the cars by users.
Any ideas for me? This really bothers me because I really don't have a clue and I'm sure I missed something easy... :(I'd use:SELECT ownerID
FROM cars
GROUP BY ownerID
HAVING 1 < Count(*);
-PatP|||Thanks, Pat, this correctly lists people with more than one car :) But if I want to da a report with the car info for each car that each owner of more than 1 car (err.. I wanna do a report with the user info + the car info in a report, grouped by the user), I must have the info of each car also.. Your query works like I want, but only list the users and I can't add car info on one line for each car.. Well, I know that sounded pretty bad.. Any idea?
Thanks for the quick answer there, Pat!|||Picky, picky, picky! Ok, at least the logic is good. Now let's try:SELECT *
FROM cars AS a
WHERE 1 < (SELECT Count(*)
FROM cars AS z
WHERE z.ownerID = a.ownerID);...and see if that am more gooder yet even. (How many ways can I butcher the English language... Is there a finite limit?)
-PatP|||All I want to say is: "Thanks alot, this is exactly what I wanted.. I'll be trying to add informations about the owners from the owner's table now.. But this is exactly what I meant!
Thanks for this, Pat, you are a real pal!|||No problemo! Always glad to "stir the pot" any way I can.
-PatPsql
Showing posts with label clear. Show all posts
Showing posts with label clear. Show all posts
Friday, March 23, 2012
Friday, February 24, 2012
List Control Properties
I saw this posting below, and I just want to be clear. I have a data
set with one Column, but many rows. I would like the data to display
horizontaly, then wrap to the next line. My data is actually displayed
in through Image controls. Im pulling the images from an external
path, on the web (http://hostname/images/image.jpg)
Am I understanding correctly, I cannot do that? Is there another
control that I can use instead? If there is can someone point me in
the direction on the properties I need to use?
Thanks,
rwiethorn
*************************************************************
From: Brian Welcker [MSFT] (bwelcker@.online.microsoft.com)
Subject: Re: List Control Shortcomings?
View: Complete Thread (2 articles)
Original Format
Newsgroups: microsoft.public.sqlserver.reportingsvcs
Date: 2004-05-31 12:29:15 PST
No. You can make the entire report multiple columns but you can't make
a
list repeat horizontally.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Mark" <anonymous@.discussions.microsoft.com> wrote in message
news:374C89FA-582F-4B82-8A8A-C61A4D58D215@.microsoft.com...
> I have a data set bound to a list control. Is there any way to configure the list control to output horizontally aswell as vertially?
>
> e.g. my dataset has 11 rows, can the first 6 be in 1 column, the next 5 in
another column.
----http://blogs.msdn.com/chrishays/archive/2004/07/23/193292.aspx
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0407301045.6cd21b18@.posting.google.com...
> I saw this posting below, and I just want to be clear. I have a data
> set with one Column, but many rows. I would like the data to display
> horizontaly, then wrap to the next line. My data is actually displayed
> in through Image controls. Im pulling the images from an external
> path, on the web (http://hostname/images/image.jpg)
> Am I understanding correctly, I cannot do that? Is there another
> control that I can use instead? If there is can someone point me in
> the direction on the properties I need to use?
> Thanks,
> rwiethorn
> *************************************************************
> From: Brian Welcker [MSFT] (bwelcker@.online.microsoft.com)
> Subject: Re: List Control Shortcomings?
> View: Complete Thread (2 articles)
> Original Format
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Date: 2004-05-31 12:29:15 PST
>
> No. You can make the entire report multiple columns but you can't make
> a
> list repeat horizontally.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Mark" <anonymous@.discussions.microsoft.com> wrote in message
> news:374C89FA-582F-4B82-8A8A-C61A4D58D215@.microsoft.com...
> > I have a data set bound to a list control. Is there any way to configure
the list control to output horizontally aswell as vertially?
> >
> > e.g. my dataset has 11 rows, can the first 6 be in 1 column, the next 5
in
> another column.
>
> ----
--
set with one Column, but many rows. I would like the data to display
horizontaly, then wrap to the next line. My data is actually displayed
in through Image controls. Im pulling the images from an external
path, on the web (http://hostname/images/image.jpg)
Am I understanding correctly, I cannot do that? Is there another
control that I can use instead? If there is can someone point me in
the direction on the properties I need to use?
Thanks,
rwiethorn
*************************************************************
From: Brian Welcker [MSFT] (bwelcker@.online.microsoft.com)
Subject: Re: List Control Shortcomings?
View: Complete Thread (2 articles)
Original Format
Newsgroups: microsoft.public.sqlserver.reportingsvcs
Date: 2004-05-31 12:29:15 PST
No. You can make the entire report multiple columns but you can't make
a
list repeat horizontally.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Mark" <anonymous@.discussions.microsoft.com> wrote in message
news:374C89FA-582F-4B82-8A8A-C61A4D58D215@.microsoft.com...
> I have a data set bound to a list control. Is there any way to configure the list control to output horizontally aswell as vertially?
>
> e.g. my dataset has 11 rows, can the first 6 be in 1 column, the next 5 in
another column.
----http://blogs.msdn.com/chrishays/archive/2004/07/23/193292.aspx
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0407301045.6cd21b18@.posting.google.com...
> I saw this posting below, and I just want to be clear. I have a data
> set with one Column, but many rows. I would like the data to display
> horizontaly, then wrap to the next line. My data is actually displayed
> in through Image controls. Im pulling the images from an external
> path, on the web (http://hostname/images/image.jpg)
> Am I understanding correctly, I cannot do that? Is there another
> control that I can use instead? If there is can someone point me in
> the direction on the properties I need to use?
> Thanks,
> rwiethorn
> *************************************************************
> From: Brian Welcker [MSFT] (bwelcker@.online.microsoft.com)
> Subject: Re: List Control Shortcomings?
> View: Complete Thread (2 articles)
> Original Format
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Date: 2004-05-31 12:29:15 PST
>
> No. You can make the entire report multiple columns but you can't make
> a
> list repeat horizontally.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Mark" <anonymous@.discussions.microsoft.com> wrote in message
> news:374C89FA-582F-4B82-8A8A-C61A4D58D215@.microsoft.com...
> > I have a data set bound to a list control. Is there any way to configure
the list control to output horizontally aswell as vertially?
> >
> > e.g. my dataset has 11 rows, can the first 6 be in 1 column, the next 5
in
> another column.
>
> ----
--
Subscribe to:
Posts (Atom)