wesley Posted November 28, 2011 Share Posted November 28, 2011 Hello, I have a question about a SQL-query. My question is: How do you write the first letter a "B" and the third letter be a "E".I have now this: But is this correct or not? SELECT*FROM plantWHERE name LIKE 'B'AND name LIKE '?E*'; Thanks in advance. Link to comment Share on other sites More sharing options...
Synook Posted November 28, 2011 Share Posted November 28, 2011 You have to use a regular expression. What dialect of SQL are you using? Link to comment Share on other sites More sharing options...
wesley Posted November 28, 2011 Author Share Posted November 28, 2011 I am using ms access Link to comment Share on other sites More sharing options...
Krewe Posted November 28, 2011 Share Posted November 28, 2011 I am not sure if it is just an error when writing the code here, but, "SELECT* " there needs to be a space in between SELECT and *. Link to comment Share on other sites More sharing options...
dsonesuk Posted November 28, 2011 Share Posted November 28, 2011 wouldn't it be just SELECT * FROM plant WHERE name Like "B?E*"; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.