MS Access 2010 database - database

I am not sure if this the proper forum for my kind of question but since you all guys are programmers perhaps you know a bit of everything. :)
So what I want to do is to create in MS Access a simple contact database (for my clients). BUT I want for each of my contacts (AKA records) to be able to add info assigned to dates (something like subform-record I guess) one info (note) assigned to one date for each record/client
Example:
Record 1: Bill Smith.
Date 17/02/2012 note: "I got 30$"
Date 18/05/2012 note: "I got 30$"
Record 2: Spencer Williams.
Date 17/02/2012 note: "I got 30$"
Date 18/05/2012 note: "I got 30$"
Date 19/05/2012 note: "I got 30$"
and so on...
notice that different records will give me info in the same dates sometimes.
In conclusion I wanna make a contact database for my clients but since I am having regular dates with them I want to take notes for each client : "what date" , "how much he gave me".

in case you are new comer in ms access world, I recommended to look at ready to use template. That can be downloaded from Microsoft site. For example : microsoft templates
in this et of template there is contact database

Related

Pull a Date from a comment

Good Morning All.
I have a comment field from an invoice system. The user goes into the invoice and leaves a comment/note on it. The source system tags each note with a date. However, the month is either a single digit or a double digit based on the date the note was entered same with the day. So the issue I am having is that I want to pull all of the invoice notes that start with a certain time period. So the notes always start like either one of these:
6/7/16 7:51 AM
11/11/16 8:11 PM
Is there a way to pull the date from the beginning of the note say using AM or PM as the starting point and working back to the beginning of the string?
What I can tell is that you might use Regular Expressions to extract the date from the string, but SQL server doesn't support the regular expression!
A work around is to use CLR, here an article that explain how to achieve what you want. Regular Expressions in MS SQL Server 2005/2008
To get some help on how to build the regular expression to match the dates, here another article that might help you : Regular Expression Library
The date regular expression could be ((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{2})) ((\d{2})|(\d)):((\d{2})|(\d)) [AP]M
Hope this will help you

Access 2013 VBA needed for making a stage-time table

I have two tables:
tblTimelist which contains a time table field (Time, short time) (from 00:00 til 23:45, with intervals of 00:15)
tblProgScheme which contains the fields prog_ID, BeginShow (short time), EndShow (short time) and ActName.
I want a list based on the BeginShow and EndShow times looking like this:
12:00 Justin Bieber
12:15 Justin Bieber
12:30 Justin Bieber
12:45 Justin Bieber
13:00 Miley Cyrus
13:15 Miley Cyrus
13:30 Miley Cyrus
In this example the values of the fields "BeginShow" and "EndShow" were 12:00 and 13:00 for Bieber respectively and 13:00 and 13:45 for Miley.
I tried all kinds of joins in queries without success.
I think I might solve the problem with VBA because I think I have to code something with a "Do Until Loop" but I cannot find the proper code to put the ActName value somewhere into tblTimeList and making the right criteria at the same time.
Can somebody give me a hint where to find a clue?
Yeah... you found a place where the MS Access Query "Design View" throws hiccups. It can not display queries that use > or < signs.
But even though "Design View" won't display the query nicely, you can go into "SQL View" and paste the following Left Join on a range query:
SELECT
tblTimeList.Time
,tblProgScheme.ActName
FROM
tblTimeList
LEFT JOIN tblProgScheme ON
tblTimeList.Time >= tblProgScheme.BeginShow
AND tblTimeList.Time < tblProgScheme.EndShow
ORDER BY tblTimeList.Time;
This should give you the results you are looking for. Save it and close the query while still in "SQL View".
The only danger is that if you open this in "Design View" and make changes, and then save it... it'll eliminate the code that has > or < signs.
So don't do that.
If you need changes, just make them in "SQL View". (It'll do you good to learn how to code in straight SQL without the "Design View". You can make much more powerful and much more useful Queries that way.)
Also, keep in mind. The above code will allow you to overlap concert times. It will create a entry for each act at each valid time slot. So you could have multiple records with the same time segment where an overlap occurs. To identify if you have any, you can create another query that looks for the duplicate times.
Anyway, I hope that helps and I hope you get to enjoy lots of good music. :)
EDIT
Ok, I know Access 2013 will allow you to use Left Joins. So maybe it's a syntax thing. Double check all of your spellings of your tables and fields. Also check capitalizations (although that shouldn't be a problem, access can be screwy sometimes). Plus add parenthesis and make sure they match properly. Access tries to add parenthesis if you don't include them. Usually it gets it right, but sometimes it guesses wrong and mucks up your code.
With that in mind, try the following:
SELECT tblTimelist.Time, tblProgScheme.ActName FROM tblTimelist LEFT JOIN tblProgScheme ON ((tblTimelist.Time >= tblProgScheme.BeginShow) AND (tblTimelist.Time < tblProgScheme.EndShow)) ORDER BY tblTimelist.Time;

