Chosing Specific Entries With SQL

Aug 11, 2007

I have following SQL statement:

SELECT TOP 10 tblPortCallList.Port, tblPortCallList.Arr_Date, tblPortCallList.Dep_Date, tblPortCallList.Security_Level_Ship, tblPortCallList.Security_Level_Port, *
FROM tblPortCallList
ORDER BY tblPortCallList.Arr_Date DESC , tblPortCallList.Dep_Date DESC;

As shown, it picks the top 10 entries in a table.

Is there a statement, which can choose specific entries in a table, in stead of the top 10? E.g. entry number 2 in a table? I have three text boxes, which need to show the previous port of call, arrival date and departure date. The table in question is sorted after arrival date and then departure date.

Thanks.

View Replies


ADVERTISEMENT

Queries :: Return All Entries For Specific Day

Jul 6, 2015

I have a large table with millions of entries. I want to run a query to return all entries that are on a Saturday. The date stored in the table though is just typical date format eg 15/11/2015.

View 1 Replies View Related

Limiting Number Of Entries A Specific Client Can Add To Table

Mar 10, 2015

For my database the business has Clients who they conduct Needs Assessments for, but they only conduct 3 needs assessments. I have a Needs Assessment table with Client ID as the foreign key. how I can limit the number of times a Client ID shows up in the foreign key field to three?

View 2 Replies View Related

Chosing Dates For Report

Dec 7, 2006

Hi,

I need item name, total quantity sold, total quantitiy delivered.

I need some thing that lets me put in two dates, the start date and end date.

Th Sql code for some reason dont' not give me the right result. It must be wrong!!!:rolleyes: Help me fix it!!!


