Solved

Modify SQL

Posted on 2004-10-27
161 Views
Last Modified: 2010-04-23
Who can I modify the following SQL and add a parameter to modify the internalprops field so it's not copied directly?

SQL = "INSERT INTO cto_objects  " & _
            "       ( project,iobjname,objname, " & _
            "         objtype,status,path," & _
            "         description,filename,objpath, " & _
            "         internalprops,externalprops,ctoprops ) " & _
            "   SELECT '000000',:newname ,:newExtName, " & _
            "          objtype, status,:newname ||'.IKM', " & _
            "          description,filename,objpath, " & _
            "          internalprops,externalprops,ctoprops " & _
            "    FROM cto_objects " & _
            "    WHERE ( cto_objects.project = :project ) AND " & _
            "          ( cto_objects.iobjname = :iobjname ) "

thx
TOM
0
Question by:thenrich
    2 Comments
     
    LVL 5

    Author Comment

    by:thenrich
    Found the solution myself:

    SQL = "INSERT INTO cto_objects  " & _
                           "       ( project,iobjname,objname, " & _
                           "         objtype,status,path," & _
                           "         description,filename,objpath, " & _
                           "         internalprops,externalprops,ctoprops ) " & _
                           "   SELECT '000000',:newname ,:newExtName, " & _
                           "          objtype, status,:newname ||'.IKM', " & _
                           "          description,filename,objpath, " & _
                           "          replace(internalprops,'|' || :o_seq ||';','|' || :n_seq || ';'),externalprops,ctoprops " & _
                           "    FROM cto_objects " & _
                           "    WHERE ( cto_objects.project = :project ) AND " & _
                           "          ( cto_objects.iobjname = :iobjname ) "

    Going to ask for this question to be deleted.
    0
     

    Accepted Solution

    by:
    PAQed with points refunded (500)

    modulo
    Community Support Moderator
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Anonabox PRO Tor & VPN Router

    PRO is the most advanced way to fortify your privacy and online anonymity by layering the Tor network with VPN services. Use both together or separately, and without needing to download software onto your devices.

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now