ORA-00905: missing keyword


hey ,

new to SQL, trying to run this simple query



SELECT * from STAFF
WHERE REVIEW between 31 JANUARY 06 and 31 AUG 06



its coming up wit an error such as:


ORA-00905: missing keyword


anyone know how to fix this please
Posted On: Wednesday 24th of October 2012 09:19:02 PM Total Views:  116
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Multiple keywords search in multiple columns

Hi folks, I don't know if what I want is feasible and how. Hope you can help me find the right direction. I have a MySQL table on which I am performing an AJAX search. The table contains multiple columns as in the below example: Searching for "LSGG" should return the 2 records as they both contain this string. Searching for "Geneva International" should return both records too. Searching for "LSGG IFR" or "IFR Geneva" should return only record 2. Searching for "KLAX Geneva" or "KLAX LSGG" should return only record 1. etc. I'd like to be able to search for all rows that contain the different words entered, in any column. Still, 2 (or more) words can be part of the same column entry as per my example above.
VIEWS ON THIS POST

68

Posted on:

Monday 24th September 2012
View Replies!

looking for missing records in a single table

I am looking to sql for missing records in a single table. ex: select [field1] from table where [field1 ='a'] and\t[field2 = '1'] exists and [field1 = 'a'] and [field2 = '0'] does not exist. I need two records for each distinct [field1] in a single table.
VIEWS ON THIS POST

117

Posted on:

Friday 5th October 2012
View Replies!

what is the keyword top in mysql

Hi all \t I want to get top 10 records in my sql ,what is quiry for that
VIEWS ON THIS POST

132

Posted on:

Saturday 6th October 2012
View Replies!

Search the whole database (all tables) for a keyword

legends Is there a way to search all tables in a database for a keyword using 1 query Something like SELECT * FROM \t WHERE ..ummm you know what,,I cant do it ,,please help , Quote: Originally Posted by lnxgeek I hate to ask, but why would you want to do this How many tables are we talking about How are the tables related Trying to make a search box in a website that visitors can find anything data they want within that search box. If you have better ideas please tell me
VIEWS ON THIS POST

81

Posted on:

Friday 12th October 2012
View Replies!

Select missing numbers

I've got list of numbers: Code: mysql> select id from MailAccount limit 10; +------+ | id | +------+ | 1000 | | 1001 | | 1002 | | 1004 | | 1005 | | 1008 | | 1009 | | 1010 | +------+ I want to select all numbers between min(id) and max(id) that are missing from the sequence, ie with the above numbers I would want to select Code: | id | +------+ | 1003 | | 1006 | | 1007 | +------+ Any tips Martin
VIEWS ON THIS POST

220

Posted on:

Friday 12th October 2012
View Replies!

How to query to return results that have missing data length?

say I want to get result from a telephone number column where any column length of the telephone is less than 10 numbers. i set my varchar type limit to length of 10 so that is for the area code and phone number. anyone know how to return results that have less than length of 10 SELECT * FROM `family` where phone varchar(lenght)!=10;
VIEWS ON THIS POST

113

Posted on:

Friday 12th October 2012
View Replies!

Query missing details from one column [was: Pls i need someone to check this out!]

i have an sql statement which has been given me sleepless nights. the staments is suppose to pull records but it pulls the records and omits the debit detail this is the code :SELECT users.username,users.account,users.amount,money.credit,money.Debit,money.date FROM users INNNER JOIN money ON users.username = money.username WHERE users.username = '$username'" pls i need someone to help me with it or am i doing sometin wrong here
VIEWS ON THIS POST

216

Posted on:

Friday 12th October 2012
View Replies!

Display the missing number in series

, I want to build a query in MySql to show a series break in the column. example: column 0 1 2 3 5 So the output will show 4 as missing
VIEWS ON THIS POST

73

Posted on:

Friday 12th October 2012
View Replies!

Distinct where 3 columns equal keyword

