SQL Solution Needed - Use Subquery to move groups of rows to columns

Below are 2 tables/queries: one is the source the other is the desired
result. I scoured the newsgroups and my access books - seems like
queries with subqueries and/or a possible a crosstab query on is in
order. I'm stuck on how to get started though.

Any help would be great.

SOURCE TABLE OR QUERY
ToolID	CompanyName	TicketDate	DeliveryTicket   RecievingTicket
1	Company 1	3/2/2009	No	       Yes
1	Company 2	3/3/2009	Yes	       No
1	Company 2	7/21/2009	No	       Yes
1	Company 2	7/28/2009	Yes	       No
1	Company 2	8/4/2009	No	       Yes
1	Company 3	9/1/2009	Yes	       No
2	Company 1	3/2/2009	No	       Yes
2	Company 2	3/3/2009	Yes	       No
2	Company 2	6/4/2009	No	       Yes
2	Company 3	6/9/2009	Yes	       No
2	Company 3	6/23/2009	No	       Yes
2	Company 4	6/25/2009	Yes	       No
2	Company 4	8/26/2009	No	       Yes
2	Company 5	9/15/2009	Yes	       No


DESIRED QUERY RESULTS
ToolID	CompanyName	Delivery Date	Rec'd Date
1	Company 2	3/3/2009	                7/21/2009
1	Company 2	7/28/2009	                8/4/2009
2	Company 2	3/3/2009	                6/4/2009
2	Company 3	6/9/2009	                6/23/2009
2	Company 4	6/25/2009	                8/26/2009

By the way, I didn't want to put too much info out there yet so if my
question needs clarifying please let me know.


0
HouBMan
1/26/2010 11:35:09 PM
access.queries 6343 articles. 1 followers. Follow

4 Replies
1286 Views

Similar Articles

[PageSpeed] 26

Hi,

     The this which does a self join on the ToolID and the CompanyName
(CompanyID would be better) and uses a subquery to get the next Ticket date
for that ToolID and CompanyName.  (Note spelling correction of
ReceivingTicket.):

SELECT A.ToolID, A.CompanyName, A.TicketDate, B.TicketDate
FROM tblToolTickets AS A INNER JOIN tblToolTickets AS B ON (A.CompanyName = B.
CompanyName) AND (A.ToolID = B.ToolID)
WHERE (((B.TicketDate)=(select Min(TicketDate) from tblToolTickets as C where
C.ToolID = A.ToolID and C.CompanyName = A.CompanyName and C.TicketDate > A.
TicketDate)) AND ((A.DeliveryTicket)=Yes) AND ((A.ReceivingTicket)=No) AND (
(B.DeliveryTicket)=No) AND ((B.ReceivingTicket)=Yes))
ORDER BY A.ToolID, A.CompanyName, A.TicketDate;

           Clifford Bass

             Clifford Bass

HouBMan wrote:
>Below are 2 tables/queries: one is the source the other is the desired
>result. I scoured the newsgroups and my access books - seems like
>queries with subqueries and/or a possible a crosstab query on is in
>order. I'm stuck on how to get started though.
>
>Any help would be great.
>
>SOURCE TABLE OR QUERY
>ToolID	CompanyName	TicketDate	DeliveryTicket   RecievingTicket
>1	Company 1	3/2/2009	No	       Yes
>1	Company 2	3/3/2009	Yes	       No
>1	Company 2	7/21/2009	No	       Yes
>1	Company 2	7/28/2009	Yes	       No
>1	Company 2	8/4/2009	No	       Yes
>1	Company 3	9/1/2009	Yes	       No
>2	Company 1	3/2/2009	No	       Yes
>2	Company 2	3/3/2009	Yes	       No
>2	Company 2	6/4/2009	No	       Yes
>2	Company 3	6/9/2009	Yes	       No
>2	Company 3	6/23/2009	No	       Yes
>2	Company 4	6/25/2009	Yes	       No
>2	Company 4	8/26/2009	No	       Yes
>2	Company 5	9/15/2009	Yes	       No
>
>DESIRED QUERY RESULTS
>ToolID	CompanyName	Delivery Date	Rec'd Date
>1	Company 2	3/3/2009	                7/21/2009
>1	Company 2	7/28/2009	                8/4/2009
>2	Company 2	3/3/2009	                6/4/2009
>2	Company 3	6/9/2009	                6/23/2009
>2	Company 4	6/25/2009	                8/26/2009
>
>By the way, I didn't want to put too much info out there yet so if my
>question needs clarifying please let me know.

