Jump to content

caradri

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by caradri

  1. 21 minutes ago, Ingolme said:

    The semi-colon will not break the query, it will simply be ignored.

    The = operator will only return a row if the entire field exactly matches what is being searched. If you want to find rows that contain the search string along with more content then you must use the LIKE operator. If you think the fields do match exactly, make sure that they don't actually have spaces, tabs or other invisible characters that might be interfering with the search.

    27 minutes ago, dsonesuk said:

    If that is exactly what you use, then maybe you should try it without the semicolon within the SQL query

    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?

  2. 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???😭

  3. 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, Name
    FROM namesTB
    how i do that?
  4. 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.LastUse
    FROM (Manager INNER JOIN
    Masters ON Masters.SerialNumber = Manager.MasterID)
    but I don't know how to select the last(newest) entry on Manager for each Master table entry.
  5. Hi all.

    I need help with a query.

    I need the whole last entry from table A for each item on table B.

    Thanks for any help.

×
×
  • Create New...