Lets say I made a table recording the fruit on a tree. the tree is the ID. Each tree can produce up to 3 colors. A tree can have any combination of these 3 colors including a tree of just one color. The tree is divided into 3 sections. An entirely green fruit tree woudl be described as a green green green tree where as a tree with 2 green sections and 1 orange section could be a green orange green tree. If I had a search query that searched for green sections in a tree the entirely green fruit tree would have 3 hits, the green and orange tree would return 2. I would like to return just one result per tree if it has green in it as I dont really care how many sections are green I just care that there is green in it. So: ----- Clr1-----Clr2--Clr3 Tree1 orange green orange Tree2 yellow purple blue Tree3 Green Green Green would return Tree1 Tree3 because of Clr1 Tree3 because of Clr2 Tree3 because of Clr3 What I want Tree1 Tree3 I also need to have it return all the other columns also which I did not mention but for example would be height, fruit produced etc. I think I need to use Select distinct(tree_id) from table where clr1=searchkeyword, clr2=searchkeyword, clr3=searchkeyword; I know that is not right but I hope you see what I want. I also need to rest of the data from that row.
VIEWS ON THIS POST

83

Posted on:

Friday 12th October 2012
View Replies!

How to select a chapter of records which have keywords

I have a database of a chapter field a verse field and a text field: Quote: Chapter Verse Text_data 1 1 blablabasasda 1 2 asdkjsdfkdjhf 1 3 sdcj lj sdlckj 1 4 oin oihh o tsts 1 5 sdfoijd sdjfosd 1 6 nalsknd asdsad 2 1 alaajaj ajajk dodf 2 2 blablabasasda by looking at the text data, let's say I'm looking for the keywords: blablabasasda and sdcj. Looking at chapter 2 blablabasasda is found but not sdcj. So that chapter is disregarded. But in chapter 1 since words keywords are found then Chapter 1 is taken into account. , here's an entire thread about this very topic -- http://www.dbforums.com/showthread.phpt=1634103
VIEWS ON THIS POST

88

Posted on:

Friday 12th October 2012
View Replies!

WHERE 4 of the 10 keywords available in records

Is it possible to have several keywords in the search separated with an OR but only to show the records where there are ...let's say 4 of the 10 keywords available
VIEWS ON THIS POST

211

Posted on:

Friday 12th October 2012
View Replies!

Need help with missing results in a query

I am querying an audit database that contains just about all information retrievable from Windows machines using WMI. I have information from 67 machines in this database. This query runs and displays results on a website. I am trying to add monitors to the result... but not EVERY computer has a monitor... The current query... Code: SELECT * FROM `system`, `processor`, `hard_drive` WHERE system_uuid = hard_drive_uuid AND system_uuid = processor_uuid AND hard_drive_uuid = processor_uuid AND system_timestamp = processor_timestamp AND system_timestamp = hard_drive_timestamp AND processor_device_id = 'CPU0' AND hard_drive_index = 0 Returns 67 (all) results. Here's what I have for the monitor part... Code: SELECT * FROM `system`, `processor`, `hard_drive`, `monitor` WHERE system_uuid = hard_drive_uuid AND system_uuid = monitor_uuid AND system_uuid = processor_uuid AND hard_drive_uuid = processor_uuid AND system_timestamp = processor_timestamp AND system_timestamp = hard_drive_timestamp AND processor_device_id = 'CPU0' AND hard_drive_index = 0 This returns only 63 results... because 4 machines do NOT have monitors. How can I write this so that even systems WITHOUT monitors are ALSO returned
VIEWS ON THIS POST

75

Posted on:

Friday 12th October 2012
View Replies!

Groups with specific missing rows

