I'm trying to write some SQL code to simply return the needed parameters within a certain date range from my database. I am using the wizard and I have to go in and redo the permissions every time to have them show up, yet it keeps saying there is an SQL Syntax Error. I'm new to SQL, but have been reading about it and trying small things here and there. Thanks for any help.
Need SQL Help
Need SQL Help
Kelly W
Open Office 4.1.5
Windows 10
Open Office 4.1.5
Windows 10
-
- Volunteer
- Posts: 1547
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Need SQL Help
Using Create Query in the Design View has fewer limitations than the query Wizard. Of course that too has limitations so you still need to learn SQL.
Your question is a little vague.
Here is a parameter query that will prompt the user to enter starting and ending dates. You will need to edit it to include your table and date field names.
If this doesn't help please upload the SQL for the query that you currently have.
Your question is a little vague.
Here is a parameter query that will prompt the user to enter starting and ending dates. You will need to edit it to include your table and date field names.
Code: Select all
SELECT * FROM "YOUR_TABLE_NAME"
WHERE "YOUR_DATE_FIELD" >= :Enter_Start_Date
AND "YOUR_DATE_FIELD" <= :Enter_End_Date
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: Need SQL Help
Wow, thanks for the fast reply UnklDonald418! This is for work, so will have to wait until Monday, but I'll let you know if it works, looks like it will. I work at a transmission shop and am setting up a work database that incorporates the technician's name, date of work, RO #(work order), work done and any additional notes. My husband, the shop foreman has been hand writing all of this and has been turning his sheets into the owner each week, leaving him no real backup. I set up the database, very basic, made a form to enter the information, a report for him to print out and give his boss, so he could keep his copy. I realize he could just photocopy the sheets, but he wants to bring the shop up to 2018 and be more professional, so I'm trying. So what I want to do is set the report up to be able to just print out the report for Monday through Friday, having to use date ranges because I don't have a day of the week in my database. I want to be able to go in and adjust my report query each Friday, so I can print that weeks report and not every single entry I've made. Your formula looks nice, neat and simple, can't wait to play around with it on Monday!
Kelly W
Open Office 4.1.5
Windows 10
Open Office 4.1.5
Windows 10