Wednesday 15 April 2015

mysql - Select Count Distinct Syntax, vb.net -


So I am starting to learn some vb.net, and I have the following mysql statement in which one of my tables One column in it was filling me with syntax errors, but what I have read reveals what I should be right about. Also, I took it to MySQL Workbench and it works fine, for whatever reason it refuses to work in my code.

  String dim numlals like dim sRetrieve OdbcDataReader sRetrieve = "SELECT COUNT (DISTINCT Defect_code) daily_data where month (date) =" & amp; Selection_member & amp; "And the year (date) =" & amp; New Odbc.OdbcCommand as selected_year dim query_exe (sRetrieve, cn) numlals = query_exe.ExecuteReader ()   

I'm beating my head against this for a while, then Any help tell me what is wrong with that mysql statement would be greatly appreciated.

This figure was in place between the first and the first (was doing this for a long time, but I think how it goes. Thanks for the help. MySQL returns the string in MONTH (Date), then you must attach it to '' .

  sRetrieve = "SELECT COUNT (DISTINCT defect_code) daily_data from WHERE MONTH (date) = & #

No comments:

Post a Comment