I'm wondering whats wrong with that Statement.

```
INSERT INTO Table1(Myname,category ) 
 SELECT TOP 1 thenames
FROM tNames
 WHERE DateAdded > DATEADD(Day, -10, GETDATE() 
ORDER BY NEWID(),@ccategory)

```

I want to pick one random value from table tnames and put it in table 1 with category values that i got from SP.
How should I do that?

**EDITS:**
I'm working in MS SQL Server.
Complete code:

```
Create PROCEDURE [dbo].[Names_SP] 
@CCategory nvarchar(50)

AS

BEGIN
    INSERT INTO Table1(Myname,category ) 
     SELECT TOP 1 thenames
    FROM tNames
     WHERE DateAdded > DATEADD(Day, -10, GETDATE() 
    ORDER BY NEWID(),@ccategory)
END

```

When I call SP I send @ccategory. Since table 1 has 2 columns (the first is category) I want to get the second (myname) column value from tname table as random (names that have been added in 10 days).