I need a little SQL script and don’t feel like learning the syntax. Essentially, I need to iterate through records of a table, and based on the contents of a field, increment a field in the records of another table. If you’re up to the task, please email me and I’ll send you the details.
UPDATE:
Wow… that was fast! A bunch of people emailed offering to help, and I’ve got the problem solved. So thanks to all of you. I hope to load a new and improved HA shortly.
ConservativeFirst spews:
E-mail me and I’ll help you. Just because I’m a nice guy.
Jimmy spews:
@2
We are almost done with you!
cheers
Truth2006 spews:
How pathetic. You call yourself a software developer and you can’t even figure out a little SQL?
jsa on commercial drive spews:
Which begs the question Truth, how’s your SQL?
Given a table CANDIDATES, with the following fields:
pkINDEX, LASTNAME, FIRSTNAME, DATEOFBIRTH, PARTY, STATE
Show the syntax for creating the table, and create a query which returns all names, sorted alphabetically by LASTNAME, with a secondary sort by PARTY, for all entries in the CANDIDATES table whose DATEOFBIRTH differs from 20 Jan 2009 by at least 35 years.
I’m a long ways from being a SQL maven and I can pound that one out in 10 minutes. Show us that you know how to do something besides carp and bellyache.
Roger Rabbit spews:
Hmmm, no response from ProudAss aka “Truth2006,” so I guess that settles that …
Mike Webb Sucks spews:
JSA: You can do that easily in less than 20 lines of Sequel Code.
Create Table(X, Y, Z, …, …)
CREATE INDEX… – Assuming Primary Key reference Last Name as the
no more code given on purpose
It’s not a left or right issue. Furball makes everything political, hence I withdrew my assistance for Goldie. Go back five days and view last weeks posts. I woke up refreshed and my pipes were cleaned, and I suggested the BLOB method for mySQL. Then I read some Furball quotes and I changed my mind. I see today he’s still the cantankerous scumbag he is. Why waste my time? Remember the old adage a bottle in front of me or a frontal lobotomy. Furball can’t deal with the former because he received the latter!
So Goldie: Give me a fuck you Furball for screwing with my success and I COULD change my mind!
jsa on commercial drive spews:
MWS,
The fact that Rog is cantankerous and partisan is not in dispute by anyone, especially Rog. Rog doesn’t run this blog. Goldy does.
Goldy asked for some help with SQL. Someone was nice and banged out SQL code to help him out.
My issue was that Truth sneered at Goldy because he has written software and is not a SQL genius. First, that’s a false inference, just like withdrawing help from Goldy because Rog is cantankerous and partisan is a false inference. I like you better than I like Truth, but my logic prof in the university would have flunked both of you.
I work in an office full of programmers of various sorts. The majority of them are world-class talents. Very few of them have strong SQL skills, because a deep knowledge of SQL and databases is a very specialized skill.
Since SQL is so trivial, I asked Truth to try writing a few lines with a really easy hypothetical example so she could demonstrate how truly trivial this is.
Actually, I take back what I inferred earlier. I like Truth. I like Truth a lot. She is not only blindly partisan, she is insane and full of bile. Conservatives like her exist to make liberals look good by comparison. Truth! Post more! Blog everywhere! Run for office! I really, really loooooooove you man! It’s not just the booze talking at 8 a.m.! I love you so much man, don’t ever leave!
Another TJ spews:
…my logic prof in the university would have flunked both of you.
Logic? You’re using logic in these comment threads? It’s a radical plan, I’ll give you that. Good luck with it.
;-)
Mike Webb Sucks spews:
JSA Elegantly Wrote: “My issue was that Truth sneered at Goldy because he has written software and is not a SQL genius. First, that’s a false inference, just like withdrawing help from Goldy because Rog is cantankerous and partisan is a false inference. I like you better than I like Truth, but my logic prof in the university would have flunked both of you.”
Let’s discuss this for a moment.
1) It’s Goldie’s blog – You betcha. But when has Goldie ever censored Furball? He’s censored me twice in the last six weeks!
2.) Furball is cantankerous. Very true. But the company you keep says a lot about you JSA.
3.) I made Goldie an offer for coding advice. He chose not to take my up on it.
4.) I asked Goldie to link in two great middle-east newspapers. He never did so why should I hold out the hand of peace when MOONBATS! cut it off at their earliest chance?
So in the vernacular JSA. Who you hang with costs ya!
Darryl spews:
This is a test comment. Upgrade here we come!
chatty kathy spews:
I’m having trouble querying data. I’m used to nice tight data and now I’m working with data that is complete garbage. I created a dump table that I’m dumping data strings associated to objects in a database. They have formats such as: SEL1234A and MA-1234-12345-01.
I have lists of them and what I would like to do is dump the list into the dump table and run a query against the production data and have it tell me if there are data strings that match what I have above, except that in addition, I’d like to know if there is a way to find the other revisions of the original data string.(example: SEL1234B or C etc. or an MA-1234-12345-02, -03 etc.) The tables are rubble and don’t parse the A,B,C in a separate field or the -01, -02). So, with the current state of that data; how would this query be accomplished?
I’m a real novice at SQL, but the data I had the privledge of working with before was so much better at standardization.
Thank you for any time/thought you may give this question.