Im using VS2008 and SQL Server Management Studio 2008.
I want to ask, i have two different table, TableA and TableB in same database, DatabaseX.
Both table have two same column, ColumnY but the data are different within this table.
TableA, ColumnY : A1, B2, C3, D4
TableB, ColumnY : A1, B2, C3, D4, E5, F6, G7
I want to compared data between this two table in my program. How the SQL Statement look alike because I dont know how to compared between this to?
And one more thing, can I just directly write the SQL statement in aspx.vb page?
or I need to write the SQL Statement in .vb page then called the function in aspx.vb page?
My code for my aspx.vb page
Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click Dim i As Integer Dim iResult As Integer Dim hypWayID As HyperLink Dim chkRemove As New CheckBox Dim clsWay As New Way() Try For i = 0 To grdWay.Rows.Count - 1 chkRemove = DirectCast(grdWay.Rows(i).FindControl("chkRemove"), CheckBox) hypRouteID = DirectCast(grdWay.Rows(i).FindControl("hypWayID"), HyperLink) If chkRemove.Checked Then ///to check condition either the way ID exist in database ///if not exist then way ID can be delete ///if exist, message box appear show message this cannot be delete iResult = clsWay.DeleteRoute(hypWayID.Text) End If Next i labelError.Text = "Item(s) delete successfully." BindGrid("%", "%", drpArea.SelectedValue,drpType.SelectedValue) Catch ex As Exception lblError.Text = ex.Message End Try End Sub
Thank you :)