Click here to Skip to main content
15,899,314 members
Home / Discussions / Database
   

Database

 
QuestionHow to find nth record in a table using sqlserver. Pin
Sophia Rekhi18-Jun-07 21:31
Sophia Rekhi18-Jun-07 21:31 
AnswerRe: How to find nth record in a table using sqlserver. Pin
iprasad00718-Jun-07 22:12
iprasad00718-Jun-07 22:12 
GeneralRe: How to find nth record in a table using sqlserver. Pin
Sophia Rekhi18-Jun-07 23:39
Sophia Rekhi18-Jun-07 23:39 
AnswerRe: How to find nth record in a table using sqlserver. Pin
Krish - KP18-Jun-07 22:42
Krish - KP18-Jun-07 22:42 
QuestionSetting default value to a column Pin
M. J. Jaya Chitra18-Jun-07 20:01
M. J. Jaya Chitra18-Jun-07 20:01 
AnswerRe: Setting default value to a column Pin
Sylvester george18-Jun-07 20:10
Sylvester george18-Jun-07 20:10 
GeneralRe: Setting default value to a column Pin
M. J. Jaya Chitra18-Jun-07 20:20
M. J. Jaya Chitra18-Jun-07 20:20 
GeneralRe: Setting default value to a column Pin
Sylvester george18-Jun-07 20:25
Sylvester george18-Jun-07 20:25 
GeneralDeleting two tables on different databases located in different servers Pin
N a v a n e e t h18-Jun-07 18:22
N a v a n e e t h18-Jun-07 18:22 
GeneralRe: Deleting two tables on different databases located in different servers Pin
vimal_yet18-Jun-07 19:13
vimal_yet18-Jun-07 19:13 
GeneralRe: Deleting two tables on different databases located in different servers Pin
N a v a n e e t h18-Jun-07 19:32
N a v a n e e t h18-Jun-07 19:32 
GeneralRe: Deleting two tables on different databases located in different servers Pin
vimal_yet18-Jun-07 21:22
vimal_yet18-Jun-07 21:22 
Questionpass the values Pin
seemamltn18-Jun-07 13:17
seemamltn18-Jun-07 13:17 
AnswerRe: pass the values Pin
Colin Angus Mackay18-Jun-07 13:27
Colin Angus Mackay18-Jun-07 13:27 
GeneralRe: pass the values Pin
seemamltn18-Jun-07 13:32
seemamltn18-Jun-07 13:32 
GeneralRe: pass the values Pin
Colin Angus Mackay18-Jun-07 14:26
Colin Angus Mackay18-Jun-07 14:26 
QuestionReturn Value from Stored Procedure Pin
seemamltn18-Jun-07 9:47
seemamltn18-Jun-07 9:47 
AnswerRe: Return Value from Stored Procedure Pin
Colin Angus Mackay18-Jun-07 13:18
Colin Angus Mackay18-Jun-07 13:18 
QuestionError message Pin
seemamltn18-Jun-07 9:43
seemamltn18-Jun-07 9:43 
AnswerRe: Error message Pin
andyharman19-Jun-07 7:23
professionalandyharman19-Jun-07 7:23 
QuestionStored Proc Pin
seemamltn18-Jun-07 8:51
seemamltn18-Jun-07 8:51 
AnswerRe: Stored Proc Pin
Colin Angus Mackay18-Jun-07 9:22
Colin Angus Mackay18-Jun-07 9:22 
seemamltn wrote:
SET @itemReceived = SELECT tck.tcktreceived
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid


Try

SELECT @itemReceived = tck.tcktreceived 
FROM tbtickets AS tck 
INNER JOIN tbticketsmessages AS tckmsg ON tck.ticketid = tckmsg.ticketid


The same goes for the other two SETs with a SELECT in them.


seemamltn wrote:
PRINT @table
return @table


I don't think you can do either of those things.

If you want to return a result set from a stored procedure SELECT it:
SELECT * FROM @table



Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5

Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton


My website

GeneralRe: Stored Proc Pin
seemamltn18-Jun-07 9:43
seemamltn18-Jun-07 9:43 
GeneralRe: Stored Proc Pin
Colin Angus Mackay18-Jun-07 13:10
Colin Angus Mackay18-Jun-07 13:10 
QuestionSet Time Part Of DateTime Pin
Polymorpher18-Jun-07 7:41
Polymorpher18-Jun-07 7:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.