To get a similar result in SQL Server, you need to use CASE.  See Books
Online.

John Viescas, author
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
Running Microsoft Access 2000
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
For the inside scoop on Access 2007, see:
http://blogs.msdn.com/access/


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Abu Bakar Chowdhury
Sent: Monday, May 22, 2006 9:38 AM
To: [email protected]
Subject: RE: [ms_access]

I want to use it in MS SQL server. Can u help?



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of John Viescas
Sent: Monday, May 22, 2006 12:56 PM
To: [email protected]
Subject: RE: [ms_access]

SELECT [Name], Address, Choose(Count([Time]), "Once", "Twice", "Thrice",
"Four", "Five", "Six") As NumTimes
FROM MyTable
GROUP BY [Name], Address

John Viescas, author
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
Running Microsoft Access 2000
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
For the inside scoop on Access 2007, see:
http://blogs.msdn.com/access/


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Abu Bakar Chowdhury
Sent: Monday, May 22, 2006 8:41 AM
To: [email protected]
Subject: [ms_access]

Hi all



I have a table containing the following fields



Name    address             time



I want to make a query if a name and address is same and time is grater than
1 and less then 3 then it will show as Twice

And if a name and address is same and time is grater than 2 and less then 4
then it will show as Thrice



Pls help





[Non-text portions of this message have been removed]





Yahoo! Groups Links












Yahoo! Groups Links













Yahoo! Groups Links










SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to