Selecting data between two dates

could someone help me out because i am doing an sql assignment. I cannot complete one of the question : -

List the manuscript title, edition, and publication date of all publications between 12th July 1984 and 1 June 1993.

I have asked my tutor and he entered the following code: -
Select PUB_EDITION, PUB_DATE
From Publication
Where PUB_DATE >= TO_DATE('12-JUL-84', 'DD-MON-YYYY')
AND PUB_DATE <= TO_DATE('01-JUN-93', 'DD-MON-YYYY');

if someone knows how to do this please tell us.

Many

Oracle Selecting Data between two dates

I have a table following structureName Type Order_num VARCHAR2(20)HOUR NUMBER(2)DT TIMESTAMP(6)DSTAMP DATE Now I want to select data between DSTAMP='12-DEC-07' and HOUR >='starthour' and HOUR <='endhour', it gives the data for the same day, but if i have to pull the data over a span of multipl ...

MySQL Selecting data from two tables with the same columns

I am trying to select and display the values from two tables where the two tables have the same columns. I am trying to use the following: -------- $ostersund_7_5_start = $row["start"]; $ostersund_10_start = $row["start"]; -------- It seems that making it this way the data is tak ...

MySQL Problem with SELECTing data

I have a problem with constructiong a SELECT statement. I have table looks like that: [id] [dog] [show] [points earned for every show] Now I have to build a list of dogs with summed points from every show. I want to sort it descending from the best dog (with highest score from all shows). So I have ...

Selecting data from different databases on same server

Can you please help me build a query which helps me select data from tables existing in different databases .1) On the same server and same instance.2) On the same server and different Instances.3) On different servers.I tried this query which returns an error.SELECT T1.*,T2.* FROM TEST.EMPLOYEE T1 ...

Help importing CSV data and dates into MySQL

Using version: mysql Ver 14.7 Distrib 4.1.9, for Win95/Win98 (i32) I'm trying to import CSV files with the following format into MySQL (somewhat successfully): ==begin data snippet V;13845798;LAST NAME FIRST NAME;220201001;31/07/1956 V;18836376;DOE DOE JOHN;220201001;09/04/1980 ==end data snippet Fi ...

Error selecting data due to floating pt exception

Got a good one! or a bad one depending if the boss is breathing down the neck.I am selecting from a table. When certain columns are selected, sql server generates the following message:[Microsoft][ODBC SQL Server Driver]Numeric value out of rangeTo be more specific, if i select the id column of the ...

Selecting data from different databases on same server

Can you please help me build a query which helps me select data from tables existing in different databases .1) On the same server and same instance.2) On the same server and different Instances.3) On different servers.I tried this query which returns an error.SELECT T1.,T2. FROM TEST.EMPLOYEE T1 JO ...

XML/XSL selecting data

I am wanting to change my XSL stylesheet to select all the formattedreportobjects that have a <FormattedReportObject type="CTFormattedField" Type="string" FieldName="{VhStock.MAKE}"> value that = Mitsubishi. At the moment its just outputting all the FormattedRepor ...

Access Violation When Selecting Data

