Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

An SQL statement

sebnaksebnak Member Posts: 5
Just temme an SQL st.

where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"

Comments

  • ALSHREEFALSHREEF Member Posts: 4
    : Just temme an SQL st.
    :
    : where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"
    :
    :

    Could you clear your question.
  • DaVillainDaVillain Member Posts: 4
    : Just temme an SQL st.
    :
    : where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"
    :
    :

    Is this what you're looking for Mate?

    SELECT *
    FROM schema.tablename
    WHERE table.column LIKE '39house';

    OR

    SELECT *
    FROM schema.tablename
    WHERE table.column LIKE '%39house%';

    AND

    UPDATE schema.tablename
    SET table.column = '39 house'
    WHERE table.column LIKE '39house';

    OR

    UPDATE schema.tablename
    SET table.column = '39 house'
    WHERE table.column LIKE '%39house%';

    Use the required one depending if you're searching for '39house' specifically or any character string containing '39house'.
  • Justin BibJustin Bib USAMember Posts: 0

    __ / http://forcoder.org / free ebooks and video tutorials about { C++, C#, PL/SQL, Python, Assembly, R, Java, Delphi, Go, Swift, Perl, JavaScript, Scratch, PHP, MATLAB, C, Visual Basic .NET, Objective-C, Ruby, Visual Basic Hack, Crystal, FoxPro, VBScript, Logo, Kotlin, Lisp, Ada, ABAP, Lua, Rust, Prolog, LabVIEW, Apex, Julia, COBOL, Bash, D, Clojure, Scala, SAS, Alice, Erlang, Transact-SQL, F#, Scheme, Dart, Awk, Fortran, ML } ___

Sign In or Register to comment.