473,325 Members | 2,712 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,325 software developers and data experts.

Return Record Number with query

I want to return record number with my query output.

I dont' want to use IDENTITY function and temp table for this purpose as I am dealing with very huge data.


any suggestions...




Riyaz
Mar 28 '07 #1
6 14378
I want to return record number with my query output.

I dont' want to use IDENTITY function and temp table for this purpose as I am dealing with very huge data.


any suggestions...




Riyaz
Hi can you explain a bit more please
Mar 28 '07 #2
Hi can you explain a bit more please

Suppose my query is :

SELECT FirstName, LastName, Address FROM EmpMaster

I want the output like :

SrNo FirstName LastName Address
1 asas dfddsf dfdsf
2 dsfdsfdsf dfdsfdsf dfdfsdf
3 .... and so on


I dont want to use temp table and IDENTITY function as data is very very huge.

Any other solution?


Riyaz
Mar 28 '07 #3
iburyak
1,017 Expert 512MB
IF you use Server 2005.

Try this:

[PHP]select row_number() over (order by ID) as NumberItems, *
from table_name[/PHP]
Mar 28 '07 #4
IF you use Server 2005.

Try this:

[PHP]select row_number() over (order by ID) as NumberItems, *
from table_name[/PHP]

Hi
sorry,
I am using SQL Server 2000

Now tell me what to do.


Thanks
Mar 29 '07 #5
iburyak
1,017 Expert 512MB
You can't get away without temp table on Server 2000.
If you want this solution let me know.


Thank you.
Mar 29 '07 #6
You can't get away without temp table on Server 2000.
If you want this solution let me know.


Thank you.

I am already having this solution but now its performance issue on huge data.

Thanks for your inputs


Riyaz
Mar 29 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Phil Powell | last post by:
My first time working with a PHP class, and after 6 hours of working out the kinks I am unable to return a value from the class, so now I appeal to the general audience what on earth did I do wrong...
8
by: Adrian Parker | last post by:
Hi. I would like to query a database, given several where clauses to refine my search, and return the value of one single field in the database. eg: I have a table that lists teachers. Their...
4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
2
by: Megan | last post by:
Hi everybody- I have 2 tables, Hearings and Rulings. Both have primary keys called, CaseID, that are autonumbers. I don't want both tables to have the same autonumber. For example, if Hearings...
3
by: Chuck | last post by:
Hi, I have a somewhat unique problem (at least unique to me, and I've been doing this for longer than I care to admit). I have a client that needs to print cards onto perforated card stock (so...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
12
by: magmike | last post by:
Accidentally deleted a record. Anyway to get it back? If not, I know the ID number - which is an autonumber field. Because of the related data from other tables, would I be able to create a new...
0
by: emalcolm_FLA | last post by:
Hello and TIA for any help with this non profit Christmas assistance project. I have an applicant (app history) and child (child history) tables (4 total). I need to grab the next available (in...
4
by: bruce24444 | last post by:
I'm working on a database created in Access 97 which has a form which tracks claims made for damages. When the person reports the claim, a form is used to enter Date Reported, Claim Number, Loss...
20
by: tkip | last post by:
Hello everyone. I have been working on this DB for quite some time and still can't figure out a way to do what I want to do. It's a database that keep track of drawings and engineering change etc....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.