Hi,
If the query is written in the following format then the problem can be solved.
SELECT *
FROM Table_Name AS MyAlias
WHERE (SELECT COUNT(1) FROM Table_Name WHERE Primary_Key_ID <= MyAlias.Primary_Key_ID)
BETWEEN 16 AND 20
write back on doubt. thanks.
Sandeep
See Microsoft knowledge base article Q152032 for additional information. Moving to SQL Server will depend a bit on what version of Access you're using. With Access 95, download the upsizing wizard from the Access portion of the Microsoft
site ( http://www.microsoft.com/access, or directly here)...
Since the table structure is not known to me thats why I cant give u the exact query... but u can use the following logic
---------------------------------------------------
SELECT * FROM Orders A
WHERE (SELECT COUNT(*) FROM Orders WHERE OrderID < A.OrderID ) / 3 * 100 < 33.3...
Ooooooooops !!!! SORRY... Some change... in the second last line.
------------------------------------------------------
DECLARE @Consultant varchar(255)
SELECT @Consultant = COALESCE(@Consultant + ', ', ' ') + strConsultantName
FROM project, projectConsultant, Consultant
WHERE...
Since, Creation of CURSOR is a overhead to the system, it will hinder in performance.
Please check the following solution.
------------------------------------------------------
DECLARE @Consultant varchar(255)
SELECT @Consultant = COALESCE(@Consultant + ', ', ' ') + strConsultantName
FROM...
The following is just CUT and PASTE from www.sql-server-performance.com
Here are some tips on how to avoid deadlocking on your SQL Server:
· Ensure the database design is properly normalized.
· Have the application access server objects in the same order each time.
· During transactions, don't...
Use it like it...
DECLARE @mComment varchar(500)
SELECT @mComment = COALESCE(@mComment, ' ') + Comment
FROM Table1
SELECT DISTINCT req, @mComment
FROM Table1
This should work... Please check out.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.