How can I escape commas inside the function listQualify?

I have

am a newbie in coldfusion. I need help. My database has records of names of companies as: abc, Inc. For now I'm using this query:

SELECT DISTINCT COMPANY FROM ComapanyTable WHERE (Company IN (#ListQualify(form.cCompanyList2, "'", ",")#))

This problem is that it separates CBA, Inc..

SELECT DISTINCT Company FROM CompanyTableWHERE (Company IN ('abc',' Inc.','xyz','Inc.'))

I need to get the list, as it is, i.e. as: "abc, Inc.", "xyz, Inc." so that I can later insert these values into a new table.

Insert the code:

<cfquery name="insertPair" datasource="#DSN#" dbtype="ODBC"> INSERT INTO tblChildCompanyToParent (Parent_Account_ID, Child_Account_ID) SELECT DISTINCT <cfqueryparam value = "#form.pCompanyList#" CFSQLType = "CF_SQL_VARCHAR">, Company FROM CompanyTable WHERE Company IN (<cfqueryparam value="#ValueList(insertSelect.Company,';' )#" CFSQLType = "CF_SQL_VARCHAR" list="true" separator=";">) </cfquery>

Code of the selection list

<select multiple name="cCompanyList2" id="cCompanyList2" class="selectCCompany" data-attribute="selCCompany" size="10"> <cfloop query="childCompanyList"> <option value="#childCompanyList.Child_Account_ID#">#childCompanyList.Company#</option> </cfloop> </select>

Y at - it anyway to solve this problem.

Thank you for your help.

I managed to fix it.

I posted the solution to StackOverflow

SQL - how can I escape commas inside the function listQualify? -Stack overflow

Thank you once again!

Tags: ColdFusion

Similar Questions

  • How can access a button inside the video clip

    I have a button named a_btn. This button is located in a clip name a_mc passage. This button is on the first frame. then when you write the code for that:

    function submit(event:MouseEvent):void

    {

    trace ("hii")

    }

    a_mc.a_btn.addEventListener (MouseEvent.Click, Submit);

    his work. but when I keep this button on 2nd chassis or anywhere not in 1 frame inside that movie clip, then I get error runtime as:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to NewFlashDocument_fla::MainTimeline / NewFlashDocument_fla::frame1 ().
    How can I access this button on the second picture...

    You cannot reference an object until there are.  Thus, if a_btn is on the 2nd frame of a_mc, you must wait until this 2nd frame plays before trying to refer to a_mc.a_btn.

    If not, put a_btn on the first image and set its visible property to false in the first frame and true as part of the 2nd.  Then you can use your current code and duplicate the design you are trying to achieve by moving the button on the 2nd frame.

  • How can I access methods inside the content of the loader?

    I posted a similar question in the General Discussion, but, when I insert a SWF with the Loader class, how do you get variables and methods on this SWF? Is this possible?

    var externalSWF:MovieClip = _loader.content; or _loader.getChildAt (0);
    externalSWF.whatever ();

    If it's an external swf and you do not know the type, you can either have the external swf extend a package in your calling swf file or use:

    var fn:Function = externalSWF ["somefunctionname"];
    FN. Apply (externalSWF, [param1, param2])

  • How can I insert commas in a string to a number?

    Here's the process I use to

    generates a numeric string in an Acrobat form:

    var A = this.getField("fieldname").value * 1000000000
    var B = this.getField("fieldname").value * 1000000000
    var C = this.getField("fieldname").value * 1000000000
    var D = this.getField("fieldname").value * 1000000000
    var E = this.getField("fieldname").value * 1000000000
    var F = this.getField("fieldname").value * 1000000
    var G = this.getField("fieldname").value * 1000000
    var H = this.getField("fieldname").value * 1000000
    var I = this.getField("fieldname").value * 1000000
    var J = this.getField("fieldname").value * 1000000
    var K = this.getField("fieldname").value * 1000
    var L = this.getField("fieldname").value * 1000
    var M = this.getField("fieldname").value * 1000
    var N = this.getField("fieldname").value * 1000
    var O = this.getField("fieldname").value * 1000
    var str = A - B - C - D - E + F - G - H - I - J + K - L - M - N - O

    For example, the resulting string is: How can I insert commas so the chain will read from 237036054000: 237,036,054,000?

    The number string is not always the same length so I need to add commas to the right. For example, the number may be: 7,234,887,000 or 124,345,000. The only constant is that the numbers will end in "000" as there are no hundreds in the sequence, I work with.

    I have to add commas to the strobila, so I can break the string up in the same type of components that I started with. I already part, but I need to insert commas as a separator for the second half of work.

    Thanks much for any help you can offer.

    Steve

    What is a custom calculation script? If so, do you have to checked to make sure that the field calculation order is correct?

  • Can we call the procedure inside the function?

    Hello

    Can we call the procedure inside the function?

    Thank you
    Brij

    845712 wrote:

    Can we call the procedure inside the function?

    Strange question to ask.

    Yes. This is the standard behavior in most (if not all) procedural and object oriented languages.

    A procedure, function or a method is a unit of code.

    You can call one of the other units. Units can call themselves (recursion). Technically, this means simply by pushing the battery current (to save the stack of the current device memory), the call to the new unit and then popping up battery when control is returned to the unity of the appellant.

    There are very few exceptions to this. The only one that comes to mind programming languages I've used through the years, is natural 1 - could not call a new unit of code to replace the existing one in memory. If no call-and-return was possible.

    Exactly what did you ask this question? Some newcomers to confused Oracle SQL and PL/SQL - two different languages aside server. And then also mistaken for PL/SQL client command vocabulary of SQL * more.

    You will need to make sure that understand the basics of programming (applies to most current programming languages) and Oracle concepts.

  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • How can you get rid of the "new tab" page that flashes what you did recently? I don't like this option...

    How can you get rid of the "new tab" page that flashes what you did recently? I don't like this option. If I wanted to Flash all the pages I've visited, I would. It is not YOUR place to do it for me. I'll change the browser if it is not changed.

    Hello, please refer to customize the page new tab to turn off the function.

  • How can I make Pages capitalize the first word in a sentence?

    How can I make Pages capitalize the first word in a sentence? The I phone t - it, the iPad does, why not not iMac using Pages capitalize the first word on a new sentence?

    Pages of IOS and IOS itself remain different implementations of Pages v5.6.1 for Mac and OS X. In any version of Pages v5, if there was an option to preferences in Pages ' 09, there is no auto-capitalisation function.

    See my previous post is launching an OS X App Store free application, which can be applied to auto-capitalisation to your Pages v5 documents.

  • I have Microsoft Money 2006 how can I update and keep the info?

    I have Microsoft Money 2006 how can I update and keep the info?

    Hi NRHand7,

    Microsoft has stopped selling money on June 30, 2009. The last activation of version (more Money, or money 2008) required in order to be fully functional.

    For more information, you can consult the following articles:

    What is Microsoft Money Plus sunset?

    Money Solution Center

    We can refer to the following articles and check if it helps.

    How to export and import account information in Microsoft Money

    How to remove and reinstall Microsoft Money

    You can also post your query in Microsoft Money Forum to get help.

    Microsoft Money

    Hope this information is useful.

  • How can I get rid of the part of the home page of windows xp pro?

    A friend built my computer. I gave him my window xp pro and office xp pro disc to load. He came back to me with something first page added to windows and office. Nothing works well. My friend is no longer in the city.

    How can I get rid of the first page?

    Please do not ask me to describe how many problems he created, the different functions of office and windows that don't work or material he refuses simply recognize or leave work as my camera. I'm so tired to uninstall and reinstall.

    Thank you

    Hope is not * that * long!  You are welcome...

  • How can I do to make the taskbar allows you to hide every time I have remove the slider from?

    2 questions: How can I do to make the taskbar allows you to hide every time I have remove the slider from?  This rarely works.  Question 2: name of the task SystemSoundsService is called by the Microsoft PlaySoundService class action.  What is his function, and above all, what is the best place for these tasks apparently running in the background all the time?  Is it good to put an end to this task?

    Hello

    Check the scheduled task SystemSoundsService here.

    Description of the scheduled tasks in Windows Vista
    http://support.Microsoft.com/kb/939039/en-us

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • How can I move documents on the cloud of document at the local level?

    How can I move documents on the cloud of document at the local level?

    Hi John Hall & GRILLO, ALBA

    There is no direct function to save the document since the DC at the local level, however, you can use option shares to save the file locally on the mobile device.

    Thank you

    Abhishek

  • How can I change [frequency] on the audio spectrum?

    How can I change [frequency] on the audio spectrum? I really need an easy way to solve this problem

    After Effects has a very limited set of audio tools. Your only option to change the Equalization inside AE is to apply one of the equalizer and then before dialing the audio track that you use to the reader of the Audio spectrum. It's a little awkward, but it keeps all the controls inside the AE and keep them editable.

    Personally, if I want to isolate the frequencies I always use the hearing to create an audio layer duplicate that has been optimized for the effect that I need to generate audio.

  • How can I get rid of the vectorization, once applied to an image?

    With the help of Illustrator CC 2014, Windows 7 x 64

    After telling Illy as trace an image, how can I get rid of the "modifier" trace function without import it again, fresh (not yet Live Traced) copy of the image and without developing the effects of trace function?

    I want just the original frame back.

    assuming that it has not changed since CS5...

    Object > Live Trace > Release

  • Several images can be viewed at once, each in it so how can you images floating in the workspace has a window, which can be moved on

    How can you images floating in the workspace, so several images can be viewed at once, each in its own window, allowing the images to be moved. This function doesn't seem to work in items 12

    Go in Edition > Preferences > General. Check ": allow Documents floating in its entirety in Edit Mode."

    I hope that will allow you to view the 3 files simultaneously via the available option.

Maybe you are looking for

  • HP Deskjet D4360 printer

    Help!  HP Deskjet D4360 printer is practically new out of the box - probably printed a dozen copies to date.  Ink cartridges are genuine HP and also almost brand new.  The printer has been used for a few months, which has never been a problem w / my

  • Re: Cannot find wireless driver for Portege R200, PPR20E

    Hello the installation of the product order pilot .txt * "Portege R200, PPR20E" * " is mention two drivers Atheros for internet: * Atheros AR5001X Mini PCI wireless adapter V3.1.2.45.i120 ALL 40 *.* Atheros Client Utility V3.1.2.45 ALL 41 *. The Athe

  • Satellite A200-221 sound wheel is limitless

    Hello!My sound wheel toshiba has no limit. Normally, there must be a limit of maximum power and minimum right? I just run free, is - this normal? BTW, with this behavior, when I want to the top/down the sound, it has a quite annoying delay... did you

  • Lost apps and singing and games on I phone4

    Accidentally reset factory settings on my I phone4 while trying to trade tips between phone and laptop. I wonder how too get by them? There was a lot of money down the drain, I thought? I hope not? :-)

  • Aero stopped working

    original title: help Aero Awhile back my aero stopped working, and I was not able to understand what the problem is, I have been through many, many forums and have had no success, I also tried the fix it thing that you have, and this is what came: ht