-- 
Message posted via http://www.accessmonster.com

0
Clifford
1/27/2010 12:45:57 AM
Cliff,
Thanks so much - I'm gonna look at this piece by piece and get back to
you with any questions - thanks!

On Jan 26, 6:45=A0pm, "Clifford Bass via AccessMonster.com" <u48370@uwe>
wrote:
> Hi,
>
> =A0 =A0 =A0The this which does a self join on the ToolID and the CompanyN=
ame
> (CompanyID would be better) and uses a subquery to get the next Ticket da=
te
> for that ToolID and CompanyName. =A0(Note spelling correction of
> ReceivingTicket.):
>
> SELECT A.ToolID, A.CompanyName, A.TicketDate, B.TicketDate
> FROM tblToolTickets AS A INNER JOIN tblToolTickets AS B ON (A.CompanyName=
 =3D B.
> CompanyName) AND (A.ToolID =3D B.ToolID)
> WHERE (((B.TicketDate)=3D(select Min(TicketDate) from tblToolTickets as C=
 where
> C.ToolID =3D A.ToolID and C.CompanyName =3D A.CompanyName and C.TicketDat=
e > A.
> TicketDate)) AND ((A.DeliveryTicket)=3DYes) AND ((A.ReceivingTicket)=3DNo=
) AND (
> (B.DeliveryTicket)=3DNo) AND ((B.ReceivingTicket)=3DYes))
> ORDER BY A.ToolID, A.CompanyName, A.TicketDate;
>
> =A0 =A0 =A0 =A0 =A0 =A0Clifford Bass
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0Clifford Bass
>
>
>
>
>
> HouBMan wrote:
> >Below are 2 tables/queries: one is the source the other is the desired
> >result. I scoured the newsgroups and my access books - seems like
> >queries with subqueries and/or a possible a crosstab query on is in
> >order. I'm stuck on how to get started though.
>
> >Any help would be great.
>
> >SOURCE TABLE OR QUERY
> >ToolID =A0 =A0 =A0CompanyName =A0 =A0 TicketDate =A0 =A0 =A0DeliveryTick=
et =A0 RecievingTicket
> >1 =A0 Company 1 =A0 =A0 =A0 3/2/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> >1 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >1 =A0 Company 2 =A0 =A0 =A0 7/21/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =A0=
 =A0 Yes
> >1 =A0 Company 2 =A0 =A0 =A0 7/28/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >1 =A0 Company 2 =A0 =A0 =A0 8/4/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> >1 =A0 Company 3 =A0 =A0 =A0 9/1/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >2 =A0 Company 1 =A0 =A0 =A0 3/2/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> >2 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >2 =A0 Company 2 =A0 =A0 =A0 6/4/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> >2 =A0 Company 3 =A0 =A0 =A0 6/9/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >2 =A0 Company 3 =A0 =A0 =A0 6/23/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =A0=
 =A0 Yes
> >2 =A0 Company 4 =A0 =A0 =A0 6/25/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> >2 =A0 Company 4 =A0 =A0 =A0 8/26/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =A0=
 =A0 Yes