SELECT DeliveryAA.itemnameAA, Sum(DeliveryAA.delqtyAA) AS SumOfdelqtyAA, Sum(ItemSaleAA.saleqtyAA) AS SumOfsaleqtyAA, DeliveryAA.timedateAA
FROM SupplierAA INNER JOIN (SaleAA INNER JOIN ((DepartmentAA INNER JOIN DeliveryAA ON DepartmentAA.deptnameAA = DeliveryAA.deptnameAA) INNER JOIN ItemSaleAA ON DepartmentAA.deptnameAA = ItemSaleAA.deptnameAA) ON SaleAA.salenoAA = ItemSaleAA.salenoAA) ON SupplierAA.splnoAA = DeliveryAA.splnoAA
GROUP BY DeliveryAA.itemnameAA, DeliveryAA.timedateAA
HAVING (((DeliveryAA.timedateAA) Between #1/1/2004# And #12/31/2004#));

View 1 Replies View Related

Chosing Dates For Report

Dec 7, 2006

Hi,

I need item name, total quantity sold, total quantitiy delivered.

I need some thing that lets me put in two dates, the start date and end date.

Th Sql code for some reason dont' not give me the right result. It must be wrong!!!:rolleyes: Help me fix it!!!


SELECT DeliveryAA.itemnameAA, Sum(DeliveryAA.delqtyAA) AS SumOfdelqtyAA, Sum(ItemSaleAA.saleqtyAA) AS SumOfsaleqtyAA, DeliveryAA.timedateAA
FROM SupplierAA INNER JOIN (SaleAA INNER JOIN ((DepartmentAA INNER JOIN DeliveryAA ON DepartmentAA.deptnameAA = DeliveryAA.deptnameAA) INNER JOIN ItemSaleAA ON DepartmentAA.deptnameAA = ItemSaleAA.deptnameAA) ON SaleAA.salenoAA = ItemSaleAA.salenoAA) ON SupplierAA.splnoAA = DeliveryAA.splnoAA
GROUP BY DeliveryAA.itemnameAA, DeliveryAA.timedateAA
HAVING (((DeliveryAA.timedateAA) Between #1/1/2004# And #12/31/2004#));

View 3 Replies View Related

Print Dialogue Box? Chosing Printer

Sep 14, 2005

Hello,

Is it possible to get Access to open the print dialogue box instead of printing direct to the default printer when using the print command?

Thanks

View 1 Replies View Related

Print Dialogue Box? Chosing Printer

Sep 14, 2005

Hello,

Is it possible to get Access to open the print dialogue box instead of printing direct to the default printer when using the print command from a button?

Thanks

View 3 Replies View Related

Creating Two Tables - Old Entries And Weekly New Entries?

Mar 13, 2014

I have a table in access which is updated weekly; I need to create two tables from this updated table.

1st table will consist of all the new entries for the current week

2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.

ID
Name

1
Adam

2
Ben

This week I have three new entries New entries

ID
Name

3
Charles

4
Richard

So when I run the same query next week I will get something like this.

Old Entries
ID
Name

1
Adam

2
Ben

3
Charles

4
Richard

[code]....

How do I get a query /queries which divides up the weeks new entries and also all the old entries.

View 11 Replies View Related

Modules & VBA :: Search CSV To Find Specific Statement / Text On Specific Line?

Jul 8, 2015

how to read a specific line in a CSV file (using VBA), to see if the phrase "There are no records available." is present.

If it is present, then I'm going to do a debug.print stating that there are no records to load - and then the script will move on to the next file. If the phrase isn't present, then I'm going to upload the file to Access, parse the information, and then upload it to a CRM. (I already have the latter portion of the code up and running....I just need to account for the first part, where I can determine if the file has data or not).

The structure of the file never changes. The first row is composed of eight column headers (Post Date, Card Number, Card Type, Auth Date, Batch Date, Reference Number, Reason, Amount) and (if) the phrase "There are no records available." is present, it will show up on the second row, in the first column (under Post Date).

View 3 Replies View Related

Exporting To A Specific Excel Spreadsheet, And A Specific Worksheet/cells

Oct 6, 2005

Hi,

I have recently been doing a lot of work on this area. Im able to export to where i want to and run macros through the VBA code inside of Access to edit the spreadsheets. This is ok if your making a new excel workbook/worksheet.

But what im stuck on is exporting to a so called template in excel. I can export to it at the moment but creating a new worksheet, in which i have to then cut and paste the data into the correct worksheets through code and then delete the worksheet that i had been working from (which is annoying because you have to confirm the deletion of this worksheet, which is why i couldnt really do the process this way).

What i want to know is there a specific way of telling the data you are exporting from a table/query/querydef to go into a certain worksheet and into a certain cell. For example; a list of names, i want all the Surnames to go into a worksheet called "Claim_Breakdown" and start from cell "A15" downwards until they have all been exported into the worksheet.

Anyone have any ideas on how i could achieve this? Thanks.

View 4 Replies View Related

Forms :: How To Hyperlink From Query To Specific Record In A Specific Form

Jul 23, 2013

I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?

View 3 Replies View Related

Button For Sending A Specific Row Of Information To A Specific Email Address?

Oct 8, 2015

I am trying to figure out how to make a button that sends an email to a specific email address, containing the information from 1 row.

we have rows where we put the the address, the quantity and the time interval we can collect the packages in. these information have to be send to a trucking company. I want access to send an email to the trucking company's email address, and not a whole report of all the rows, but be able to choose to send row 1,2,3 etc.

View 1 Replies View Related

Pulling Specific Data For Specific Date Range

Jul 14, 2007

so i have an interesting question and im hoping that someone can help on this one. i need to pull date from a specific table, no problem, that's written and working fine, next i need to be able to join the data from another table by a primary key, again no problem. third, i need to be able to select the date (using WHERE) for a specific date range. (i.e. i enter the date range of 01/7/2007 to 15/7/2007) and the query comes back only showing the data from that specific time, not the data from before or after. this is where my problem lies, all the entered data is being shown after entering my date range. i am going to include my SQL statement, just so you can actually see what im really talking about.

SELECT srealest.Name0, srealest.Dist1, SREpayments.Face2Pd, SREpayments.Penalty2Pd, SREpayments.[2paid], SREpayments.Face3Pd, SREpayments.Penalty3Pd, SREpayments.[3paid], SREpayments.Face4Pd, SREpayments.Penalty4Pd, SREpayments.[4paid], srealest.Map, srealest.Parcel, srealest.LeaseHold, srealest.TaxRebate1, srealest.TaxFace1, srealest.TaxPenalty1, srealest.TaxYear, srealest.BillNo, srealest.PdRebate1, srealest.PdFace1, srealest.PdPenalty1, srealest.DatePd
FROM SREpayments INNER JOIN srealest ON SREpayments.BillNo=srealest.BillNo
WHERE (((SREpayments.[2paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]) Or ((SREpayments.[3paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]) Or ((SREpayments.[4paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date])) Or (((srealest.DatePd) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]))
ORDER BY srealest.Name0;


any thoughts or ideas on how to accomplish this would be greatly appreciated!

View 2 Replies View Related

Locking A Specific Field Of A Specific Record

Oct 3, 2005

Hello, I have just spent ages doing searches and reading everything I can on locking. But, I have yet to find an answer as to how I can lock a specific field in a specific record.

e.g. Staff enter customer details, then at the end of the day the admin (me) checks it over and presses a big old button that stops them from locking certain fields in the current record only - they must still have access to the unlocked fields of the current record, and it must not lock any other records.

I'm guessing there's some VB code in the form of fieldname.lock = true, but then it locks the field throughout the whole table!

Can anyone tell me how to do this please?

View 11 Replies View Related

Forms :: Copy Specific Fields From Selected Record To Specific Fields In Subform?

Jul 9, 2015

I am new to access i have a problem which is i have made a form which contains a subform and a read only subreport, what i want is the ability to select a record in read only subreport as in the picture attached and make a button that when i press on it, it should copy the values of the itemsID field, Packing field, ContainerNo field and origin field from the selected record and then paste them in the subform below.

Also i want to add more then one item, so the when i press on another record it should paste the values below the first record.

View 12 Replies View Related

How Do I See More Than 10,000 Entries?

Dec 21, 2005

I am looking into a database that has become very large (20,000+ entries) and access only allows me to look at the first 10,000. I am sure there is an easy way to check this out, but I am new to access, any help would be appreciated. Thank you.

View 2 Replies View Related

Entries Sum

Aug 2, 2007

is there a way to total up the number of rows i have in a table/query and have that number show up on a new seperate row kinda like the way sums are shown in msexcel. using access2003 btw, thanks

View 2 Replies View Related

Getting 2 New Entries In DB

Mar 29, 2006

When I try to add a topic to my database it adds the topic twice (using Internet Explorer). When I use Firefox it only adds one (as it should).

I realy don't know what's wrong

Anyone an idea?

Code:if Process="AddToDb" then'Add to DBset conn=Server.CreateObject("ADODB.Connection") conn.Open "w002399556_db_new" sql="INSERT INTO tblReview (TopicID, ReviewActiv, FieldName, ReviewTXT, Autor, Editor ) VALUES ('" & PlantID & "', True, '" & FieldName & "', '" & strMessage & "', '" & LoggedInUserID & "', '" & LoggedInUserID & "')"conn.Execute sql,recaffectedconn.closeSet conn = Nothingresponse.redirect(domain & "/db.asp?id=" & topicID)end if

View 2 Replies View Related

To Many Entries

Dec 13, 2006

hello,
I have a Database table that was pretty big, there is a little over 18k entries, so many that the form I was using won't display them all, so I had to split it into several tables, and made forms for each, now the database users want to make a mailing list out of all these different tables, they want to be able to display the entries from sertain fields with checkboxes and not others, but I can't figure out how to make a query and/or report that will look into all the different tables and pull information from all of them to make into one.
In case that wasn't clear, basicaly I have:
DB A-H
DB I-M
DB N-S
DB T-Z

and I want to make a mailing list that will look into all the tables and print only those which have the "member" field check box marked.
is there any way I can do this? do I sound stupid for not being able to figure this out? I've tried google but can't get any information that helps me, maybe I'm typing the wrong thing.
if anyone can help it will be greatly appreciated

View 3 Replies View Related

Bad Entries - Is There An Error Log?

Oct 10, 2006

I have a small access db in a network which has started to crap out far too often lately. The main table records job entries and inserts a date stamp. Every now and then, an entry has a ridicuous ID (auto inc field) and/or a bad date stamp and i can't delete the record (instead i have to output everything to ecel as best i can, reimport it to a table and reset al the fields..)

i don't know what the problem is but i'm wondering if access writest to a log file somewhere (that might help) or if there is a way to make it do this?

cheers
jg

View 3 Replies View Related

Multi Entries

Dec 5, 2004

Hi everybody

I have an assesment and need to create a database, I'm just starting with access and I need some little help if anyone has time.

I'm doing the database for an interim managment company and i have problem with the experience category. Basically because every candidate has got at least 3 or 4 different experiences, I don't know how to design the table. All I know is that I probably will have to create a separate table for this.

Thanks to anyone who will help me.

Ilan

View 2 Replies View Related

Limiting Entries

Feb 14, 2008

Hello, I need help. I have two tables.

horse_entries
ent_HorseName (PK)
ent_entries

horse_information
inf_HorseName (PK)
inf_Ground
inf_Notes

It is a many-to-many relationship. When I open a table and enter a record there is a small + sign that allows me to open up the rows from the other table to enter directly into it. Can this be turned off? Also I can enter more than one record through this way. I only want one entry in inf_Ground, inf_Notes and inf_Entries for each HorseName. How would I do this? As you can tell I am completely new to Access and trying to learn. Thanks :)

View 2 Replies View Related

10 Most Recent Entries

Apr 6, 2006

Hi,

I am trying to set up a query which will filter out the 10 most recent additions by date.

My table contains a 'Title' field and a 'Date Added' field. I am trying to get the 10 most recent titles up in a query so I can then create a report based on this.

So far I have managed to single out the most recent date simply by using the MAX function but am a bit lost from there on..:(

View 2 Replies View Related

Default Entries ?

May 8, 2006

Say I have table called "project" that hold info like project name, project date, # of project, etc.

And I have a table "employee" that hold info like name, salary, # of employee, etc.

Project and employee are linked together ( many to many ) on a junction table. Basically "# of project" and "# of employee" are connected in a junction table.

As such it is easy to add or remove people off a project.

However many people are present in nearly all projects. As such I'd like to make it so that each time a new project is created, it assign those people to the project by default.

Is there a way to do this ?

View 2 Replies View Related

Duplicate Entries

Mar 30, 2006

hello,
Currently i have a database that holds information about computers. Each computer has a Service tag and is associated to a person. I need to be able to prevent duplicate service tags from being entered. I am using indexing and don't allow duplicates from the table design view. But, if a duplicate service tag is indeed entered, i want to inform the user who that service tag currently belongs too without having to search through the DB manually. I need then to give the user the option to delete the duplicated record they just entered or change the service tag that they just entered. Thanks.
Jared

View 2 Replies View Related

Validating IP Entries

Jul 28, 2006

Hey,

In a form I am trying to complete, I want the user to be able to enter in an IP address like so

192168<user hits space bar>0<user hits space bar>1

Would convert to - 192.168.0.1

Is there an input mask which allows this to happen?

Thanks.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved