The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Browse by Tags

All Tags » In clause
  • In Clause

    Hello, i have a string with a list of store numbers, something like  stores=''1, 2, 3'', y like to include this on my dynamic query.   Code:1 OrderSummaryQuery q = ordenes.Query; 2 q.Select(q.StoreNo,q.OrderDate,q.OrderNumber,q.CustomerPhoneNumber, 3 q.AdjustedOrderPrice) 4 ...
    Posted to Dynamic Query API (Forum) by fradique on September 2, 2008
  • Using a list in the select cause

    I’m tiring to allow the user to populate the select clause from as saved list or list box.  I’m hoping to be able to pass a list into the Select or Where clause as needed.   Myview coll = new myview(); List<object> myList = new List<object>   //logic to add column names ...
    Posted to Dynamic Query API (Forum) by Morak on June 6, 2008
  • Re: In statement does not work with Guid fields

    Finally figured it out, and yes these are not valid uniqueidentifiers in my example Code:// I know the following doesn't work in SQL user_id in (@userList) // so I thought the following was generated user_id in (@user_id1, @user_id2, @user_id3) // instead, the following happens if passed in as a Guid or Object user_id in (111-11-1111, ...
    Posted to Dynamic Query API (Forum) by stevenmoberg on June 4, 2008
  • Re: In statement does not work with Guid fields

    Martin, I have tried passing the list in as strings vs Guids and I get the same error.   Are you suggesting I wrap the strings with quotes around my strings. Code:List<Guid> userids = myObj.getUserIds(); List<string> users = new List<string>(); foreach(Guid userid in userids) { users.Add(''''' + ...
    Posted to Dynamic Query API (Forum) by stevenmoberg on May 30, 2008
  • In statement does not work with Guid fields

    Using the SqlDataProvider, the generated SQL throws an error of ''Incorrect syntax near ')'''. Code:List<Guid> userids = myObj.GetUserIds(); Query.Where( Query.UserId.In(userids) ).Load(); // It does work with OR statements Query.es.DefaultConjunction = esConjunction.Or; foreach(Guid userid in userids) { ...
    Posted to Dynamic Query API (Forum) by stevenmoberg on May 30, 2008
  • IN Statement with Parmaters - Convert error

    I'm trying to implement a cached where clause with parameters that get converted to esParameters. Code:ItemFilter filter = new ItemFilter(); filter.WhereClause = ''[issueType_id] IN (@issueList)''; filter.AddParameter(''issueList'', ''2,3,5,6,7,8,9''); filter.Save(); IssueCollection coll = new IssueCollection(); ...
    Posted to Dynamic Query API (Forum) by stevenmoberg on April 9, 2008
  • Re: Can I use a List<int> with an .In where clause?

    try passing your List<int> in's like this instead of .ToArray()Code: 1 //textIds is a List<int> type 2 if (textIds.Count > 0) 3 { 4 StringBuilder ids = new StringBuilder(); 5 6 for (int i = 0; i < textIds.Count; i++) 7 { 8 string id = Convert.ToString(textIds); 9 if ...
    Posted to Dynamic Query API (Forum) by Scott.Schecter on April 20, 2007
  • Can I use a List<int> with an .In where clause?

    I have a generic list of ints (List<int>) and I would like to query where the ID column is equal to any int in the List.  I figured I could do this by using Code:xCollection x = new xCollection(); List<int> ints = new List<int>(); ints.Add(1); ints.Add(2); ints.Add(3); x.Query.Where.ID.In(ints) ...but ...
    Posted to Dynamic Query API (Forum) by dburgett on March 11, 2007