Milton
|
Posted: 11/14/2003, 10:45 PM |
|
I have used stored procedures to populate one table while I used the regular DSN connection to populate another one. Everything worked just fine, but then I do a search for the populated fields using stored procedure, I have found that nothing matches. It seems that MS SQL pads the missing characters.
For example: in the field @emailaddress nvarchar (50), if I enterinfo@company.com, since this address does not have 50 characters, SQL server pads the rest with blanks. When we do a search by email, we cannot find anything, since spaces are considered characters. Does anyone know a way around this? It's very critical that we have this field normal just with the caracters we enter in the data form.
Any help will be great appreciated.
Thanks
|
|
|
ryan
|
Posted: 11/16/2003, 12:24 AM |
|
CREATE PROC sp_SearchFieldFromTable
(
@emailaddress nvarchar(50)
)
AS
SELECT * FROM theTable
WHERE (emailaddress LIKE '%@emailaddress%')
/*
actually I never encountered any of your padding issues
I suspect it's in your sp :)
*/
|
|
|
|