caradri
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by caradri
-
-
Hi, all.
I have a strange issue, i think.
i have a sql database and a simple select query "select * from tablename where columname='stringtosearch'; "
this work fine until today, today only works with like:
"select * from tablename where columname LIKE '%stringtosearch%'; "
WHY???😭
-
i want to do this :
declare @a nvarchar(30);
set @a = 'ssssss\ar12rvds\aaabbbccddd'; /*some name for example. Equal to the board name from vBoard4 view */
set @a = SUBSTRING(@a, (charindex('\', @a))+1,LEN(@a)) ; /*cut "ssssss\" */
set @a = SUBSTRING(@a, (charindex('\', @a))+1,LEN(@a)) ; /*Cut ar12rvds */
select @a as result; /* return aaabbbccddd only /*
o each name in
SELECT id, NameFROM namesTBhow i do that? -
You need to use a join, you can specify the conditions when you join the tables.
Thanks for reply.
I have this
SELECT Manager.MasterID, Manager.TakeOutUserID, Manager.TakeOutDate, Manager.TakeOutComment, Manager.ReturnUserID, Manager.ReturnDate,Manager.ReturnComment, Manager.Status, Masters.PartNumber, Masters.Comment, Masters.Revision, Masters.Location, Masters.LastUseFROM (Manager INNER JOINMasters ON Masters.SerialNumber = Manager.MasterID)but I don't know how to select the last(newest) entry on Manager for each Master table entry. -
= vs like
in General
Posted
hi. this was working until now. and the string is exactly like in database. the data type is nchar(30), and looks like in the database its fill the string with white spaces to get length 30.
may the datatype do that problem? something can make a change?