musimu
New member
- Joined
- Apr 14, 2023
- Messages
- 3
- Programming Experience
- Beginner
Below is a SQL sql query that I want to run in vb.net. How should I be writing this SQL to be accepted in VB.net please?
Select
F.CF_ITEM_NAME As Folder_Name,
r.RN_CYCLE_ID As Test_Set_Id,
t.ts_name As Instance,
"test_set_folder"."CF_ITEM_NAME" AS "Test Set Folder 1",
"test_set"."CY_CYCLE" AS "Tet Set Folder Name"
from Step s,Test t, cycle c, cycl_fold f, Testcycl TC,(select rn_testcycl_id, max(rn_run_id) As max_run_id from run group by rn_testcycl_id)r1 ,
RUN r
RIGHT JOIN TESTCYCL "test_instance" ON "test_instance"."TC_TESTCYCL_ID" = r."RN_TESTCYCL_ID"
RIGHT JOIN CYCLE "test_set" ON "test_set"."CY_CYCLE_ID" = "test_instance"."TC_CYCLE_ID"
INNER JOIN CYCL_FOLD "test_set_folder" ON "test_set_folder"."CF_ITEM_ID" = "test_set"."CY_FOLDER_ID"
LEFT JOIN CYCL_FOLD "test_set_folder1" ON "test_set_folder1"."CF_ITEM_ID" = "test_set_folder"."CF_FATHER_ID"
Where t.ts_test_id = s.st_test_id
and s.st_run_id = r.rn_run_id
and r.rn_run_id = r1.max_run_id
and r.rn_testcycl_id = r1.rn_testcycl_id
and r.rn_execution_date >'01-JAN-2022'
Select
F.CF_ITEM_NAME As Folder_Name,
r.RN_CYCLE_ID As Test_Set_Id,
t.ts_name As Instance,
"test_set_folder"."CF_ITEM_NAME" AS "Test Set Folder 1",
"test_set"."CY_CYCLE" AS "Tet Set Folder Name"
from Step s,Test t, cycle c, cycl_fold f, Testcycl TC,(select rn_testcycl_id, max(rn_run_id) As max_run_id from run group by rn_testcycl_id)r1 ,
RUN r
RIGHT JOIN TESTCYCL "test_instance" ON "test_instance"."TC_TESTCYCL_ID" = r."RN_TESTCYCL_ID"
RIGHT JOIN CYCLE "test_set" ON "test_set"."CY_CYCLE_ID" = "test_instance"."TC_CYCLE_ID"
INNER JOIN CYCL_FOLD "test_set_folder" ON "test_set_folder"."CF_ITEM_ID" = "test_set"."CY_FOLDER_ID"
LEFT JOIN CYCL_FOLD "test_set_folder1" ON "test_set_folder1"."CF_ITEM_ID" = "test_set_folder"."CF_FATHER_ID"
Where t.ts_test_id = s.st_test_id
and s.st_run_id = r.rn_run_id
and r.rn_run_id = r1.max_run_id
and r.rn_testcycl_id = r1.rn_testcycl_id
and r.rn_execution_date >'01-JAN-2022'