sqlfr28 Posted August 4, 2011 Share Posted August 4, 2011 Hi Is there any MySQL Query to show employees who are hired after a certain year (say 1997) without using relational operators? The field concerned here is hire_date and table name is,say for example, "employees" table. Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/ Share on other sites More sharing options...
AyKay47 Posted August 4, 2011 Share Posted August 4, 2011 why cant you use operators? you can use the between clause if you absolutely don't want to use an operator Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251732 Share on other sites More sharing options...
Muddy_Funster Posted August 4, 2011 Share Posted August 4, 2011 what's the point in using an RDBS if your not going to use relational operators?!? - you'd be as well working in access if that's how your playing it. Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251768 Share on other sites More sharing options...
AyKay47 Posted August 4, 2011 Share Posted August 4, 2011 what's the point in using an RDBS if your not going to use relational operators?!? - you'd be as well working in access if that's how your playing it. lol, access = Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251776 Share on other sites More sharing options...
Muddy_Funster Posted August 4, 2011 Share Posted August 4, 2011 Yip. That's why it came to mind in this post. Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251787 Share on other sites More sharing options...
kickstart Posted August 4, 2011 Share Posted August 4, 2011 Hi Access can do relational stuff and has no problems with relational operators. It is just its reliability and dodgy syntax that shoots it down. All the best Keith (who has the misfortune to have to use Access with MySQL on a regular basis) Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251792 Share on other sites More sharing options...
Muddy_Funster Posted August 4, 2011 Share Posted August 4, 2011 And it's complete inability to pull off optimistic locking - dispite what it says, it's chronicly slow performance, it's price, the fact that it opens database development up to people who realy shouldn't be anywhere near it, it's use of 'custom' SQL that doesn't even match SQL Server. Access is evil, pointless and the source of more problems than the Lybian goverment. Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251796 Share on other sites More sharing options...
kickstart Posted August 4, 2011 Share Posted August 4, 2011 Hi Yep, reliability. Or its lack of it. It does have a place, but really that is just as something a step up from Excel for single user use, and no way does such use justify a proper database. A few years back I had to use Access to backup and system that was soon to be dead. Data just needed for occasional use. About half a million records. I knocked up a script to load the data in which worked fine in testing. Came to use it for real and at about 45k records it would roll over and die, but not on any particular record. Access basically tripped over its own feet. The solution? Every 10k records I coded a 10 second wait to allow the data the be safely written to the database. Not sure that its SQL being different is something that can really be complained about as there is so much difference between all the flavours anyway. However how restrictive it is (and how it struggles with any kind of mildly complex table join without resorting to views) is a major pain. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251817 Share on other sites More sharing options...
Muddy_Funster Posted August 4, 2011 Share Posted August 4, 2011 True, I'm pretty biast though, my issue is when some genius thinks that the best way to get reports from an SQL Server database is to plug access into it, and build a query with all those handy little boxes with all the field names, then run a VB script to export to excell and mail it to people. Then it falls on it's arse, IT finaly get to know about it's existance, and I have to look through the SQL to see what's going on. I'm sure the next office over can hear me swearing every time I come across something stupid like WHERE (((((((([field name with spaces] = ['ask a question']))))) and ((([another field wITH Spaces] >= 1))))))) I meen really, It would have saved everyone time and hastle if I'd just been asked to do it properly from the bloody start. Anyway, I want to go back to my original question to the OP - why are you using a RDBS and at the same time going out your way to avoid the use of relational operators? PS Kickstart, any advance on my sequencing issue? Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251831 Share on other sites More sharing options...
AyKay47 Posted August 4, 2011 Share Posted August 4, 2011 True, I'm pretty biast though, my issue is when some genius thinks that the best way to get reports from an SQL Server database is to plug access into it, and build a query with all those handy little boxes with all the field names, then run a VB script to export to excell and mail it to people. Then it falls on it's arse, IT finaly get to know about it's existance, and I have to look through the SQL to see what's going on. I'm sure the next office over can hear me swearing every time I come across something stupid like WHERE (((((((([field name with spaces] = ['ask a question']))))) and ((([another field wITH Spaces] >= 1))))))) I meen really, It would have saved everyone time and hastle if I'd just been asked to do it properly from the bloody start. Anyway, I want to go back to my original question to the OP - why are you using a RDBS and at the same time going out your way to avoid the use of relational operators? PS Kickstart, any advance on my sequencing issue? start a thread in miscellaneous to talk about Access and how poop it is.. Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251837 Share on other sites More sharing options...
kickstart Posted August 4, 2011 Share Posted August 4, 2011 Hi Last place I worked landed up with us in the IT section pushed into documenting everything that moved until it stopped moving. Inevitably the users started writing their own Access database based systems as it was way too hard to get IT to do anything . The query builder is a nightmare though. Anyway, to the OP, why do you need to avoid operators? Is the date you are checking in a date field? You could use between (but to my mind, just like an operator). You could hide the check off in a custom function, but that really just hides the operators. You could use datediff. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/243758-mysql-query/#findComment-1251880 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.