Avatar of Pizentios
Pizentios

asked on 

Mircosoft Jet SQL and SELECT DISTINCT

Hey,

got a quick(hopfully) question. I have a need to do a distinct select statment, how ever all the documents that i have googled for seem to be giving me the wrong info.

I have been trying to do a:

SELECT DISTINCT Purchaser_Seller FROM Transactions WHERE TransType='Purchase';

however it doesn't work when i try to shove it through Microsoft Jet. When i try it just in access it askes for a value for Purchaser_Seller. If i enter in a number it just returns the number. Or if i type in somthing like 'asdf' it returns four rows all with asdf in them. Every document that i have read has giving me the idea that this should work. I did read some posts on EE and they suggested somthing different which i tryed but only got a sytax error. Heres what the posts suggested:

SELECT DISTINCT CAST (Purchaser_Seller varchar(50)) FROM Transactions WHERE TransType='Purchase';

Does anybody have any ideas to why nether of these seem to work, or an idea that would point me in the right direction. A quick response would be great because i am working on a bit of a deadline. Thanks for any help that you guys can offer in advance.

-Pizentios
Microsoft Access

Avatar of undefined
Last Comment
Pizentios
ASKER CERTIFIED SOLUTION
Avatar of michaelbartolotta
michaelbartolotta

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Pizentios
Pizentios

ASKER

your right about the spelling, i was one letter wrong on Purchaser_Seller. In the db it was labeled wrong, thanks for the help, i feel kinda stupid now..heh

-Pizentios
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo