H
herewegoagain
Guest
Ok here is the situation....
I have a column we will call COL6MK that is a percent markup of COL6 over COST(which is another column. I have two textboxes on a windows app form that the idea is for the user to enter a number it is greater than(textbox2) and a number it is less than(textbox3). Then they hit search and it is suppose to return these results.
The app does not bomb out but it does not return any results at all which is not correct which is even worse. I tried entering it as 63 and 73 and tried entering 63% and 73% and no luck either way. In the sql database this column is of the varchar variety.
This is the SQL statements I have tried:
sql2 = "SELECT * FROM MARKUP4 WHERE COL6MK BETWEEN %" & TextBox1.Text & "% AND %" & TextBox3.Text & "% ORDER BY NUMBER"
and
sql2 = "SELECT * FROM MARKUP4 WHERE COL6MK > %" & TextBox1.Text & "% AND < %" & TextBox3.Text & "% ORDER BY NUMBER
Does anyone have any suggestions?
I have a column we will call COL6MK that is a percent markup of COL6 over COST(which is another column. I have two textboxes on a windows app form that the idea is for the user to enter a number it is greater than(textbox2) and a number it is less than(textbox3). Then they hit search and it is suppose to return these results.
The app does not bomb out but it does not return any results at all which is not correct which is even worse. I tried entering it as 63 and 73 and tried entering 63% and 73% and no luck either way. In the sql database this column is of the varchar variety.
This is the SQL statements I have tried:
sql2 = "SELECT * FROM MARKUP4 WHERE COL6MK BETWEEN %" & TextBox1.Text & "% AND %" & TextBox3.Text & "% ORDER BY NUMBER"
and
sql2 = "SELECT * FROM MARKUP4 WHERE COL6MK > %" & TextBox1.Text & "% AND < %" & TextBox3.Text & "% ORDER BY NUMBER
Does anyone have any suggestions?