Click here to Skip to main content
15,913,055 members
Home / Discussions / Database
   

Database

 
AnswerRe: Problem in Query Pin
Usharva29-Nov-07 23:28
Usharva29-Nov-07 23:28 
QuestionSQL 2005 Pin
Sipder29-Nov-07 22:40
Sipder29-Nov-07 22:40 
AnswerRe: SQL 2005 Pin
Colin Angus Mackay29-Nov-07 22:57
Colin Angus Mackay29-Nov-07 22:57 
AnswerRe: SQL 2005 Pin
Frank Kerrigan30-Nov-07 0:12
Frank Kerrigan30-Nov-07 0:12 
Questionset command error Pin
veereshIndia29-Nov-07 22:03
veereshIndia29-Nov-07 22:03 
AnswerRe: set command error Pin
Marek Grzenkowicz29-Nov-07 22:22
Marek Grzenkowicz29-Nov-07 22:22 
GeneralRe: set command error Pin
veereshIndia29-Nov-07 22:27
veereshIndia29-Nov-07 22:27 
GeneralRe: set command error Pin
veereshIndia29-Nov-07 22:39
veereshIndia29-Nov-07 22:39 
Hi Sir,

Once again iam getting this error.Iam very new to Sql .Can please tel me
how to use single quotes in query.Also giv me some help to this query



Alter procedure LogProc
(
@UserId varchar(500),
@Password varchar(500)
)
as
declare @str1 varchar(500)
declare @str2 varchar(500)
set @str1 = ' select AstId from UserTable where UserId = ''' + @UserId + ''' and Password = ''' + @Password + ''''
exec (@str1);
set @str2=' select RoleId from AstProf where AstId = ' + @str1
exec(@str2);



exec LogProc 'veeresh','veeresh'

Iam getting this error

(1 row(s) affected)

Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'select'.


i want to join this group

GeneralRe: set command error Pin
riyam hussain mm30-Nov-07 0:42
riyam hussain mm30-Nov-07 0:42 
AnswerRe: set command error Pin
Joe29-Nov-07 22:30
Joe29-Nov-07 22:30 
QuestionBulk Update Fails Pin
Joe29-Nov-07 21:58
Joe29-Nov-07 21:58 
AnswerRe: Bulk Update Fails Pin
andyharman29-Nov-07 22:36
professionalandyharman29-Nov-07 22:36 
GeneralRe: Bulk Update Fails Pin
Joe29-Nov-07 23:46
Joe29-Nov-07 23:46 
GeneralRe: Bulk Update Fails Pin
andyharman30-Nov-07 2:06
professionalandyharman30-Nov-07 2:06 
AnswerRe: Bulk Update Fails Pin
Mike Dimmick30-Nov-07 0:58
Mike Dimmick30-Nov-07 0:58 
GeneralRe: Bulk Update Fails Pin
Joe30-Nov-07 1:23
Joe30-Nov-07 1:23 
QuestionA recursive dilema??? Pin
AndyBrew7029-Nov-07 21:06
AndyBrew7029-Nov-07 21:06 
AnswerRe: A recursive dilema??? Pin
pmarfleet29-Nov-07 21:17
pmarfleet29-Nov-07 21:17 
AnswerRe: A recursive dilema??? Pin
AndyBrew7029-Nov-07 23:55
AndyBrew7029-Nov-07 23:55 
Questionsql,query very urgent Pin
rameshdontagani29-Nov-07 19:14
rameshdontagani29-Nov-07 19:14 
AnswerRe: sql,query very urgent Pin
Joe29-Nov-07 19:41
Joe29-Nov-07 19:41 
GeneralRe: sql,query very urgent Pin
rameshdontagani29-Nov-07 19:44
rameshdontagani29-Nov-07 19:44 
GeneralRe: sql,query very urgent Pin
Vasudevan Deepak Kumar29-Nov-07 19:54
Vasudevan Deepak Kumar29-Nov-07 19:54 
AnswerRe: sql,query very urgent Pin
Vasudevan Deepak Kumar29-Nov-07 19:55
Vasudevan Deepak Kumar29-Nov-07 19:55 
QuestionMySQL quick question Pin
sonywar29-Nov-07 14:32
sonywar29-Nov-07 14:32 

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.