Using a created list in a SQL IN query

I've solved this before but can't remember how, know it's going to be a simple one
I've created a list from a CFLOOP, let's say it's MYLIST="us,ca,au,fr"
I need to run a SQL CFQUERY on this list, WHERE xyz IN (MYLIST)
The problem is that it won't read it correctly. Can anybody tell me the right command to make the sql read the list correctly on an individual item basis
Thanks
Mark

Ahhh. I remember using that before now that you mention it
Once again, thanks Dan
Mark

Similar Messages

  • How to use circular linked list in pl/sql?

    Hi all,
    how to use the circular linked list on pl/sql programming.
    thanks in advance
    Rgds,
    B@L@

    d balamurugan wrote:
    Hi,
    I needed this concept for the below example
    TABLE_A have the columns of
    ID COL_1 COL_2 COL_3 COL_4 COL_5 COL_6 COL_7
    1....Y.........N........N.........Y........ N........N........ N
    2....N.........N....... N.........Y.........N........N.........Y
    in the above data
    for id 1 i will need to take the value for COL_4, then i will check the next availability of Y through out through out the remaining columns, so next availability is on COL_1 so, i need to consider COL_4 which already Y and also i need to consider COL_5, COL_6, COL_7 as Y.
    for id 2 if i need COL_7 then i need to come back on circular way and need to check the next availability of Y and need to take the columns having N before the next availability of YAnd... even after all that description... you haven't given any indication of what the output should look like.
    Taking a wild guess on my part... something like this would do what you appear to be asking...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as id, 'Y' as col1, 'N' as col2, 'N' as col3, 'Y' as col4, 'N' as col5, 'N' as col6,'N' as col7 from dual union all
      2             select 2, 'N', 'N', 'N', 'Y', 'N', 'N', 'Y' from dual)
      3  --
      4  -- END OF TEST DATA
      5  --
      6  select id
      7        ,rcol
      8        ,case when instr(cols,'Y',rcol+1) = 0 then instr(cols,'Y')
      9              else instr(cols,'Y',rcol+1)
    10         end as next_Y_col
    11  from   (select id, rcol, col1||col2||col3||col4||col5||col6||col7 as cols
    12          from t, (select &required_col as rcol from dual)
    13          where id = &required_id
    14*        )
    SQL> /
    Enter value for required_col: 4
    old  12:         from t, (select &required_col as rcol from dual)
    new  12:         from t, (select 4 as rcol from dual)
    Enter value for required_id: 1
    old  13:         where id = &required_id
    new  13:         where id = 1
            ID       RCOL NEXT_Y_COL
             1          4          1
    SQL> /
    Enter value for required_col: 7
    old  12:         from t, (select &required_col as rcol from dual)
    new  12:         from t, (select 7 as rcol from dual)
    Enter value for required_id: 2
    old  13:         where id = &required_id
    new  13:         where id = 2
            ID       RCOL NEXT_Y_COL
             2          7          4
    SQL>If that's not what you want... then it's time you started learning how to ask questions properly.

  • How to make use of the presentation variable in SQL result query

    I have 2 prompts in my dashboard.
    Prompt1 decides the values of Prompt2.
    I have set a presentation Variable (selected_comp) in prompt1 which holds the value selected.
    To populate the values for Prompt2, I need to execute a query using the presenation variable set by Prompt1.
    SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=@{selected_comp}
    the query is resulting into
    SQL Issued: SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=0
    but the value in selected_comp is "ABC".
    Can anybody help in how to make use of the presentation variable in query to get the correct value
    thanks
    Shubha

    Just use constrain check box to filter your 2nd prompt values based on the 1st prompt.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • ORA-01006 Using Bind Variables In A Dynamic SQL Contains Query

    I have the following dynamic SQL query :-
    declare
    TYPE typ_sql IS REF CURSOR;
    ltyp_sql typ_sql;
    lv_sql VARCHAR2(100);
    begin
    lv_sql := 'SELECT arx_id FROM arx WHERE CONTAINS ';
    lv_sql := lv_sql || (arx_full,''(:b1) WITHIN ui'') > 0';
    open ltyp_sql FOR v_sql USING ln_id;
    fetch ......
    close ......
    end;
    When the code tries to open the cursor it gives the above error. I presume it is the way Oracle is expanding the bind variable but I cannot find anything in the docs to say why this is happening or whether you can do this or not using bind variables ( CONTAINS query ). Any help would be appreciated, thanks,
    Stuart.

    lv_sql || '(arx_full, :b1 || '' within ui'') > 0';

  • Creating a Report Using a SharePoint List

    I am using a SharePoint List that Named as 'Service Requests'. It has some fields with Date, Time, Status. The Date & Time will be entered. The Status as three values & those will be selected using a Drop Down List Box. The Statuses are 'In Progress,
    Completed, In completed'.
    I want to create a Report using this SharePoint List that include status with other fields in monthly basis. As an example I want the report about the Service Requests within the December month.
    I also need to know how am I able to link this report to a Web Menu that in the SharePoint Site. Because there is a web menu in that SharePoint Site. I have not developed this site so I don't know the type of the web menu of this site.
    I think someone can help me to solve these problems.
    Regards,
    Chiranthaka

    Hi Chiranthaka,
    According to your description, my understanding is that you want to create a report based on a SharePoint list.
    I agree with Trevor’s and Mohammad’s suggestion to use SQL Server Reporting Service to create the report for SharePoint list.
    You need to configure Reporting Services for SharePoint 2010 and then use it to create reports.
    Here are two links with the detailed steps to create report using SSRS with SharePoint for you to refer:
    http://aaclage.blogspot.in/2011/11/create-reports-with-sharepoint-2010-and.html
    http://nikpatel.net/2010/06/11/step-by-step-consuming-sharepoint-2010-lists-data-in-the-ssrs-2008-r2-reports/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Installing OLEDB Provider (10.2.0.3) for use in creating SQL Linked Servers

    I've installed the Oracle OLEDB Provider (version 10.2.0.3) on my SQL Server 2005 box (Windows 2008 64-bit). However, when I reboot the server after install I do not see the OraOLEDB.Oracle provider in my list of providers available to use to create a linked server to the Oracle database.
    Could someone help steer me in the right direction?
    Thanks!!

    Hi,
    This forum is for links from Oracle to non-Oracle databases. For issues with connectivity to Oracle using ODBC/OLEDB it would be better to ask the question in the ODBC forum -
    ODBC
    They have the experience of connections to Oracle and the software involved.
    Regards,
    Mike

  • How to create list items with multiple attachment files using rest api javascript

    In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
    a file.
    It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
    createitem.executeAsync({
                    url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
                    method: "POST",
                    contentType: "application/json;odata=verbose",
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "X-RequestDigest": $("#__REQUESTDIGEST").val()
                    binaryStringRequestBody: true,
                    body: fileContent,
                    success: fnsuccess,
                    error: fnerror
    So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
    Appreciate any help.

    Thanks Mahesh for the reply and post you share it was useful.
    But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions. 
    What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
    Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
    Thanks for your reply.

  • Create a spatail table using a shape file (.shp) in SQL DB

    Hi All,
    I am trying to load shape file into a sql spatial table. A execution process task is used to run the ogr2ogr.exe program.
    This is how the process tab looks like .
    Executable : C:\gdal_ogr2ogr\bin\gdal\apps\ogr2ogr.exe
    Argument :  -f MSSQLSpatial   MSSQL:server=SQL-ABC-DEV;database=MYSIMPLE_Dev;Trusted_Connection=True;\\mypath\files\shares\Data\www.mypage.htm\my_sample_file.shp
    Success value : 1 (I am not sure why I need to change this value from 0 to 1.
    For above settings, package runs fine. However the spatial table is not created always. It is created once in a while after switching Success value from 1 to 0 and 0 to 1 again. (After the spatial table is created, it is dropped using a execute sql statement).
    If I run this command SDKShell.bat file, it always works.
    I am running this in VS 2012.I saw in an article that we need to convert shp file to csv before we load it into sql server.I even tried to convert shp to csv using execute sql task and ogr2ogr.exe. Still the package runs successfully after changing Success
    value from 0 to 1 but no csv file is created. If the success value is 0, it throws the following error.
    [Execute Process Task] Error: In Executing "C:\gdal_ogr2ogr\bin\gdal\apps\ogr2ogr.exe" " -f CSV \\xxxxxxxxr.rdn\files\shares\xxx_Data\ImportData\www.xxxxxxx.hapepage.htm\xxxxxx\Watches\Warnings\myfile\CSV \\xxxxxxxxr.rdn\files\shares\xxx_Data\ImportData\www.xxxxxxx.hapepage.htm\xxxxxx\Watches\Warnings\myfiles\www.shp"
    at "", The process exit code was "1" while the expected was "0".
    Could long file name be a problem too?
    Thanks for your help in advance..
    shamen

    Thank you Andreas
    Yes I can run it manually without getting any error.I am also new to ogr2ogr.exe. This is used to load shape files into sql server.
    Actually this execute process task was located inside a for each loop. As no parameter is passed from for each loop to execute process task, I placed the execute process task outside of for each loop. Now it is working.
    Every time when the package is run, execute process task create a spatial table in the db.
    Still I don't know why it is not working when I place it inside the for each loop container.
    Thanks
    shamen http://stalkingnightmare.wordpress.com/about/

  • When i use view as list in finder and open a folder with many files i cant right click with mouse without selecting or highlighting a file....i just want to right click to paste an item or create a new folder...what can i do?

    When i use view as list in finder and open a folder with many files i cant right click with mouse without selecting or highlighting a file....i just want to right click to paste an item or create a new folder...what can i do?

    Thx for that im gonna try it....but is there a way to do it without using toolbar or cmd-c...? i mean using only the mouse?why does it have to highlight the file even though i click a bit next to it....?using icon view i can right click next to the folder and i wont have a problem but with list view that i prefer using it will highlight the whole row.....and i dont find free space to right click cause i got many files

  • How to create a database in SQL Server Express 2014 to be used with LV Database Toolkit

    I use LV Database Toolkit, which by default uses Jet database. Now I want to use SQL database with LV Database Toolkit. I have downloaded and installed "SQL Server 2014 Express with Tools" in my Labview Laptop. Now I want to create a database in SQL Server, because I think it is a requirement for creating a "udl connection file" (*.udl file). Please help me!
    Solved!
    Go to Solution.

    I made a database whose path is: C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\depot1
    I tried to make .udl connection file, but when I click on "test connection" with the provider: "OLEDB Provider for Microsoft SQL Server" I get the Error "UDL Connection File Failure" (attached below)
    When I tried to make the .udl connection file with the provider "Microsoft SQL native Client 11.0" and when I click on "Test Connection" I get the Error" UDL Native Client_1"& " UDL Native Client_2".
    Please help!
    Thanks!
    Attachments:
    UDL Connection File Failure.png ‏78 KB
    UDL with Native Client_1.png ‏702 KB
    UDL with Native Client_2.png ‏714 KB

  • Has anyone noticed that songs which were previously in the genius list could not longer be used to created a genius play list?

    Has anyone noticed that songs which were previously in the genius list could not longer be used to created a genius play list?  Songs like "The Gambler" by Kenny Rogers or a Beach Boy song can no longer be recognized to create a genius play list.

    Has anyone noticed that songs which were previously in the genius list could not longer be used to created a genius play list?  Songs like "The Gambler" by Kenny Rogers or a Beach Boy song can no longer be recognized to create a genius play list.

  • Can I create  a multi-selection list using a dynamic list of values?

    I'm reading section 19.7.3 from the dev guide - it explains how to create a selectOneListbox using a dynamic list of values. Is it possible to create a multi-select listbox from a dynamic list of values?
    What I would like to do - I have a read-only view object with a hard-coded query - I would like to display the results of the query in a dropdown list box, or dropdown list box with boolean checkboxes, to allow the user to select multiple items from the list. How can I accomplish this?
    thanks

    Hi JavaX,
    I don't know of any JSF components (at least not any ADF Faces components) that lets you do multiple selection in a drop-down. There is an af:selectManyListbox, but it does not render as a drop-down.
    John

  • [CS4] How to create list entries having button using ADM ?

    Hi All,
    I  want to create list box using ADM whose entries can have button. like we see in layer panel, there is a button to select arts of layer as figure shows.
    I tried to use function like  sADMItem->AddItem(listBoxRef,linkButton)  but there is no effect.
    plz suggest how to do so.
    Thanks

    You can do this, but its a lot of work.
    First, you can't add buttons to list entries. Second, that's not an ADM list in the Layers panel, thats an ADM Hierarchy Control. If you have no children of top-level items, then it will look like a list.
    To do this, you'll need to use an ADM Hierarchy Control and you'll have to implement the Draw() routine of the entries of said control. It'll be up to you to draw everything -- the icon, the text, etc. Then you can also draw your 'button'.
    Next, you'll need to implemented the Track() routine. You can have it do the default for most things, but you'll need to check for clicks and see if they're in the bounds of the 'button' you drew. If so, you can do whatever you want that button to do (and change some state that makes the button draw differently). I don't reccommend animating the press of the button, though that's probably doable (its likely very hard though).
    The code for this is quite extensive, but I'd look at IADMHierarchyList.hpp & BaseADMHierarchyList.hpp/cpp in the SDK directory. You'll be sub-classing those guys to do all this. I don't know if there's any sample code demonstrating this or not.

  • Creating multiple graphs dashboard in Crystal XI using a single View from MS SQL Server 2005

    How to create multiple graphs dashboard in Crystal XI using a single View from MS SQL Server 2005?
    I need to use Crystal XI and create a dashboard which shows some sales data and stuff, multiple graphs on a single screen.
    My tech team says they can display one graph per page but not 4 graphs on the same page as it uses a common view from SQL Server 2005.
    How to manage this? Can we call in multiple views / graphs in the same page? Say 4 graphs on the same page?
    We use ASP or .NET for calling crystal reports into the App.
    Regards,
    Akshay.
    INDIA

    Have you tried creating multiple sections, putting each graph in a separate section and then underlaying the sections so they appear next to each other?

  • Create List Item using REST API

    Hi All
      I try create list item using REST in SharePoint 2013.  when code is try add new item in list , getting error :
    A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.
    Please help me
    function addData() {
    var title = $('#txtTitile').val();
    //alert(title);
    var items = {
    __metadata: { "Type": "SP.Data.OrderDetailsListItem"},
    Title:title
    var exec = new SP.RequestExecutor(appweburl);
    exec.executeAsync(
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
    method: "POST",
    data: JSON.stringify(items),
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) { alert(JSON.parse(data)); },
    error: function (error)
    { alert(JSON.stringify(error)); }
    with Regards Sivam

    Hi,                                                             
    Here is a demo which works in my environment for your reference:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function()
    $("#Button1").click(function(){
    createListItemWithDetails("list2", "http://sp2013sps", "item1");
    // Getting the item type for the list
    function GetItemTypeForListName(name) {
    //alert("GetItemTypeForListName: "+name);
    return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
    // CREATE Operation
    // listName: The name of the list you want to get items from
    // siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
    // success: The function to execute if the call is sucesfull
    // failure: The function to execute if the call fails
    function createListItemWithDetails(listName, siteUrl, title) {
    var itemType = GetItemTypeForListName(listName);
    //alert("itemType :"+itemType);
    var item = {
    "__metadata": { "type": itemType },
    "Title": title
    $.ajax({
    url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) {
    location.href=location.href;
    //success(data);
    error: function (data) {
    alert("error");
    //failure(data);
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Java heap error when using compc

    I have a large project, 100's of source files that I'm trying to compile into a swc. In Flash Builder 4 it works fine. When I try to do it in compc I get a Java heap space error. I've scoured google for help and haven't found anything useful. Does an

  • Recent Workflow Version not active in Production server

    Hi Gurus, Recently, I made a  minor change to an existing workflow. After the changes, it was transported to QA and Production. In QA, the changes are reflected and when I click on the version overview tab of the workflow, I can see that my last chan

  • Error in the Advisor

    I just found an error on the advisor reports. If I have a form page based on "TABLE1" and on that page I also have a tabular form based on "TABLE2" then the advisor thinks all my columns in the tabular form have an error in the category "Fetch, DML,

  • Error J1IH

    Dear All, Error in T-code J1IH Excise modvat accounts not defined for  transaction and 30 excise group Message no. 8I402 i select matl write off. Please explain me use of J1IH with all functions Thanks Shital

  • What does Outlook 2007 really use or need from Windows Desktop Search Engine

    1) What will I lose if I don't intall this product 2) What will I gain if I use this product 3) How can I turn off all the non Outllook 2007 functions of this product 4) What other functions in Office 2007 are used by this product