Unclosed quotation mark after the character string '+ Convert .ToInt32 (cmb_customername .SelectedVa

Posted by Sudheep.grandhe under Sql Server on 12/9/2011 | Points: 10 | Views : 2941 | Status : [Member] | Replies : 1
Hi,

i wrote the query it show the following errors.please correct those errors.


select t2.compname,t2.compaddress,t2.invoiceno,t2.orderno,t2.ondate,t2.invoicedate,t2.amountstatus,t2.netamount,t2.netvat,t2.tamount,t1.particulars,t1.quantity,t1.perprice,t1.amount from tbl_report2 t2 left join tbl_report1 t1 on t1.invoiceno=t2.invoiceno where t2.invoiceno ="+ Convert .ToInt32 (cmb_customername .SelectedValue )+"",con)

Errors:Incorrect syntax near '+ Convert .ToInt32 (cmb_customername .SelectedValue )
Unclosed quotation mark after the character string '+ Convert .ToInt32 (cmb_customername .SelectedValue )

Best,
Sudheep.



Responses

Posted by: Hmanjarawala on: 12/9/2011 [Member] Bronze | Points: 25

Up
0
Down
Write this

select t2.compname,t2.compaddress,t2.invoiceno,t2.orderno,t2.ondate,t2.invoicedate,t2.amountstatus,t2.netamount,t2.netvat,t2.tamount,t1.particulars,t1.quantity,t1.perprice,t1.amount from tbl_report2 t2 left join tbl_report1 t1 on t1.invoiceno=t2.invoiceno where t2.invoiceno ="+ Convert .ToInt32 (cmb_customername .SelectedValue ).ToString()+"",con) 


Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response