Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

Page 21/286 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • SQL - How to join on similar (not exact) columns

    - by BlueRaja
    I have two tables which get updated at almost the exact same time - I need to join on the datetime column. I've tried this: SELECT * FROM A, B WHERE ABS(DATEDIFF(second, A.Date_Time, B.Date_Time) = ( SELECT MIN(ABS(DATEDIFF(second, A.Date_Time, B2.Date_Time))) FROM B AS B2 ) But it tells me: Multiple columns are specified in an aggregated expression containing an outer reference. If an expression being aggregated contains an outer reference, then that outer reference must be the only column referenced in the expression. How can I join these tables?

    Read the article

  • NHibernate: Select entire entity plus aggregate columns

    - by cbp
    I want to return an entire entity, along with some aggregate columns. In SQL I would use an inner select, something like this: SELECT TOP 10 f.*, inner_query.[average xxx] FROM ( SELECT f.Id, AVG(fb.xxx) AS [average xxx] FROM foobar fb INNER JOIN foo f ON f.FoobarId = fb.Id ) AS inner_query INNER JOIN foo f ON f.Id = inner_query.Id Is this possible with CreateCriteria?

    Read the article

  • sorting advance datagrid columns in flex

    - by david
    Having four columns in advance datagrid like company,contact_person,product and date. In this, first i want to sort by product followed by company and followed by date. how can i do it in Advance datagrid. Anybody knows please reply me asap. Advance thanks to u.

    Read the article

  • print webpage in two columns

    - by machaa
    Hi, How to print a webpage in two columns or one column as per the user input/choice. And when a take a print out I'm getting the website url on the top left side, How can we stop printing this? Regards

    Read the article

  • how to retrieve distinct values from multiple columns

    - by ANIL MANE
    Hello Experts, I have a flat text file data which I import into MSSQL table. It creates and table with specified name along with multiple columns as per data file. now I need a query which will return the data and its count. e.g. data file : BREAD,MILK BREAD,DIAPER,BEER,EGGS MILK,DIAPER,BEER,COKE BREAD,MILK,DIAPER,BEER BREAD,MILK,DIAPER,COKE BREAD,ICE,MANGO JUICE,BURGER Result should be BREAD | 5 MILK | 4 DIAPER| 4 and so on.

    Read the article

  • SQL Query To Get Multiple Max Values From Multiple Columns

    - by Sheridan
    I am trying to figure out how to pull multiple max values from multiple columns. Here is some sample data: DATE | A | B | C 4/4/2011 | 64.4 | 62.1 | 33.3 4/5/2011 | 34.6 | 33.5 | 32.3 4/6/2011 | 33.1 | 49.4 | 32.1 4/7/2011 | 55.2 | 32.8 | 33.5 4/8/2011 | 31.2 | 50.1 | 30.4 4/9/2011 | 31.7 | 31.1 | 30.4 I want the top 5 so: 4/4/2011 | 64.4 4/4/2011 | 62.1 4/7/2011 | 55.2 4/8/2011 | 50.1 4/6/2011 | 49.4 Thanks

    Read the article

  • linq, selecting columns as IEnumerable<DataRow>

    - by joe
    how can i do in linq: IEnumerable<DataRow> query = from rec in dt.AsEnumerable() where rec.Field<decimal>("column2") == 1 && foo(rec.Field<decimal>("column1")) select new { column1 = rec.Field<decimal>("column1"), column2 = rec.Field<decimal>("column2"), column3 = rec.Field<decimal>("column3")} ; this does not work. Im trying to select some columns as new datatable then join it later with some other datatable.

    Read the article

  • Parsing pipe delimited string into columns?

    - by DMS
    Hello, I have a column with pipe separated values such as: '23|12.1| 450|30|9|78|82.5|92.1|120|185|52|11' I want to parse this column to fill a table with 12 corresponding columns: month1, month2, month3...month12. So month1 will have the value 23, month2 the value 12.1 etc... Is there a way to parse it by a loop or delimeter instead of having to separate one value at a time using substr? Thanks.

    Read the article

  • SQL SERVER - Detecting non-indexed columns but used in WHERE clause

    - by Vadi
    How to detect a column included in WHERE clause but used in indexed? Little Background: Until the time the table has few number of records things will be okay, once it started having millions of records then index should be created for a column which is used in WHERE clauses in stored procs, inline queries etc., Since we have hundreds of stored procs and queries that often gets changed by the devs I wanted to have a automated way of identifying those columns that are used in WHERE clauses but not an index is created. How to do that in SQL SERVER 2008?

    Read the article

  • Mysql count columns

    - by Sergio
    I have a table for image gallery with four columns like: foid | uid | pic1 | pic2 | pic3 | date | ----------------------------------------------- 104 | 5 | 1.jpg | 2.jpg | 3.jpg | 2010-01-01 105 | 14 | 8.jpg | | | 2009-04-08 106 | 48 | x.jpg | y.jpg | | 2010-08-09 Mysql query for the user's galleries looks like: SELECT * FROM foto WHERE uid = $id order by foid DESC The thing that I want to do is count the number of images (PIC1, PIC2, PIC3) in every of the listed galleries. What is the best way for doing that?

    Read the article

  • One DataGrid Item Renderer for multiple columns

    - by user329650
    Hey, I'm trying to create a Flex DataGrid where the firstname and lastname are shown under each other, but in the DataGridColumn Ideally I would want to do something like <mx:columns> <mx:DataGridColumn headerText="Column 2" dataField="time"/> <mx:DataGridColumn headerText="Column 2" dataField="firstname,lastname" itemRenderer="renderers.FirstNameLastName"/> so that both values get passed to the itemrenderer, is this possible? Dennis

    Read the article

  • Group By Multiple Columns - LINQ

    - by Nev_Rahd
    How can I do GroupBy Multiple Columns in LINQ Something as in SQL : SELECT * FROM <TableName> GROUP BY <Column1>,<Column2> How Can i convert below to LINQ QuantityBreakdown ( MaterialID int, ProductID int, Quantity float ) INSERT INTO @QuantityBreakdown (MaterialID, ProductID, Quantity) SELECT MaterialID, ProductID, SUM(Quantity) FROM @Transactions GROUP BY MaterialID, ProductID Thanks

    Read the article

  • Question about using awk to print all columns great then nth

    - by Andy
    right now I have this line, and it worked until I had whitespace in the second field. svn status | grep '\!' | gawk '{print $2;}' > removedProjs is there a way to have awk print everything in $2 or greater? ($3, $4.. until we don't have anymore columns?) I suppose I should add that I'm doing this in a windows environment with cygwin.

    Read the article

  • Select distinct values from multiple columns

    - by nuhusky2003
    I had a table (Some_Table) with two columns: A B ------------------- 1 test 2 test 3 test1 4 test1 i would like to return DISTINCT values for column B and it's associated value in column A (first in distinct set), so something like this: A B ----------- 1 test 3 test1 What is the sql?

    Read the article

  • The Best Way to shred XML data into SQL Server database columns

    - by eddiegroves
    What is the best way to shred XML data into various database columns? So far I have mainly been using the nodes and value functions like so: INSERT INTO some_table (column1, column2, column3) SELECT Rows.n.value('(@column1)[1]', 'varchar(20)'), Rows.n.value('(@column2)[1]', 'nvarchar(100)'), Rows.n.value('(@column3)[1]', 'int'), FROM @xml.nodes('//Rows') Rows(n) However I find that this is getting very slow for even moderate size xml data.

    Read the article

  • Best way to Sort-n-Concatenate 5 columns

    - by SDReyes
    Having five columns containing numeric values A | B | C | D | E ------------------- 2 | 3 | 4 | 1 | 5 3 | 6 | 1 | 5 | 4 4 | 5 | 7 | 1 | 3 I want to obtain the concatenation of the values after sort them: ABCDE ----------- 1 2 3 4 5 1 3 4 5 6 1 3 4 5 7 What is the best way to do it?

    Read the article

  • MYSQL Order By Sum of Columns

    - by djs22
    Hi all, Any idea on how to order the results of a MYSQL query by the sum of two columns rather than by a single column? Select * FROM table ORDER BY (col1+col2) desc I know that won't work., but I hope it conveys what I want to do fairly well. Thanks!

    Read the article

  • Sorting a 2 dimensional array on multiple columns

    - by Anon
    I need to sort a 2 dimensional array of doubles on multiple columns using either C or C++. Could someone point me to the algorithm that I should use or an existing library (perhaps boost?) that has this functionality? I have a feeling that writing a recursive function may be the way to go but I am too lazy to write out the algorithm or implement it myself if it has been done elsewhere. :-) Thanks

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >