Scarecrow Man Posted October 15, 2004 Report Share Posted October 15, 2004 Anyone know SQL or Python? Anyways,I need to write an SQL query that reads only the customer records where the customer name starts with the letter M.I know computers, but I ain't no programmer. Quote Link to comment Share on other sites More sharing options...
hftmrock Posted October 15, 2004 Report Share Posted October 15, 2004 select * from 'tabname'where 'custname' like 'M%'tabname = the table where you need the results fromcustname = the column that has the cutomer name within the table.I am going to verify this and make sureEDIT - Just tried it....this works for me Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted October 15, 2004 Author Report Share Posted October 15, 2004 Thanks hftmrock, but that didn't work. I got an error at where.I am using Python IDLE 2.34 Quote Link to comment Share on other sites More sharing options...
hftmrock Posted October 15, 2004 Report Share Posted October 15, 2004 the SQL works. Your not adding the quotes, are you. The only place the quotes belong is the 'm%'I am not sure about the python IDLE 2.34 but what I gave you is proper syntax. I can see where you would get an error at the where if you used the quotes around tabnameI just tried it with the quotes and got the same error at 'where' so I am guessing that you kept the quotes on. My fault for not explaining better. sorry Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted October 15, 2004 Author Report Share Posted October 15, 2004 Hmm, I think I may have left the quotes in. I did edit it a bit to adhere to my program a little, but same general idea. I've handed it in now anyways. We'll see how I did soon :unsure: Quote Link to comment Share on other sites More sharing options...
hftmrock Posted October 15, 2004 Report Share Posted October 15, 2004 Well good luck. Hope its ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.