I have a SQL statement in my VB script to get info from different tables based on a variable that I am using in my script. It works exactly how I want it to work except that now I need to add another condition in my where clause. I can run the SQL statement in SQL Server Management Studio and get my information with the additional condition but syntax especially using quotes in a VB script is very confusing for me. Here is my script -
As I had mentioned I would like to add the condition c.lesion1 = currentLesionRecord("VesselSegment") to my where clause but I am very confused with all the single and double quotes in a VB script
Any help will be greatly appreciated. Thanks
ssql1 = "select c.item,e.vesselsegment, e.prestenosis, e.poststenosis, e.preTIMIFlow, e.postTIMIFlow
from demographics a
inner join event_cath b on a.ss_patient_id = b. ss_patient_id
inner join cath_equipment c on b.ss_event_cath_id = c.ss_event_cath_id inner join cath_extension d on b.ss_event_cath_id = d.ss_event_cath_id inner join lesions e on b.ss_event_cath_id = e.ss_event_cath_id
where c.lesion1 = e.vesselsegment and b.ss_event_cath_id = " & currentCathRecord("SS_Event_Cath_ID")
As I had mentioned I would like to add the condition c.lesion1 = currentLesionRecord("VesselSegment") to my where clause but I am very confused with all the single and double quotes in a VB script
Any help will be greatly appreciated. Thanks