Click here to Skip to main content
15,911,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I want to create a function in sql server where I want to display some record.

Example:-suppose 123

It will show all possibilities value by taking 123 which has no duplicate value.



thanks.
Posted
Comments
OriginalGriff 16-Feb-12 3:33am    
Sorry, but that does not make any sense.
Perhaps if you gave us an example of what you are trying to do?
Remember, we can't see your screen, access your HDD, or read your mind! :laugh:
Use the "Improve question" widget to edit your question and provide better information.

1 solution

SQL
CREATE FUNCTION [dbo].[fnShowDistinct123] (

)
RETURNS TABLE
AS


RETURN
(
SELECT TOP 123 * FROM
(
SELECT  DISTINCT *  FROM Table1
) as tabl1
)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900