, i need help with an sql query...so if someone can help i'll be grateful ;] i select data from a table by groupping data by some field, in every group there can or cannot be some specific row, all i want is to retrieve those groups for which that specific row is missing. e.g. suppose there is a table: +----+---------+------------+ | id | user_id | special_id | +----+---------+------------+ | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | | 4 | 1 | 6 | | 5 | 2 | 9 | | 6 | 2 | 7 | | 7 | 2 | 0 | | 8 | 2 | 3 | | 9 | 2 | 4 | | 10 | 3 | 1 | | 11 | 3 | 2 | | 12 | 3 | 4 | | 13 | 3 | 6 | +----+---------+------------+ i group by user_id: SELECT * FROM A GROUP BY user_id +----+---------+------------+ | id | user_id | special_id | +----+---------+------------+ | 1 | 1 | 2 | | 5 | 2 | 9 | | 10 | 3 | 1 | +----+---------+------------+ but i want to retrieve those users here for which there is no entry with special_id = 0, that is user_id=1,3 as for user_id=2 there is such a row (id=7) , Code: select distinct user_id from t as q where not exists (select * from t where special_id = 0 and t.user_id = q.user_id)
VIEWS ON THIS POST

100

Posted on:

Friday 12th October 2012
View Replies!

Want Like '%term%' where term=[keyword set]

Hopefully the subject describes the problem. I basically want to select all rows where a particular field matches a given term, where that term could be any term listed in another table. Is this possible with a single SQL statement, or would I need to run a seperate statement for each term TIA
VIEWS ON THIS POST

175

Posted on:

Friday 12th October 2012
View Replies!

looking for missing records in a single table

I am looking to sql for missing records in a single table. ex: select [field1] from table where [field1 ='a'] and\t[field2 = '1'] exists and [field1 = 'a'] and [field2 = '0'] does not exist. I need two records for each distinct [field1] in a single table.
VIEWS ON THIS POST

104

Posted on:

Sunday 21st October 2012
View Replies!

how to fill up the missing dates ??

hello forums!! I had the table1 as follows: ----------------- | table1 | ----------------- | id | visit_date | no_of_hits | | 1 | 2002-02-12 | 3 | | 2 | 2002-02-13 | 10 | | 3 | 2002-02-15 | 200 | : : | n-1| 2009-01-8 | 125 | | n | 2009-01-10 | 400 | Now i would like to show all dates between two date ranges (for example 2003-02-12 to 2008-12-30) which may or may not have no of hits. I know this can be done by using third table (the table that has all the dates) and using it as left join to table1. I have seen some tutorials regarding sequence generation that is by using integers table as: ---------- |integers| ---------- |i | ---- |0 | |1 | |2 | : : |9 | We know we can generate sequence of numbers using integers table using the concept of cross joins. How this concept can be used in my case ie generating all dates between two date range. or any other good method will do too. Note: the two date range is not fixed as user has option to select any date. Waiting for the right solutions. Thank You.
VIEWS ON THIS POST

99

Posted on:

Sunday 21st October 2012
View Replies!

Need to repair my db. FRM files are missing

I have been trying to fix one of my dbs that got messed up. I have tried it through phpmyadmin, mysql on cpanel, and shell acess. But for each table I just keep getting ERROR 1033 (HY000): Incorrect information in file: './snow07_rosa/g2_AccessMap.frm' My server is running Server version: 5.0.67-community MySQL Community Edition (GPL) Is there anything else I can try to fix my DB
VIEWS ON THIS POST

89

Posted on:

Wednesday 24th October 2012
View Replies!

Leading zeros missing?

I am trying to set up a basic 2 column table. with 4 digit account numbers and the account name. (in PHPMyAdmin) for example 0001, 0093, they are going to be unique but not auto_increment I can't seem to get the leading zeros to stay. How should that column be set up
VIEWS ON THIS POST

84

Posted on:

Wednesday 24th October 2012
View Replies!

Searching keyword against two fields

dear all, i would like to be able to search a keyword, and match it against 2 columns. so for example, I have cli_fname and cli_sname fields, and I want to be able to search for "mark williams" and have mysql match the search term against the two fields, but treated as one (if I am making sense) I have tried CONCAT(cli_fname,' ',cli_sname) as cli_name, but if I add %keyword% LIKE cli_name, I get an "unknown field" error. is there a way to do this I asked a similar question at the end of this post too: http://forums.devshed.com/mysql-help-4/relevance-without-full-text-389653.html Many
VIEWS ON THIS POST

147

Posted on:

Wednesday 24th October 2012
View Replies!