Avatar of AndyC1000
AndyC1000

asked on 

Query to Fill Table - check if value exists?

Dear All,

I have a table with the below structure.  There are 40 districts.  I need to somehow insert a new row for each district associated with the date placing 0 values.  For example the date 1/01/2004 has three rows of data with districts 1, 2 and 3.  The date 1/01/2004 needs to be replicated 37 times for districts 4-40 placing 0 values in Field1.  You'll notice the next date requires different districts to be inserted.

I have no idea how to accompish this.  Please provide suggestions or examples.

Date                District      Field1
1/01/2004       1                10
1/01/2004       2                30
1/01/2004       3                0
2/01/2004       11              10
2/01/2004       12              10
2/01/2004       13              10
Microsoft Access

Avatar of undefined
Last Comment
als315
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo