[mso] Re: Excel-Microsoft Query

  • From: "Colli, Anthony G" <Anthony.Colli@xxxxxxx>
  • To: "'mso@xxxxxxxxxxxxx'" <mso@xxxxxxxxxxxxx>
  • Date: Mon, 2 Dec 2002 16:47:27 -0500

/g

 You might try this. View the query in MS query. Press the Show/Hide
criteria button, the criteria grid will appear. Select your column and in
the criteria place [enter date]. Run the query using !, it should prompt you
for the criteria. I just did something similar and this is the query syntax
that was generated using MS SQL Server2K as the database. 

SELECT BD_Info.BD_IDNO, BD_Info.DateRcvd, BD_Info.ClinicID
FROM MESA.dbo.BD_Info BD_Info
WHERE (BD_Info.ClinicID=?)

-Anthony









-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Monday, December 02, 2002 3:28 PM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Excel-Microsoft Query


I'm very proud of myself.  I wrote this in Microsoft Query which works
pretty great for my purposes.  I even figured out how to take the text field
AvtyComment and multiply it by 1 so I could get a number value.  Yea me!
Actually, I probably got that from this list somewhere but I'm giving myself
credit for remembering it.  Anyway, I would like the date field
DataStuAvty.ActivityDate to be dynamic if that's possible so we can query by
date without having to edit the query each time.  I tried putting the
ampersand in like in Oracle but it didn't work.  Any ideas welcome.  /g
 
SELECT DataStu.LastName, DataStu.FirstName, DataStu.MiddleName, DataStu.SSN,
DataStuAvty.ActivityDate, DataStuAvty.Activity, DataStuAvty.AvtyComment
FROM StetsonDB.dbo.DataStu DataStu, StetsonDB.dbo.DataStuAvty DataStuAvty
WHERE DataStu.STUD_PKID = DataStuAvty.STUD_PKID AND
((DataStuAvty.ActivityDate={ts '2002-11-06 00:00:00'}) AND
(DataStuAvty.Activity='Application fee'))
ORDER BY DataStu.LastName, DataStu.FirstName, DataStu.MiddleName
 
 


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: