Click here to Skip to main content
15,891,204 members
Home / Discussions / Database
   

Database

 
GeneralRe: MS SQL Selecting all rows in one table and only rows matching in a second Pin
Steven J Jowett5-Nov-09 6:57
Steven J Jowett5-Nov-09 6:57 
GeneralRe: MS SQL Selecting all rows in one table and only rows matching in a second Pin
David Skelly5-Nov-09 23:08
David Skelly5-Nov-09 23:08 
GeneralRe: MS SQL Selecting all rows in one table and only rows matching in a second Pin
Steven J Jowett5-Nov-09 23:36
Steven J Jowett5-Nov-09 23:36 
QuestionUsing OPENROWSET Pin
si_695-Nov-09 2:08
si_695-Nov-09 2:08 
AnswerRe: Using OPENROWSET Pin
jacob.sebastian6-Nov-09 9:38
jacob.sebastian6-Nov-09 9:38 
QuestionHelp On Read Image column from MS Acess Database Pin
maysam gamini5-Nov-09 0:55
maysam gamini5-Nov-09 0:55 
QuestionSql Server 2008 Installing Issue-Not able to see the "Feature Selection " window and further windows after installing till supporting Files Pin
srikrishnakrishna murthy4-Nov-09 23:27
srikrishnakrishna murthy4-Nov-09 23:27 
QuestionHow to assign a query result to a stored procedure Pin
Nekkantidivya4-Nov-09 23:14
Nekkantidivya4-Nov-09 23:14 
Hi,
I my stored procedure I have an insert query. For this I have to get one value from a sub query. But it is not accepting that query. So I tried to declare a separate variable and assign the subquery value to this and insert it in the table.

Create Procedure [dbo].[AddOrRemoveFavourites]
(
@UserId bigint,
@VideoName varchar(50),
)
as

Declare @VideoId int
Set @VideoId = Select VideoId from Videos where Title='Monkeydog'

Insert into Favourites(UserId,VideoId) values(@UserId,@VideoId)


but in this I am getting error like "Incorrect syntax near the keyword 'Select'."

If anyone have any idea to solve this please reply me.

Thanks in advance.
AnswerRe: How to assign a query result to a stored procedure Pin
Eddy Vluggen5-Nov-09 0:08
professionalEddy Vluggen5-Nov-09 0:08 
AnswerRe: How to assign a query result to a stored procedure Pin
Syed Mehroz Alam5-Nov-09 0:45
Syed Mehroz Alam5-Nov-09 0:45 
AnswerRe: How to assign a query result to a stored procedure Pin
Niladri_Biswas5-Nov-09 3:19
Niladri_Biswas5-Nov-09 3:19 
QuestionWhat is the diffrence between SQL Express and SQL Managment Studio ? Pin
nileshbahirshet4-Nov-09 20:57
nileshbahirshet4-Nov-09 20:57 
AnswerRe: What is the diffrence between SQL Express and SQL Managment Studio ? Pin
Mycroft Holmes4-Nov-09 21:09
professionalMycroft Holmes4-Nov-09 21:09 
AnswerRe: What is the diffrence between SQL Express and SQL Managment Studio ? Pin
Niladri_Biswas4-Nov-09 21:28
Niladri_Biswas4-Nov-09 21:28 
AnswerRe: What is the diffrence between SQL Express and SQL Managment Studio ? Pin
Eddy Vluggen4-Nov-09 23:03
professionalEddy Vluggen4-Nov-09 23:03 
Questionsql v/s ms access Pin
sachees1234-Nov-09 20:29
sachees1234-Nov-09 20:29 
AnswerRe: sql v/s ms access Pin
Mycroft Holmes4-Nov-09 21:11
professionalMycroft Holmes4-Nov-09 21:11 
GeneralRe: sql v/s ms access Pin
sachees1234-Nov-09 21:59
sachees1234-Nov-09 21:59 
GeneralRe: sql v/s ms access Pin
Mycroft Holmes4-Nov-09 22:08
professionalMycroft Holmes4-Nov-09 22:08 
GeneralRe: sql v/s ms access Pin
sachees1234-Nov-09 22:27
sachees1234-Nov-09 22:27 
GeneralRe: sql v/s ms access Pin
Eddy Vluggen4-Nov-09 23:09
professionalEddy Vluggen4-Nov-09 23:09 
GeneralRe: sql v/s ms access Pin
sachees1234-Nov-09 23:20
sachees1234-Nov-09 23:20 
GeneralRe: sql v/s ms access Pin
Eddy Vluggen5-Nov-09 0:02
professionalEddy Vluggen5-Nov-09 0:02 
NewsTwo New Editions Join SQL Server 2008 R2 Roadmap Pin
brucedkyle4-Nov-09 8:15
brucedkyle4-Nov-09 8:15 
QuestionNeed help on how to update SQL query using VC++ Pin
John5023-Nov-09 18:55
John5023-Nov-09 18:55 

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.