> >2 =A0 Company 5 =A0 =A0 =A0 9/15/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
>
> >DESIRED QUERY RESULTS
> >ToolID =A0 =A0 =A0CompanyName =A0 =A0 Delivery Date =A0 Rec'd Date
> >1 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A07/21/2009
> >1 =A0 Company 2 =A0 =A0 =A0 7/28/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 8/4/2009
> >2 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A06/4/2009
> >2 =A0 Company 3 =A0 =A0 =A0 6/9/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A06/23/2009
> >2 =A0 Company 4 =A0 =A0 =A0 6/25/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 8/26/2009
>
> >By the way, I didn't want to put too much info out there yet so if my
> >question needs clarifying please let me know.
>
> --
> Message posted viahttp://www.accessmonster.com- Hide quoted text -
>
> - Show quoted text -

0
HouBMan
1/27/2010 12:53:19 AM
Cliff,

Thanks again

I spent quite a bit of time disecting your answer but I got it! I
don't think I had any idea how powerful sub-queries could be. Now I
have a bit more of the idea.

Brett

On Jan 26, 6:53=A0pm, HouBMan <brettsp...@gmail.com> wrote:
> Cliff,
> Thanks so much - I'm gonna look at this piece by piece and get back to
> you with any questions - thanks!
>
> On Jan 26, 6:45=A0pm, "Clifford Bass via AccessMonster.com" <u48370@uwe>
> wrote:
>
>
>
> > Hi,
>
> > =A0 =A0 =A0The this which does a self join on the ToolID and the Compan=
yName
> > (CompanyID would be better) and uses a subquery to get the next Ticket =
date
> > for that ToolID and CompanyName. =A0(Note spelling correction of
> > ReceivingTicket.):
>
> > SELECT A.ToolID, A.CompanyName, A.TicketDate, B.TicketDate
> > FROM tblToolTickets AS A INNER JOIN tblToolTickets AS B ON (A.CompanyNa=
me =3D B.
> > CompanyName) AND (A.ToolID =3D B.ToolID)
> > WHERE (((B.TicketDate)=3D(select Min(TicketDate) from tblToolTickets as=
 C where
> > C.ToolID =3D A.ToolID and C.CompanyName =3D A.CompanyName and C.TicketD=
ate > A.
> > TicketDate)) AND ((A.DeliveryTicket)=3DYes) AND ((A.ReceivingTicket)=3D=
No) AND (
> > (B.DeliveryTicket)=3DNo) AND ((B.ReceivingTicket)=3DYes))
> > ORDER BY A.ToolID, A.CompanyName, A.TicketDate;
>
> > =A0 =A0 =A0 =A0 =A0 =A0Clifford Bass
>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0Clifford Bass
>
> >HouBManwrote:
> > >Below are 2 tables/queries: one is the source the other is the desired
> > >result. I scoured the newsgroups and myaccessbooks - seems like
> > >querieswith subqueries and/or a possible a crosstab query on is in
> > >order. I'm stuck on how to get started though.
>
> > >Any help would be great.
>
> > >SOURCE TABLE OR QUERY
> > >ToolID =A0 =A0 =A0CompanyName =A0 =A0 TicketDate =A0 =A0 =A0DeliveryTi=
cket =A0 RecievingTicket
> > >1 =A0 Company 1 =A0 =A0 =A0 3/2/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0=
 =A0 =A0 Yes
> > >1 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =
=A0 =A0 =A0No
> > >1 =A0 Company 2 =A0 =A0 =A0 7/21/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> > >1 =A0 Company 2 =A0 =A0 =A0 7/28/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> > >1 =A0 Company 2 =A0 =A0 =A0 8/4/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0=
 =A0 =A0 Yes
> > >1 =A0 Company 3 =A0 =A0 =A0 9/1/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =
=A0 =A0 =A0No
> > >2 =A0 Company 1 =A0 =A0 =A0 3/2/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0=
 =A0 =A0 Yes
> > >2 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =
=A0 =A0 =A0No
> > >2 =A0 Company 2 =A0 =A0 =A0 6/4/2009 =A0 =A0 =A0 =A0No =A0 =A0 =A0 =A0=
 =A0 =A0 Yes
> > >2 =A0 Company 3 =A0 =A0 =A0 6/9/2009 =A0 =A0 =A0 =A0Yes =A0 =A0 =A0 =
=A0 =A0 =A0No
> > >2 =A0 Company 3 =A0 =A0 =A0 6/23/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> > >2 =A0 Company 4 =A0 =A0 =A0 6/25/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
> > >2 =A0 Company 4 =A0 =A0 =A0 8/26/2009 =A0 =A0 =A0 No =A0 =A0 =A0 =A0 =
=A0 =A0 Yes
> > >2 =A0 Company 5 =A0 =A0 =A0 9/15/2009 =A0 =A0 =A0 Yes =A0 =A0 =A0 =A0 =
=A0 =A0No
>
> > >DESIRED QUERY RESULTS
> > >ToolID =A0 =A0 =A0CompanyName =A0 =A0 Delivery Date =A0 Rec'd Date
> > >1 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A07/21/2009
> > >1 =A0 Company 2 =A0 =A0 =A0 7/28/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 8/4/2009
> > >2 =A0 Company 2 =A0 =A0 =A0 3/3/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A06/4/2009
> > >2 =A0 Company 3 =A0 =A0 =A0 6/9/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A06/23/2009
> > >2 =A0 Company 4 =A0 =A0 =A0 6/25/2009 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 8/26/2009
>
> > >By the way, I didn't want to put too much info out there yet so if my
> > >question needs clarifying please let me know.
>
> > --
> > Message posted viahttp://www.accessmonster.com-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

0
HouBMan
1/29/2010 6:02:59 PM
Hi Brett,

     Glad I was able to help you and increase your knowledge.  You are
welcome!

            Clifford Bass

HouBMan wrote:
>Cliff,
>
>Thanks again
>
>I spent quite a bit of time disecting your answer but I got it! I
>don't think I had any idea how powerful sub-queries could be. Now I
>have a bit more of the idea.
>
>Brett

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201001/1

0
Clifford
1/29/2010 6:28:08 PM
Reply:

Similar Artilces:

Calling Dex Procedures from SQL
Is there any way to call dex procs from SQL or VB code? Jed There is an undocumented and unsupported method of calling Dex code from VBA. However, I know of no method of calling Dexterity from SQL. Please email me if you want an example, just remove the online. from the address below. David Musgrave [MSFT] Senior Development Consultant MBS Services - Asia Pacific Microsoft Business Solutions http://www.microsoft.com/BusinessSolutions mailto:dmusgrav@online.microsoft.com Any views contained within are my personal views and not necessarily Microsoft Business Solutions policy. This p...

Need with with 4125 RWW Not Working
SBS2008 Remote from Win 7 Pro and XP Pro clients I am having an issue with getting RWW to work in the SBS 2008 environment. Basically I can connect to the server via \remote from a off-site location but when I try and "Connect to a Computer" I get the following message. "The wizard cannot configure Remote Desktop Connection settings. Make sure that the client version of the Remote Desktop Protocol (RDP) 6.0 or later is installed on this computer." This also includes when I try and connect to the SBS 2008 server itself. At first I thought when this didn...

What is a helper column?
I cannot find any information concerning a "helper Column" in the help files. Could someone point me in the right direction as to how to find and use this "helper column? Thanks, It's not an Excel term, it is more generalised than that. In essence, it means using a column to store some intermediate results (using a formula say), that can make further -- HTH RP (remove nothere from the email address if mailing direct) "RMPPOD" <RMPPOD@discussions.microsoft.com> wrote in message news:FB651A2F-666D-40F6-BBB3-1B1C5C0FDA3F@microsoft.com... > I canno...

Reference last entry in column
In Excel 2002, I need a way to reference the last entry in a column of data that has data added to it on a regular basis. Is there a way to do this that is fairly simple? I am trying to make a checkbook register in excel and I want to have the current balance shown in one place at the top so that when the list of entries gets long the user doesn't have to scroll to the bottom to see the current balance. I also want to have it show on a different sheet where the current balances for different accounts can all be seen one one page. Any help would be appreciated. Hi see: http://www.xl...

Moving Data From One Form To Another
Hi all, I have a form that shows student information (primary key = student ID). I have buttons on this form to bring up other forms that can be used to register student for certain events. The first form is data from a student table, while the ones for registering the student are connected to a table s called Students Registered for an event (primary key = Student ID + Event ID). The problem is, then when you open the registration form, you have to manually put in the Student ID as input. I would like to pull whatever Student ID was currently showing in the Student form to be automatically p...

is SQL 2000 architecture different SQL Server 2005 / 2008 architecture?
Hi I have a book "inside SQL Server 2000" by Kalen Delaney, which I have been told is a good book. I am going backwards... reading about the sql server architecture in chapter 3 of the book. As I'm reading... I was wondering is it different SQL Server 2000 vs SQL Server 2005/2008? Also where can I find a book/or link that can give me more details about the internals on architecture? Thank you norm (normanchan@gmail.com) writes: > Hi I have a book "inside SQL Server 2000" by Kalen Delaney, which I > have been told is a good book. I am g...

Group select view others' calendar outlook 2007
Is there some sort of shortcut to select/view a group of other peoples calender? Now I have to check the box of everyone, and then uncheck everyone when I only want to see my own calendar. see if http://www.publicshareware.com/outlook-public-calendar-choice.php does what you need. if not, google for AutoIt. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: EMO-NEWSLET...

How can I group a set of documents needs to be opened repetatively
How can I group a set of documents needs to be opened repetatively? Hi Prithvi, You can open all the required documents and then choose File + Save WOrkspace. The next time you want them all open just open the Workspace. Judith -- Hope this helps "Prithvi" wrote: > How can I group a set of documents needs to be opened repetatively? ...

Moving customizations from SQL 2k to SQL 2k5 CRM
This may be a non-issue but I wanted to check to see if anyone has done this and ran into issues. I have the XML customization files from our previous install of CRM 3.0 with SQL 2k database. I now want to import and publish these same customizations to CRM 3.0 on SQL 2k5. Has anyone done this or can point me to documentation that tells about the success or issues for doing this? Thanks. On 7 Feb., 06:35, Chris Treanor <ChrisTrea...@discussions.microsoft.com> wrote: > This may be a non-issue but I wanted to check to see if anyone has done this > and ran into issues. > &...

Help needed urgently
Hi, Im trying to check that one row of data satifies a criteria, then if it does it counts an entry in another column adjescent to it. Example: - Column A - Column B Blay - Y Blay - N Blay - Y Chop - N Chop - N High - Y What i would be asking (of a much bigger table) is If Column A = Blaydon and then column B (same row) = Y, then count. In this example I would want 2 returned as the answer. Is this possible? Thanks -- Andy Try one of these... Use cells to hold the criteria: D2 = Blaydon E2 = Y If you're using Excel 2007 or later: =COUNTIFS(A2:A7,...

user account disabled. need to redirect his e-mail
Hi, I have a situation: User left the company. I disabled his AD account. His boss asking to redirect this user new incoming e-mail to other user. Can you suggest an appropriate solution. Do I have to activate his account and just change a password or I can keep this account blocked. Thanks. Michael. On Sat, 7 Jan 2006 18:55:02 -0800, "MLA!" <MLA@discussions.microsoft.com> wrote: >Hi, >I have a situation: > >User left the company. >I disabled his AD account. >His boss asking to redirect this user new incoming e-mail to other user. > >Can you sugge...

CRM 3.0 Install Error with SQL Reporting Services and SQL 2005
Hi, Doing a CRM 3.0 Server installation. During the last page of the install wizard (or what I assume is the last page) when I goes through and does verification I get a red X next to SQL Reporting Services. The message I receive when I look at the details is: ***** The specified path is not a metabase path. Parameter name: path ***** Now SRS is installed and working. I put in the URL: http://<servername>/reportserver and every other variation on that I can find. Thoughts? Alan try http://servername/reports also assuming you did not use ssl... =======================...

Need to login every once in awhile through Outlook
Using Outlook to gain access to CRM, every once in awhile our users need to input their network login credentials. Is there a way to put a stop to this? Thanks On Aug 10, 10:52 am, circulent <circul...@discussions.microsoft.com> wrote: > Using Outlook to gain access to CRM, every once in awhile our users need to > input their network login credentials. > > Is there a way to put a stop to this? > > Thanks Is the CRM address in the LOCAL Intranet under IE - Tools- Internet Options - Secruity it is now. thanks "InFiNiTeX" wrote: > On Aug 10, 10:52 am...

Need help adding a formula to to cell with conditional formatting
Hi, I have a cell with the following conditional formatting =AND(S2<TODAY(),W2="",D2="x") If these conditions are met the cell S2 is bolded in red. I need to add the following to the cell "if the date in U2 is earlier than the date in S2 then bold S2 in black" S2 and U2 are calendar dates. Could somebody help me with a formula for the above and how to add it to the existing formula? Thanks If you want to use the formula as an another condition the use the below:- =AND(U2<>"",S2<>"",U2<S2) If you wa...

Unwanted "text to columns" when pasting text
Hi! I double-click a source cell, select some text in it and copy it via CTRL-C. Then I click a target cell and press CRTL-V to paste the selected text into this cell. However, EXEL doese an unwanted "text to columns" here, thus the text is not pasted into the target cell, but each word is pasted in a seperate cell. Example: Double-click cell A1, enter "A B" (A space B) in A. Press Return. Double-click A1 again, select the "A B" and press CRTL-C. Now click (once!) on cell B1, and press CRTL-V: In result, cell B1 contains the "A" while the "B"...

Why are their 65,536 rows in an Excel spreadsheet?
Does anyone know the answer to this question? Homework? -- Don Guillett SalesAid Software donaldb@281.com "Dawn" <anonymous@discussions.microsoft.com> wrote in message news:036d01c3a7ec$0f589590$a601280a@phx.gbl... > Does anyone know the answer to this question? Dawn, The number 65,536 is 2^16, a nice round number in binary. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com chip@cpearson.com "Dawn" <anonymous@discussions.microsoft.com> wrote in message news:036d01c3a7ec$0f589590$a601280a@phx.gbl...

SQL 'for xml' and C# example??
I'm missing some piece of the puzzle. I'm using 'for xml' type queries from SQL2K - and now trying to change the front-end from ADO to C#, I can't quite figure it out.. It seems that I could use an XmlReader.. and somehow use that instead of a DataReader.. but that didn't work.. I tried using a DataReader and get the byte array - but that wasn't right. SQL returns formatted XML, I need to load that XML into an XmlDocument somehow without ANY molestation of that dom. Any ideas? Examples? Missing links???? thanks THANKS!! I've been looking for the answer to ...

How to protect a shared sheet but allow groups to expand
Hi, I am running Office XP and I am having a problem with protection and groups. On one of my sheets I have grouped some rows so that the plus/minus sign is on the left. Some of the cells are unprotected so they can be updated when the sheet is protected. The problem is that when the sheet is protected you cannot expand or collapse the groups. I found some code on Google that runs when you open the workbook and allows the groups to function properly and the codes works great. However when I share the workbook the code no longer functions and in fact generates an error upon opening the ...

sql summarizing help
Hi All, Given: table1 --------- id, cdate, weeksago, amount, typeid, timeclose 496, 2010-02-11, 0, 450, 3, 1 490, 2010-02-01, 1, 200, 4, 1 491, 2010-02-01, 1, 350, 2, 2 493, 2010-02-01, 1, 500, 5, 1 489, 2010-01-21, 3, 150, 2, 1 136, 2010-01-12, 4, 500, 3, 2 137, 2010-01-12, 4, 100, 3, 1 138, 2010-01-12, 4, 500, 2, 1 1. i'm trying to create a sql that will give me a summary resultset grouped by weeksago. 2. i want to sum the columns and get counts based on typeid. 3. avg of timeclose here's the sql i have: select weeksago, , (sum(timeClose)/(count(timeclo...

Update multivalue field in table from form with SQL
Access 2007 on Vista I am using a form to establish the variables for a report before it is created. One field on the underlying table is a multivalue field, and the form includes a multi-select combo box control. After selections are made and the OK button on the multi-select combo drop down is clicked, focus moves to the next control. I have discovered though, that the underlying table does not update immediately, but does so correctly when I close the form. This sequence does not deliver the proper report data, so I need a way to immediately update the underlying table (m...

Hosting Tournament, need formula.
Ok, Here's my story. I am currently hosting a tournament among friends which are split into different groups (32 people, 8 groups of 4). Anyway I am making a spreadsheet to make it all 'easier.' Using Excel 2002 Anyway: [image: http://img.photobucket.com/albums/v158/stevendgates/ss4.jpg] Where: FORMULA FOR R4 IS: =IF(M4=\"\",\"\",IF(M4>Q4,K4,P4)) FORMULA FOR S4 IS: =IF(R4=\"\",\"\",IF(R4=K4,P4,K4)) Ok, here's my problem. If a Draw was to happen, the R4 field will always give me the P4 Field and the S4 field will make the K4 value...

can't get CListCtrl groups to work
Env.: VS2003, Common Controls v6 Hi All, I have this CListCtrl in report view displaying a bunch of items. I wanted to use item groups (a new feature in common controls v6). You know, such as in the Network Connections in Explorer under Win XP : Dial-up, Incoming, LAN or High-speed Internet... Docs are close to inexistant but I thought it shouldn't be to difficult : - call List.EnableGroupView() - call List.InsertGroup() to create each group. - call List.MoveItemToGroup() to place each item in a group. Even though not clearly documented in MS docs, these steps are the same as describ...

Refer to SQL statements globally
I have two large SQL statements that I need to use across several forms, reports, etc. Rather than repeat them in each form, I'm trying to store and reference them globally. For example, I'd like to store strSQL1 and strSQL2 in a global module, so I can use either like this in a form: Random form: Me!lstResults.RowSource = strSQL1 Random report: Me.Report.RecordSource = strSQL2 Would I just store the SQL statements in a global module like: Public Function SQLSource() As String Dim strSQL1 As String Dim strSQL2 As String strSQL1 = "SELECT blah blah...

To SQL or not to SQL?
I have a very vertical product developed 100% in M/S Access. I developed it myself in 1993 in the initial release of Access and been with it ever since. It is currently very stable and running in Access 2003. My big question is how or even *if* we should move it to SQL. My customers are getting bigger all the time with more users. Typically our customers run one or two workstations generally never more than 5. Performance, however, is starting to slow with database sizes passing 500 meg. We also have a LOT of code behind forms so are bound tightly to the Access development environ...

SharePoint Security Groups
Why when i create a top level site with then created 2 child sites does the security from 1 child site carry over to the 2nd child site even though i told each site to use unique permissions? Ex: On child site 1 i create a group called SharePoint Guru and give it full control on site 1. I then go over to Site 2 and look in it's permissions and that group is listed there but the permissions on it says none. I don't understand why it would carry over to site 2 like that. If I delete the "SharePoint Guru" group from Site 2 it also deletes it in Site 1 I am runn...