I am trying to do something in MS Access using SQL which I am sure has a very easy answer - I'm a mug however so need help...
Within my database, there is a field called ID which consists of four letters followed by a random length of numbers and letters after. I have 150 IDs that I need to extract from the database.
I have tried using: SELECT ............. FROM ........ WHERE [ID] LIKE 'XXXX*' OR [ID] LIKE 'XXXX*' OR [ID] LIKE 'XXXX*' OR [ID] LIKE 'XXXX*' OR [ID] LIKE 'XXXX*' OR [ID] LIKE 'XXXX*' etc etc etc
But realise this is fucking retarded - there must be a better way? Additionally this potato method can't do more than 100 IDs at once. How do I do 150 in one go?
I know this is probably stupidly easy but google hasn't helped so you're my only hope
Since you need to get four first characters, use ...where left(id, 4) in ( subquery)
Chase Peterson
I have never met a single person who use MS Access in my professional career. What do you use it for OP? Not trying to be a jackass or anything, just curious
Jaxson Cox
I don't use it as part of a career. I have no experience with database software and this happened to be installed on my PC.
I got given some several hundred MB file in Excel format from a retard that clearly exported it from a database. I can't access that database so I have to use access for the time being.
Liam Hernandez
Yikes. I sympathize because I've actually had a client sent me DVDs of JSONs It was a fucking surreal experience
Nolan Kelly
Thanks - this worked perfectly on numbers, e.g. WHERE Left(ID,4) IN (1341,1351,1361,1371);
It doesn't seem to work IDs if I have an ID like AAA1 though? Appreciate all your help so far!
Camden Adams
Yeah I am not best pleased but hey, I've wanted to fuck about with SQL for a while. This might be some bullshit MS version but once this is out the door I hope to pick up mySQL.
Any advice on how to go about it and what to use instead of Access from now on?
Connor Moore
hire someone who knows what the fuck they are doing, or tell your boss to hire another pajeet
Luke Russell
Personally I have been using Toad for all my SQL needs, but more often than not I have to do shit from the command line
It's less the client and more the language. Use codecademy or HackerRank to learn the stuff
Leo Smith
>be me >2006 >freshly graduated >first job in a regional data centre for BT (UK's incumbent telephone network) >huge company, money out the yazoo etc >at the site I worked in, customer records, licence keys etc all run out of an MS access db that only seemed to work half the time >everyone avoided it like the plague and it was useless
Sort of stuff happens at huge, former publicly owned companies like that. Even in the mid 2000s when I got there you could go up a floor from the data centre and walk into rooms with rack and telephone switching equipment from like the 70s that hadn't been touched in years. It was all still powered on nominally. Usually because of something dumb like "one of the lines in here runs to a desk in some government building somewhere". Never mind the government building was torn down 20 years ago...they're still paying so the company is still providing it.
Tyler Martinez
I once laughed at a classmate for learning COBOL Now he's laughing at me because he got a cushy government job maintaining old stuff while I sell my soul at a Fortune 500 on a meme agile team
Samuel Harris
Yea there's tons of old shit around.
Apparently the systems in a lot of banks are from the iron age and people who actually know how they work are literally dying off. If you can show up with a stack of memes in your resume they'll throw cash at you.
Christopher Johnson
It's not a meme if you can get a good job with it
Thomas Morgan
I know...but show up to any college and university and you'll have a lot of classmates and lecturers/profs laughing at you - hence the memes.
I never said the memer is at fault. He's the one actually laughing.
Colton Rivera
Awareness is more important than anything, I guess. Some people see the eventual need of replace the old guard, so they go for those jobs Some people predict the future correctly and get a head start on things like Python or NoSQL
Makes me wonder where do I fall on that spectrum
Jaxon Richardson
Navicat
Blake James
google select limit statement OP
Jaxon Reed
OP here. So I got it to work I think.The line in question is
WHERE Left([CAP Vehicle Code],4) IN ('AAAA','BBBB');
etc. This seems to have worked so thanks to all that helped...
Elijah Morgan
I'm MS Office access certified and I have no idea how to do that.. this certificate taught me nothing.