473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

adding Unique ref number to each row in a query??

Acc 97

Hi, I am in need of some help here....
I have a query which is based upon time, where i need to plot the
hours
a job has been working.. therefore, oN & off in a union query.

problem...

the same time-frame is used, ie..

on off
12:00 14:00
12:00 14:00
12:00 15:00
12:10 15:00
2 questions!

I need to add a unique number to my query, to make a running sum work!
which must be able to run independently while also within data block.
(Ie have the ability to re-set to zero over one defined datablock)
1) how can this be done?

2) Can any one show me how I influence the next number in the
preceeding row? say,.. increase it by a factor of 1, which would then
give me my unique number.

or there maybe other options which elude me...
Thanks...
Nov 12 '05 #1
3 5726
Alex wrote:
Acc 97

Hi, I am in need of some help here....

I have a query which is based upon time, where i need to plot the
hours
a job has been working.. therefore, oN & off in a union query.

problem...

the same time-frame is used, ie..

on off
12:00 14:00
12:00 14:00
12:00 15:00
12:10 15:00

2 questions!

I need to add a unique number to my query, to make a running sum work!
which must be able to run independently while also within data block.
(Ie have the ability to re-set to zero over one defined datablock)

1) how can this be done?

2) Can any one show me how I influence the next number in the
preceeding row? say,.. increase it by a factor of 1, which would then
give me my unique number.

or there maybe other options which elude me...

Thanks...


Go to support.microsoft.com. They have a download called RptSmp97....lots
of sample queries.

If you don't have an autonumber in the table with the From/To dates, add
one.

Nov 12 '05 #2
Salad,
Running totals are a supported feature of Access reports. I am not aware of
the ability to do a running total in SQL, though. Simplest solution would
be a bound report with your running total in there.

"Salad" <oi*@vinegar.com> wrote in message
news:40***************@vinegar.com...
Alex wrote:
Acc 97

Hi, I am in need of some help here....

I have a query which is based upon time, where i need to plot the
hours
a job has been working.. therefore, oN & off in a union query.

problem...

the same time-frame is used, ie..

on off
12:00 14:00
12:00 14:00
12:00 15:00
12:10 15:00

2 questions!

I need to add a unique number to my query, to make a running sum work!
which must be able to run independently while also within data block.
(Ie have the ability to re-set to zero over one defined datablock)

1) how can this be done?

2) Can any one show me how I influence the next number in the
preceeding row? say,.. increase it by a factor of 1, which would then
give me my unique number.

or there maybe other options which elude me...

Thanks...


Go to support.microsoft.com. They have a download called RptSmp97....lots
of sample queries.

If you don't have an autonumber in the table with the From/To dates, add
one.

Nov 12 '05 #3
Alex,
I have another reply. I've posted this before so a search of Google might
turn up that previous post. Autonumber works great as long as you need a
number that is created with the record and doesn't change. If you have a
need for a custom sequence number that changes with each report run the best
way I am aware of is a stored procedure that increments a number stored in a
column in a table and returns the incremented number.

"Alex" <ge****@yas1.freeserve.co.uk> wrote in message
news:b7**************************@posting.google.c om...
Acc 97

Hi, I am in need of some help here....
I have a query which is based upon time, where i need to plot the
hours
a job has been working.. therefore, oN & off in a union query.

problem...

the same time-frame is used, ie..

on off
12:00 14:00
12:00 14:00
12:00 15:00
12:10 15:00
2 questions!

I need to add a unique number to my query, to make a running sum work!
which must be able to run independently while also within data block.
(Ie have the ability to re-set to zero over one defined datablock)
1) how can this be done?

2) Can any one show me how I influence the next number in the
preceeding row? say,.. increase it by a factor of 1, which would then
give me my unique number.

or there maybe other options which elude me...
Thanks...

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Berry | last post by:
Hi All. I'm trying to write an ASP page that shows me the UNIQUE account number for a customer (so I can pass it to another page) based on a search criteria. For example, I want to do a select...
1
by: Bryan Zash | last post by:
When querying a bit field, I am encountering a problem with MS SQL Server returning a larger number of records for a table than the actual number of records that exist within that table. For...
2
by: SJM | last post by:
I have a report that displays records of real estate properties. It is possible for each property to appear a number of times for various reasons. Each record however is unique. What I would like...
1
by: tHeRoBeRtMiTcHeLL | last post by:
Below is an earlier post to an Excel Group.. ....but I thought that there might be a way to do this in Access by importing data and then creating append and/or update query. I would most certainly...
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
10
by: mscurto | last post by:
What is the syntax for an sql command to get the following. I want to pull in a handful of fields from a table but one of the fields needs to be unique. For example, if I have a customer table...
8
by: Marc | last post by:
Hi all, I have to generate and send to a printer many 6 digit alphanumeric strings. they have to be unique but I cannot check in a database or something like that if it have already been printed....
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.