XecutioneR
Active Member
- Joined
- Nov 4, 2008
- Messages
- 73
- Reaction score
- 0
Have you tried using a proper database like Oracle instead?![]()
lol. Its for a campus project. We have to use their software
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Have you tried using a proper database like Oracle instead?![]()
select * from X is wrong. learn it now and start to type out the column names.
Hi all
Im using MS SQL 2005, and trying to run a query from VB, using Visual Studio 2008.
What I need is to find all movie information where the title matches text from a textbox, therefore the need for a parameter @Title. From what I googled, I came up with the following:
Select *
From Movies
Where Mov_Title LIKE '%' + @Title + '%'
However, the application disregards the wildcards. Any help on solving this would be appreciated.
Thanks
XecutioneR
SELECT
Title
, Lastname
, PreferredName
FROM
Employee
WHERE
Lastname like '%'+ @Lastname +'%'
Thanks for the replies.
Ive tried the last 2 suggestions and had the same results.
Heres the code snippet:
SELECT Mov_MovieID, Mov_Title, Mov_Format, Mov_Category, Mov_RentalPrice, Mov_Genre, Mov_Director, Mov_Actor, Mov_Synopsis, Cpy_MovieCode, Cpy_MovieID,
Cpy_DateAdded, Cpy_CostPrice, Cpy_Status, Cpy_Faulty, Cpy_InactiveDate, Cpy_Comment
FROM MoviesView
WHERE Mov_Title LIKE ('%' + @seTitle + '%')
Im using the same logic for several other tables, and the problem occurs on all. The reason I need to use LIKE instead of = is so the user does not have to enter the entire movie title. Im open to any other suggestions that would offer the same functionality.
select * from X is wrong. learn it now and start to type out the column names.
Go out and have a beer.