I have suddenly developed a problem when trying to select from a table. Even a standard select * from generates a SQL Dump exception handler. The table is below:CREATE TABLE [Stagetb_GIDeptGroup] ([f_GIImportID] [int] IDENTITY (1, 1) NOT NULL ,[f_GIAction] [int] NOT NULL CONSTRAINT [DF_stagetb_GIDep ...

MySQL Selecting data from 3 tables

I have created a who's who database for my company intranet and have it working fine apart from one thing that I am stumped on. To give you the run down on this I have 3 tables: tbl_employees id surname first name departmentid... etc tbl_departments id department tbl_emp_depts dept_id emp_id An empl ...

MySQL whats the best way for selecting data.

Table Product ===================== --------|-----------|-------------- product | minRange | maxRange --------|-----------|-------------- 1 | 200 | 400 2 | 150 | 300 3 | 200 | 300 4 | 250 | 500 ------ |-----------|--------------- What is the best way to select rows, for below option: Select 'product ...

Help w/ selecting data in multiple tables

I have 5 tables in a database(below).Each User is in a group, each group has a set of permissible operations. If I have a UserID, how can I get a list of permissible "OperationName"s? GroupAssign +---------+--------+ | GroupID | UserID | +---------+--------+ | 1 | 1 | | 2 | 1 | | 2 | 2 | + ...

Probelm with Selecting data & Perl

I have this perl scrip that performs an accont lookup by last name. The perl scrip is executed by the webserver. A while loop is set up so that it will find all occurences of the specified last name and return it to the browser window. The loop will execute for 1001 times (i chose that becuase I did ...

select a data Between dates, second dat is optional or today

I have queryselect table1.* from table1, table2where table1.pid = table2.idand table1.date between table2.startdate and table2.enddatehowever, it returns no rows often. reason for this is dat table2.enddate is empty when something has not finished. Therefor I need to use TODAY if the field is empty. ...

selecting data based on a date range function

hiI'm trying to fugure out a query that will select records from within a range of two dates using MySQL.The data I'm trying to represent is for a news page on a website. so I want to have 'current stories' i.e. those from the past 30 days. I'd then like to list the stories that are 30-60 days old a ...

MySQL selecting data and inserting it into another table, but only the largest values!

Hi, I want to add the largest area for each feature from Table1 and insert into Table2 Select Area From Table1 selects the areas Select FeatureNumber,MAX(Area) gives me the feature number with the largest area can anyone give me some points on how to do this? Data structure follows Thanks: Table1 Fe ...

Selecting data after one result

Having a bit of a problem but I know its probably an easy answer..I have a database with two tables. Basically, I am taking direct data from one table on a webpage, and want to select data depending on the results of the first query.eg. Ive retrieved data from one table that displays city codes, suc ...

selecting last 3 dates

I have an invoice table that I would like to query for customers and there last 3 inoivce amounts. In the table there are the following fields: customer number, invoice date, invoice amount, previous invoice date, and previous invoice amount. I am totally stumped on how I can query on the last 3 inv ...

Selecting Data from 2 MySQL Tables and displaying them in a HTML Table

<?phpfunction GetFeedbackList($username){global $conn;$q = "SELECT feedback.date, treatments.problem FROM feedback, treatments WHERE feedback.username='$username' AND treatments.username='$username' ORDER BY feedback.date";$result = mysql_query($q,$conn);while($row = mysql_fetch_assoc($ ...

Selecting data

Can someone please help me.I would like to select all rows from a database that contain a certain word within it.I am using the line;$sql="Select SchoolName FROM Schools where AreasCovered LIKE '$_POST[Town]'" or die("Error in selecting the town:" .mysql_error());The database con ...

Selecting Data in Combo Box

I'd like my page to do this:1) List the current Events in a combo box2) When the user chooses an Event, then the text area next to it populates with all the Guests associated with that Event.3) The user can update the Guests' names, delete them, whatever they'd like and then save all the guests agai ...

selecting data from a file

I wonder is there possible to selecting end manipulate data from a text file using php and the result save in to a new txt file.only use php and not using mysql.Tank U ...

Error while selecting data into a variable

I am running Oracle 10.2.0.3. When I select a "long raw" column into a "long raw" variable, I'm getting an error. When I select the data without placing it into a variable, the statement succeeds. (Please see below.) Any ideas?Thanks,J--------------------------------------------- ...

selecting data via intervals

I have some data in a table that has a timestamp (Date) and a value (Number). I want to look at only the last value for each day and subtract from the value the last value for the previous day to produce a running total of how much the value has increased each day. So I'd really be throwing out 99% ...

selecting data

Please forgive me if you think I should know this.....but I am trying to: select Column1+Column2 as AA where Column1+Column2>10,Column5+Column6 as BB where Coumn5+Column6<90from SCHEMA.TABLE_NAMEBut I don't think my syntax is correct.Would appreciate some guidance. ...

selecting data from different partitions

I need to insert data into a table A every week from a table B which is partitioned on year,month. Now if the week is split between 2 months then I'll end up getting data from 2 different partitions. Will this cause any performance issues? What other problems might arise? Any insight into this situa ...

selecting data based on datetime

I have a field of 'date' formated as datetime. The value look something like this11/5/2003 9:12:00 AMI would like to know how I can setup a query so I get data that was entered between now and 10 days ago. ...

Cannot create stored procedure with selecting data from cursor by condition

CREATE PROCEDURE SVC.TIMEHOLE(IN SECONDS INTEGER)READS SQL DATARESULT SETS 1LANGUAGE SQLBEGINDECLARE GLOBAL TEMPORARY TABLE mytime_temp (mytime timestamp) ON COMMIT preserve rows not logged;DECLARE mytime TIMESTAMP;DECLARE mytimeprev TIMESTAMP;DECLARE v_sqlstatus INTEGER DEFAULT 0;DECLARE ts CURSOR ...

selecting data of time format

I am having some trouble writing a select statment that involves time. I have a field, which has time data (i.e Jan 08 2008 12:00AM)If I write my select statement like the following select * from db where date < (select convert(char(12), getdate()) || '12:00'), the sql works fine. However, now I ...