LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2013, 05:14 PM   #1
ACCS
LQ Newbie
 
Registered: Jan 2013
Location: Armada Michigan
Posts: 7

Rep: Reputation: Disabled
Open Office Parameter Query


Hello Everyone,

Was wondering if someone could help me out with this issue. I am using a wizard to write the query and then I am going into the "Design View" by means of "edit" for Queries and I want to put a date range parameter query in the criterion row under the date field. Would anyone know the correct Structured Query Lanquage to put into the date field so I can query for a date range as for example from 1/20/2013 to 1/25/2013.

If anyone can help me out with the program lanquage I would certainly appreciate it. Thanks so much.

Last edited by ACCS; 01-29-2013 at 02:42 PM. Reason: RESOLVED
 
Old 01-27-2013, 05:31 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
SQL has a BETWEEN condition that may be what you need. Read more about it here.
 
Old 01-28-2013, 03:03 PM   #3
ACCS
LQ Newbie
 
Registered: Jan 2013
Location: Armada Michigan
Posts: 7

Original Poster
Rep: Reputation: Disabled
I have had three (3) different operators respond to my question. The three (3) responses have yielded one partial solution with issuses still unresolved. Here we go. The syntax is exactly the way I put it in the Criterion under the Date field for the query when I was in the edit function of the query.


Resolution 1 Between DATE ('2013/24/01', 'yyyy/mm/dd') AND DATE ('2013/25/01','yyyy/mm/dd') The result response: Snytax error, UNEXPECTED DATE

Resolution 2 WHERE date > date('2013/23/01', 'yyyy/mm/dd')AND date <date('2013/26/01','yyyy/mm/dd'); The result response: Snytax error, unexpected WHERE, expecting BETWEEN or SQL_TOKEN_IN SQLTOKEN_LIKE


Resolution 3 BETWEEN #01/23/2013# AND #01/25/2013# The result response: Partial success, out put though only gave records for the 25th of January when I had records also for the 24th of January. I also was hoping that when the query was double click on that a dialog box would appear (Like in ACCESS 2007)asking for a date. When that date was put in another dialog box would pop up for the final date giving the desired output of records for the 24th and 25th.

I would like to resolve the output for the 24th. Also, if Open Office has the ability to have dialog boxes pop up for the dates I would like that feature also, instead of feeding the SQL into the Criterion Row underneath the Date Field. Any help you can supply will be greatly appreciated!! Thanks
 
Old 01-28-2013, 05:39 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Here's how I read the structure of the query. Bear in mind that I haven't used SQL in some time, so these suggestions may take a bit of tweaking to work.
Code:
SELECT *
FROM <your table name here>
WHERE date >= date('2013/24/01', 'yyyy/mm/dd')
AND date <= date('2013/25/31','yyyy/mm/dd');
or
Code:
SELECT *
FROM your table name here>
WHERE date BETWEEN date('2013/24/01', 'yyyy/mm/dd') AND date('2013/25/31','yyyy/mm/dd');
I hope these suggestions help.
 
Old 01-29-2013, 02:36 PM   #5
ACCS
LQ Newbie
 
Registered: Jan 2013
Location: Armada Michigan
Posts: 7

Original Poster
Rep: Reputation: Disabled
Smile

Big Driver,
The issues has been resolved. Just so you know and can help someone else as I would do here are the particulars.

I needed a date parameter date query and I wanted a box to pop up so the dates could be put in versus going to the "edit" in the query and put the SQL in the Criterion Row under the date field. Here is the SQL that worked with the pop up boxes:

BETWEEN :Enter_From_Date AND :Enter_To_Date

The line above has the exact spacing and gives the output that I needed. I want to thank all who have helped with this, I am very apprecitive of all the responses I got.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i installed open office.org in my ubuntu10.04,can't see it under app>office any help wairesh Linux - Software 1 12-30-2011 09:05 AM
convert ms office to open office ubuntu 6.06 and 8.04 pdelcast Linux - Newbie 3 05-11-2008 10:09 PM
LXer: MS Office 2007 versus Open Office 2.2 shootout LXer Syndicated Linux News 0 04-30-2007 11:16 PM
How to Get Open Office 2.0beta to Mimic MS Office 2003 Look? mac57 Linux - Software 2 03-08-2005 07:02 AM
Star office / Open Office on Sony Picturebook kkempter Linux - Laptop and Netbook 4 12-11-2003 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration