Search Results

Search found 27691 results on 1108 pages for 'multi select'.

Page 99/1108 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Select most recent records using LINQ to Entities

    - by begemotya
    I have a simple Linq to Enities table to query and get the most recent records using Date field So I tried this code: IQueryable<Alert> alerts = GetAlerts(); IQueryable latestAlerts = from a in alerts group a by a.UpdateDateTime into g select g.OrderBy(a = a.Identifier).First(); Error: NotSupportedException: The method 'GroupBy' is not supported. Is there any other way to get do it? Thanks a lot!

    Read the article

  • SQL Server Select Distinct

    - by homam
    I want to write a query like this: For a table that has these columns: ColA ColB ColC, ColD select first(ColA, ColB, ColC, ColD) distinct(ColB, ColC) from table order by ColD The query is supposed to order the table by ColD, then group the results by the combination of ColB and ColC (they may have different data types) and returns the first rows (with all the columns of the table) in the groups. How is it possible in MS SQL Server 2005?

    Read the article

  • mysql select top users problem

    - by moustafa
    i have users table and i have posts table i want select from users the top users that have the big amount of posts from posts table and order them by numbers of posts i can make it by array_count_values() by i cant order it now i think if i make it by one mysql query by left and join will be more better table structure posts id | auther_id

    Read the article

  • SQL query for select distinct with most recent timestamp first

    - by Josh
    I have a mysql table with three columns: username, location, timestamp. This is basically a log of user activity of what location they are in and the time that they were there. What I want to do is select a distinct username+location where only the most recent item (by timestamp) is provided. So say the table consists of: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00 tom roomtwo 2011-3-25 08:30:00 pam roomone 3011-3-25 07:20:23 I would want only these to be selected: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00

    Read the article

  • how to use conditional select query ? in sqlserver

    - by Arunachalam
    how to use conditional select query ? in sqlserver i have a column in which i store date type variable .now i should retrieve one value from that column and find the difference with the curent_timestamp and if the difference is less than 10 mins i should a return 1 and if more than 10 mins i should return 0.is it possible ? 05-12-2010 13.58.30 - 05-12-2010 13.56.30 here the difference is 2 so it should return 1 .

    Read the article

  • How to select top n rows from a datatable/dataview in asp.net

    - by skamale
    How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way. public DataTable SelectTopDataRow(DataTable dt, int count) { DataTable dtn = dt.Clone(); for (int i = 0; i < count; i++) { dtn.ImportRow(dt.Rows[i]); } return dtn; }

    Read the article

  • SQL : Select a dynamic number of rows as columns

    - by Clint
    I need to select static colums + a dynamic number of rows as columns in SQL TABLE 1 ------- HotelID BlockID BlockName TABLE 2 ------- BlockDate (unknown number of these) NumberOfRooms Desired Result Row ------------------ HotelID | BlockID | BlockName | 02/10/10 | 02/11/10 | 02/12/10 | ...N Where the date columns are the unknown number of BlockDate rows.

    Read the article

  • SQL - Select all when filter value is empty

    - by iansinke
    I have a SQL query in my ASP.net web app that looks like this: SELECT * FROM [Records] WHERE ([title] LIKE '%' + @title + '%') @title, of course, is the value of a text box on the page. My question is, why, when the text box is empty, does this return nothing? And how can I make it return everything, like logic tells me it ought to?

    Read the article

  • QT how to select and change all coulmns of QStandardItemModel

    - by user63898
    Hello im trying to programmatic select and change the background color of all the columns of QStandardItemModel i have this that paint me only the first column out of 5 that the row contains // getting the rows QStandardItem* standardItem = m_model->item(i); //set the color i like all the row to be painted standardItem->setBackground(QBrush(QColor(255,0,0)));

    Read the article

  • MySQL - Select all as one string

    - by poru
    How could I select all as one string seperated with a ,? Example table: Table Stringtest Examplestring2 Anotherstring Otherstring And the selected result should be Stringtest,Examplestring2,Anotherstring,Otherstring.

    Read the article

  • Select in listview, to pass the index through to another form

    - by Luke
    I have a system where a listview is populated. I want to be able to select one of these files and press an edit button, which will then take the selected data into another form. I am trying to find a way to identify the selected item in the listview and take it to the next form. How can i achieve this? What code would I need to show? Thanks

    Read the article

  • How to select records as columns in SQL

    - by Leigh
    Hi, I have two tables: tblSizes and tblColors. tblColors has columns called ColorName, ColorPrice and SizeID. There is one size to multiple colors. I need to write a query to select the size and all the colors (as columns) for a that size with the price of each size in its respective column. The colors must be returned as columns, for instance: SizeID : Width : Height : Red : Green : Blue 1---------220-----220----£15----£20-----£29 Hope this makes sense Thank you

    Read the article

  • Why is the ( ) mandatory in the SQL statement select * from gifts INNER JOIN sentgifts using (giftID

    - by Jian Lin
    Why is the ( ) mandatory in the SQL statement select * from gifts INNER JOIN sentgifts using (giftID); ? The ( ) usually is for specifying grouping of something. But in this case, are we supposed to be able to use 2 or more field names... in the example above, it can be all clear that it is 1 field, is it just that the parser is not made to bypass the ( ) when it is all clear? (such as in the language Ruby).

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >