H
herewegoagain
Guest
I have successfully pulled all rows that are duplicated in my sql database.
Now I am trying to do two more things. I need to pull all COSTS (another
column) that are not equal in the duplicate fields where it gets it from a
textbox entry the user makes in a vb.net windows form. Here is the SQL
statement I have thus far:
If ComboBox3.Text = "Common Items" Then
sql2 = "SELECT *FROM JJKSUP WHERE NUMBER IN (SELECT NUMBER FROM JJKSUP GROUP
BY NUMBER HAVING COUNT(*)> 1 and LIKE " & TextBox1.Text & " ) ORDER BY
NUMBER"
SqlDataAdapter1 = New SqlClient.SqlDataAdapter(sql2,
SqlConnection1)
Dsjjkp1.EnforceConstraints = False
SqlDataAdapter1.Fill(Dsjjkp1.JJKSUP)
When I take out the LIKE portion it works fine in returning the duplicates.
How can I make it pull records the user specifies in the textbox?
One step further is to to ask it to display items where COST is different on
items(number) that are duplicated?
Now I am trying to do two more things. I need to pull all COSTS (another
column) that are not equal in the duplicate fields where it gets it from a
textbox entry the user makes in a vb.net windows form. Here is the SQL
statement I have thus far:
If ComboBox3.Text = "Common Items" Then
sql2 = "SELECT *FROM JJKSUP WHERE NUMBER IN (SELECT NUMBER FROM JJKSUP GROUP
BY NUMBER HAVING COUNT(*)> 1 and LIKE " & TextBox1.Text & " ) ORDER BY
NUMBER"
SqlDataAdapter1 = New SqlClient.SqlDataAdapter(sql2,
SqlConnection1)
Dsjjkp1.EnforceConstraints = False
SqlDataAdapter1.Fill(Dsjjkp1.JJKSUP)
When I take out the LIKE portion it works fine in returning the duplicates.
How can I make it pull records the user specifies in the textbox?
One step further is to to ask it to display items where COST is different on
items(number) that are duplicated?