A C# / SQL Query Problem
-
Hi, I want to send to SQL server a query I want to get randomly generated 100 rows where they are no generated before. I made my query like below: mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT 100 WHERE generated_before IS NULL"; Gives system error??? Thank you, Cem Louis
-
Hi, I want to send to SQL server a query I want to get randomly generated 100 rows where they are no generated before. I made my query like below: mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT 100 WHERE generated_before IS NULL"; Gives system error??? Thank you, Cem Louis
You want to generate 100 rows, or get back 100 rows at random ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
-
Hi, I want to send to SQL server a query I want to get randomly generated 100 rows where they are no generated before. I made my query like below: mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT 100 WHERE generated_before IS NULL"; Gives system error??? Thank you, Cem Louis
I'm not sure when you get the LIMIT keyword from, it doesn't appear to be a valid T-SQL keyword. Try SELECT TOP 100 .... Also, the RAND() function only accepts interger types. I am assuming that name is a string of some kind. I am not sure what you are trying to do with RAND() If you can explain more about what you are trying to do I might be able to help more.
Do you want to know more? Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
-
Hi, I want to send to SQL server a query I want to get randomly generated 100 rows where they are no generated before. I made my query like below: mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT 100 WHERE generated_before IS NULL"; Gives system error??? Thank you, Cem Louis