User Profile: Birthday VS Anniversary

I am creating a contact list and as usual I like to see how others do it. I went to see full-contact and they have 2 fields on the users profile, one for birthday and another for anniversary.
I thought that they where the same, but apparently they are not.
Does anyone knows the difference between he two?
If you know why, then why is that full-contact is using both?
Which one should I use?
Usually the "Birthday Represent the date of birth while the "Anniversary" represents the day of marriage.

Get the region name in maxmind database

I have downloaded a database cities
`Country` `City` `AccentCity` `Region` `Population` `Latitude` `Longitude`
af amir kalay Amir Kalay 16 0 34.6333 70.3333
ad aixas Aixas 06 0 42.4833 1.4667
and lot more records
I have downloaded another database called fips_10_4 to show the state of the city
country,Region,State
AD,02,"Canillo"
AD,03,"Encamp"
AD,04,"La Massana"
AD,05,"Ordino"
AD,06,"Sant Julia de Loria"
AD,07,"Andorra la Vella"
AD,08,"Escaldes-Engordany"
AE,01,"Abu Dhabi"
Now if you are thinking that Iam asking for some sql query then you are wrong.
Everything was working fine but then I came to know that the file i downloaded from
Maxmind website is incomplete as 'fips_10_4' has no record for country 'af' and region '16' .May anybody help me to deal this problem and tell me the correct place to download this complete file
FIPS 10-4 has changed. The list of changes can be found here.
In particular, AF16 (Laghman) has changed to AF35. MaxMind uses the new list.
If you need both the old and the new codes, you can find them here. You can parse the contents of the file, and replace your database table with the information found there.
AF is the two digit ISO code (IS0-3166-2) for Afghanistan, which ISO are currently trying to sell for the frankly astonishing sum of CHF 244 (Swiss Francs).
As Teleo says FIPS 10-4 has changed as detailed on the ITL website and the link Teleo has given provides the data in a more usable format. MaxMind also provides it in a better format.
I would be extremely wary about using this. Both MaxMind & Teleo's link are being provided, for free, by an external company/person that has no particular interest in keeping their data up-to-date. I notice, for instance, that the following countries are missing:
South Sudan
Sint Martaan (Dutch Part)
Bonaire, Sint Eustatius and Saba
Curaçao
The last three were part of the Netherlands Antilles, which was dissolved on 10th October 2010. Incidentally, the Netherlands Antilles, which hasn't existed for a year and a half, is still on this file.
The reason for all of this? FIPS 10-4 was withdrawn almost a decade ago on 8th September 2002. To quote the ITS website (my emphasis):
“For a replacement to FIPS 10-4, INCITS L1 is coordinating with other
standards developers and interested parties to determine whether
processing a draft proposed American National Standard or adopting an
ISO standard would be the better way forward. For more information on
the status of this activity, contact Rick Pearsall
(Richard.A.Pearsall#nga.mil).”
A quick Google brings the news the INCITS L1 is next meeting on the 12th June 2012. I wouldn't hold your breath.
Another reason not to use FIPS is that it is unlikely to be used much outside of the USA (obviously some people will still use it). While this may not matter immediately I would future proof your systems as a matter of course.
I would highly recommend using the ISO 3166 standard. It is a globally recognised way of categorising country data.
The CommonDataHub maintains a great version, which includes country and state in the same manner as FIPS 10-4. They also have other ISO states databases, which are more normalised and worth investigating.
It also maintains a list of all cities with a population greater than 5,000.
ISO maintain a copy on their website of the 3166-2 standard, which will take a bit of coding to ensure it's you're always updated at least you'll be sure it's correct. Wikipedia is also surprisingly good at keeping up-to-date. It beat CommonDataHub by a month when South Sudan was created, due to problems telling people that the data existed.
There are other places out there where this data exists, this just details what I use.
If you want to avoid databases all-together then the Yahoo! PlaceFinder API is a good place to start. It has some documented problems keeping up-to-date but at least there's a place where you can tell them they've got it wrong.
tl;dr
Don't use FIPS, it was withdrawn a decade ago. Use the globally recognised ISO standard instead.
I am not sure what is your true goal, but here is a great resource of countries and cities and all...

Magento - get list of items from orders for specific date range

Magento database name convention is not trivial. How to get these fields below for last 7 days?
Last Name
First Name
Address
City
State
Zip
Phone
Email
Amount
Order #
Item #
I could not tell if you were looking for some PHP/Magento code or if you are looking to access the database directly. It might be "better" to create yourself a custom module that fetches this info using the Magento/Zend framework, but since I don't know the code off the top of my head I'll redirect you to the following link which has a very nice SQL query that will pull that info for you (and more).
http://www.magentocommerce.com/wiki/groups/207/fedex_-_shipping_view
You probably just need to add something like this to the end to filter the last 7 days
where so.created_at > NOW() - INTERVAL 7 DAY

Resources