Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My query as follows;

SQL
 SELECT F.facname, 
       BA.examdate, 
       FD.bfid, 
       FD.rate 
FROM   faculty F 
       JOIN bthfac B 
         ON F.facid = B.facid 
       JOIN facfeedback FD 
         ON FD.bfid = B.bfid 
       JOIN batch BA 
         ON BA.bthid = B.bthid 	



when i execute the above query, shows error as follows;

Error converting data type varchar to bigint.


faculty table database structure as follows;
FacId         bigint
FacName   varchar
Fac_active    char(1)


bthfac table database structure as follows;
BFid     bigint
BthId    bigint
FacId    varchar(40)



facfeedback table database structure as follows;
BFid  bigint
Rate   int


Batch table database structure as follows;
 BthId	    bigint	
Examdate   datetime


what is the problem in my above query.

please help me.

regards,
narasiman P.
Posted
Updated 14-May-13 11:13am
v3
Comments
Johnny J. 14-May-13 9:38am    
How many more questions are there in your homework assignment?
[no name] 14-May-13 9:44am    
Are you kidding? Have you looked at this guy's history? He's more of a spammer than anything else. Asking the same questions over and over. If he is a student, he's not learning anything and should just get his money back.
Johnny J. 14-May-13 9:46am    
LOL!

1 solution

You issue is this:
FacId	 varchar(40)	

as a result when you do this:
ON F.facid = B.facid 

you are trying to compare a Varchar(40) with a Bigint which you cannot. Hence your error.
 
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