+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

REPLACE ALL

  1. Re: REPLACE ALL

    Can the Update command be used in the EM or the QA?

    "Dejan Sarka" wrote in
    message news:uBF72cHEGHA.2872@TK2MSFTNGP14.phx.gbl...
    >> What is the SQL equivalent to a REPLACE ALL command in VFP?

    >
    > IIRC Replace in VFP is used to update table records. To update rows in a
    > SQL table, use the UPDATE statement.
    >
    >> I found this in the help section:
    >> SELECT REPLACE('abcdefghicde','cde','xxx')
    >> GO
    >>
    >> Is this the full syntax and where would I use this command, I tried in
    >> the EM but it doesn't seem to work.

    >
    > You found Replace function, which is not equivalent to VFP Replace
    > command.
    >
    > --
    > Dejan Sarka, SQL Server MVP
    > Mentor
    > www.SolidQualityLearning.com
    >
    >




  2. Re: REPLACE ALL

    "Preacher Man" wrote in message
    news:erpibxHEGHA.336@TK2MSFTNGP14.phx.gbl...
    > Can the Update command be used in the EM or the QA?
    >


    I recommend you use Query Analyzer. I think the only way to do it through EM
    would be to create a proc containing the UPDATE statement. QA is the better
    tool for SQL development.

    --
    David Portas
    SQL Server MVP
    --



  3. Re: REPLACE ALL

    "Preacher Man" wrote in message
    news:erpibxHEGHA.336@TK2MSFTNGP14.phx.gbl...
    > Can the Update command be used in the EM or the QA?
    >


    I recommend you use Query Analyzer. I think the only way to do it through EM
    would be to create a proc containing the UPDATE statement. QA is the better
    tool for SQL development.

    --
    David Portas
    SQL Server MVP
    --



  4. Re: REPLACE ALL

    Yes, it can. I suggest you use QA. And use transactions - i.e. commit the
    changes only after you've inspected the results and they are correct.


    ML

    ---
    http://milambda.blogspot.com/

  5. Re: REPLACE ALL

    Yes, it can. I suggest you use QA. And use transactions - i.e. commit the
    changes only after you've inspected the results and they are correct.


    ML

    ---
    http://milambda.blogspot.com/

  6. Re: REPLACE ALL

    I use the REPLACE function in a UDF, to test an incoming string.

    That allows me to test stuff in a SELECT with no UPDATE until after
    inspection.

    So, if the UDF (user defined function) is named dbo.udfGarbageRemoval, I can
    use "inline" SQL to do the preliminary testing and inspection job.

    For example:

    SELECT udfGarbageRemoval(, ), FROM ORDER
    BY

    This gives me immediate results for inspection with no transaction required.
    I simply sort ASC and DESC on the field in question, do some Q&A and test
    cases, and if the function works, then I do my update as follows:

    UPDATE

    SET = udfGarbageRemoval(, )

    This techique if VERY fast, with no transaction nor update required until
    after testing.

    Functions are very easy to write in SQL, and blindingly fast.

    John Smith



    "Preacher Man" wrote in message
    news:erpibxHEGHA.336@TK2MSFTNGP14.phx.gbl...
    > Can the Update command be used in the EM or the QA?
    >
    > "Dejan Sarka" wrote in
    > message news:uBF72cHEGHA.2872@TK2MSFTNGP14.phx.gbl...
    >>> What is the SQL equivalent to a REPLACE ALL command in VFP?

    >>
    >> IIRC Replace in VFP is used to update table records. To update rows in a
    >> SQL table, use the UPDATE statement.
    >>
    >>> I found this in the help section:
    >>> SELECT REPLACE('abcdefghicde','cde','xxx')
    >>> GO
    >>>
    >>> Is this the full syntax and where would I use this command, I tried in
    >>> the EM but it doesn't seem to work.

    >>
    >> You found Replace function, which is not equivalent to VFP Replace
    >> command.
    >>
    >> --
    >> Dejan Sarka, SQL Server MVP
    >> Mentor
    >> www.SolidQualityLearning.com
    >>
    >>

    >
    >




  7. Re: REPLACE ALL

    I use the REPLACE function in a UDF, to test an incoming string.

    That allows me to test stuff in a SELECT with no UPDATE until after
    inspection.

    So, if the UDF (user defined function) is named dbo.udfGarbageRemoval, I can
    use "inline" SQL to do the preliminary testing and inspection job.

    For example:

    SELECT udfGarbageRemoval(, ), FROM
  8. ORDER
    BY

    This gives me immediate results for inspection with no transaction required.
    I simply sort ASC and DESC on the field in question, do some Q&A and test
    cases, and if the function works, then I do my update as follows:

    UPDATE

    SET = udfGarbageRemoval(, )

    This techique if VERY fast, with no transaction nor update required until
    after testing.

    Functions are very easy to write in SQL, and blindingly fast.

    John Smith



    "Preacher Man" wrote in message
    news:erpibxHEGHA.336@TK2MSFTNGP14.phx.gbl...
    > Can the Update command be used in the EM or the QA?
    >
    > "Dejan Sarka" wrote in
    > message news:uBF72cHEGHA.2872@TK2MSFTNGP14.phx.gbl...
    >>> What is the SQL equivalent to a REPLACE ALL command in VFP?

    >>
    >> IIRC Replace in VFP is used to update table records. To update rows in a
    >> SQL table, use the UPDATE statement.
    >>
    >>> I found this in the help section:
    >>> SELECT REPLACE('abcdefghicde','cde','xxx')
    >>> GO
    >>>
    >>> Is this the full syntax and where would I use this command, I tried in
    >>> the EM but it doesn't seem to work.

    >>
    >> You found Replace function, which is not equivalent to VFP Replace
    >> command.
    >>
    >> --
    >> Dejan Sarka, SQL Server MVP
    >> Mentor
    >> www.SolidQualityLearning.com
    >>
    >>

    >
    >