Search Results

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

Page 94/286 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • How to fill a dataset after getting a gridview?

    - by user175084
    I have a gridview which has many columns.. the columns are got separately and displayed in a gridview. now i need to sort this gridview but i cannot do that.... i have found a way but i will need to get the gridview in a datatable or a dataset.... is there a a way to do this? DataSet ds= new DataSet(); ds = Gridview1.???? please help..

    Read the article

  • Why does this page look different between IE, Firefox & Chrome

    - by ripper234
    In Firefox it looks just like I want it to look, in IE it looks "a bit weird", and in Chrome it's all twisted. What non-standard HTML I am using that makes it looks so different between browsers? Specifically, how can I fix the Chrome & IE versions to look more like Firefox? Note that Chrome only goes haywire if all or almost all columns have the yellow stickies. If one or two columns are empty, then Chrome displays the page just like Firefox. The full HTML is at this pastebin.

    Read the article

  • Sorting Multidimensional Array with Javascript: Integers

    - by tkm256
    I have a 2D array called "results." Each "row" array in results contains both string and integer values. I'm using this script to sort the array by any "column" on an onclick event: function sort_array(results, column, direction) { var sorted_results = results.sort(value); function value(a,b) { a = a[column]; b = b[column]; return a == b ? 0 : (a < b ? -1*direction : 1*direction) } } This works fine for the columns with strings. But it treats the columns of integers like strings instead of numbers. For example, the values 15, 1000, 200, 97 would be sorted 1000, 15, 200, 97 if "ascending" or 97, 200, 15, 1000 "descending." I've double-checked the typeof the integer values, and the script knows they're numbers. How can I get it to treat them as such?

    Read the article

  • Some way of getting just the data part from a web service returning a DataTable?

    - by simendsjo
    I'm using an external web service that returns a DataTable. There's a couple of problems with this. The first is that there are over 20,000 columns, and .Net crashes when trying to convert the xml to a DataTable. I have to use Mono to make this work. The other problem is that it takes a lot of time to fetch all the column information. The columns "never" changes (and when they do, I know about it in advance). I would like to just fetch the data part, and load the schema from a local file. I very much doubt this is possible, but I thought I could ask here just in case.

    Read the article

  • MySQL query problem

    - by FinalDestiny
    I have 2 mysql tables 1. questions: with the following columns: id, title, answer1, answer2, answer3, answer4, answer5, nranswers. and 2. answers with the following columns: id, questionid, userid, answer Every question has maximum 5 answers( it can have between 2 and 5 answers). My problem is that I want to select from my database, for a given question, how many times was every option selected. For example, let's suppose I have the question with the id 46, with 4 answers, and 48 users voted for the option #2, 37 users for the option #1 and 39 for the option #4. I want a query that selects that and write these things: 1 37 2 48 3 0 4 39 P.S. VERY IMPORTANT! IT MUST COUNT ONLY NRANSWERS ANSWERS, AND IT MUST ECHO THE ONES THAT WEREN'T VOTED BEFORE.

    Read the article

  • Checkbox rendering in datagrid

    - by Thirst for Excellence
    <mx:DataGrid id="dg" dataProvider="{cNumbersList}"> <mx:columns> <mx:DataGridColumn dataField="contactName" headerText="Name" width="50"/> <mx:DataGridColumn dataField="contactNo" headerText="ContactNo" width="40"/> <mx:DataGridColumn headerText="Select Contact Number" width="20"> <mx:itemRenderer> <mx:Component>enter code here <mx:CheckBox selected="false" /> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> How to get all checked items into one more new array ?Plz help me anyone

    Read the article

  • SQL Analysis Services - Dimension attributes with a "many" cardinality

    - by MonkeyBrother
    I am creating a cube with the following tables: Customer CustomerID, Name Customer Rep CustomerID, RepID Rep RepID, Name The important thing here is that there is a many to many relationship between Reps and Customers. I want to be able to ask the question "How much sales for customers working with rep 'A'?" In the data source view i set up the relationships between both customerid columns and both repid columns. I set up the rep attribute in the dimension builder and when I try to build the cube I get this error: Errors in the high-level relationship engine. the 'Rep' table that is required for a join cannot be reached based on the relationships in the data source view.

    Read the article

  • Dynamic Column lookup with different pages in excel

    - by CinCity
    I have a multi page spread sheet in excel that needs to read information dynamically from columns on other pages and have these values show up on a main page. This is the formula I'm using: =IF(VLOOKUP($B:$B,'CP01'!$B:$BN,3,FALSE)="r","r", IF(VLOOKUP($B:$B,'CP01'!$B:$BN,3,FALSE)="a","a","")) CP01 is a sheet in the excel file and instead of look at the specific sheet I want it to look at all of the sheets in the file. Is there a way to do this as an excel formula or with excel-VBA? Edit: I also tried CP* (* being a wildcard character) and it didn't work. Edit2: Is there a way to match the value where the 'CP' is placed with its a other columns value?

    Read the article

  • Issue with SQL query for activity stream/feed

    - by blabus
    I'm building an application that allows users to recommend music to each other, and am having trouble building a query that would return a 'stream' of recommendations that involve both the user themselves, as well as any of the user's friends. This is my table structure: Recommendations ID Sender Recipient [other columns...] -- ------ --------- ------------------ r1 u1 u3 ... r2 u3 u2 ... r3 u4 u3 ... Users ID Email First Name Last Name [other columns...] --- ----- ---------- --------- ------------------ u1 ... ... ... ... u2 ... ... ... ... u3 ... ... ... ... u4 ... ... ... ... Relationships ID Sender Recipient Status [other columns...] --- ------ --------- -------- ------------------ rl1 u1 u2 accepted ... rl2 u3 u1 accepted ... rl3 u1 u4 accepted ... rl4 u3 u2 accepted ... So for user 'u4' (who is friends with 'u1'), I want to query for a 'stream' of recommendations relevant to u4. This stream would include all recommendations in which either the sender or recipient is u4, as well as all recommendations in which the sender or recipient is u1 (the friend). This is what I have for the query so far: SELECT * FROM recommendations WHERE recommendations.sender IN ( SELECT sender FROM relationships WHERE recipient='u4' AND status='accepted' UNION SELECT recipient FROM relationships WHERE sender='u4' AND status='accepted') OR recommendations.recipient IN ( SELECT sender FROM relationships WHERE recipient='u4' AND status='accepted' UNION SELECT recipient FROM relationships WHERE sender='u4' AND status='accepted') UNION SELECT * FROM recommendations WHERE recommendations.sender='u4' OR recommendations.recipient='u4' GROUP BY recommendations.id ORDER BY datecreated DESC Which seems to work, as far as I can see (I'm no SQL expert). It returns all of the records from the Recommendations table that would be 'relevant' to a given user. However, I'm now having trouble also getting data from the Users table as well. The Recommendations table has the sender's and recipient's ID (foreign keys), but I'd also like to get the first and last name of each as well. I think I require some sort of JOIN, but I'm lost on how to proceed, and was looking for help on that. (And also, if anyone sees any areas for improvement in my current query, I'm all ears.) Thanks!

    Read the article

  • [R] how do I quickly group the time column in a dataframe into intervals?

    - by Derek
    Hi, Assuming in R, I have a data.frame with the first column representing the time (as POSIXct). The rest of the columns (e.g., columns 2) are numeric data. I would like to group time into 3-minute intervals. Each interval will the the average of values that falls into that particular interval. Right now, I have a for-loop that iterates through the time column and generate the interval on the fly. I am wondering if there's a more elegant way to accomplish the same thing? Thanks in advance. Derek

    Read the article

  • How can I get values from one table to another via similar values?

    - by Andrija
    I have a table called excel that has 3 columns, name, id, and full_name. The name part is the only one I have and I need to fill id and full_name. The other table that contains the data is called tim_pismena and has 2 columns that I need, id and pismeno_name (the actual names are not important, but i'm writing them just for clarity). In pseudooracle code :) the select that gets me the values from the second table would be done something like this: SELECT tp.id, tp.pismeno_name FROM tim_pismena tp WHERE upper(tp.naziv_pismena) LIKE IN upper('%(SELECT ime as FROM excel)%') and when used with an insert, the end result should be something like name id full_name Happy Joe 55 Very fun place Happy Joe, isn't it?

    Read the article

  • SSAS Reporting Services - Set specific language / translation

    - by Chris
    Hi all, in the data warehouse there's a default language for the measures, and I added a translation for German captions. In a Visual Studio Report Server project, when creating a query with my German OS, the cube and its measures are displayed in German language. When dragging measures to the mdx query windows, the default measure name is used. That's what I want and what I expect, since when writing MDX queries I would like to use the default measure names. But when executing the query, the columns created for each measure is translated to German again. This resuls in having German columns names within my dataset, which I dont want. I'd like to have the english column names. I already tried to change the connection string to: Data Source=server;Initial Catalog=DataWarehouse;LocaleIdentifier=1033 But that doesn't help, I still see German translations. Anyone knows how to set a specific translation?

    Read the article

  • mysql to xls sheet genration problemI(getting html code along with records ,unable get column names)

    - by pmms
    <?php if($_POST['Submit']=='Generatexml') { $tblname=$_GET['genratexml']; //mysql_connect("localhost","root",""); //mysql_select_db("hitnrunf_db"); global $obj_mysql; $result = mysql_query("SELECT * FROM tbl_js_login"); while($row = mysql_fetch_array($result)) { $csv_output .= "$row[fld_id],$row[fld_fname],$row[fld_lname]"; $csv_output .="\015\012"; } header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv; filename= Student_Data_". date("Y-m-d") . ".csv"); print $csv_output; exit; } include_once $path."includes/jobseeker_form.php"; ?> In the above we are getting html code along wtih id, firstname, lastname columns. we are unable to get the heading of the columns also How to remove Html code from xls file also need to get headers

    Read the article

  • Problem with DataGrid_CellFormatting event to set default value

    - by Royson
    Hi, I have created an applicationto display list of files. it also provide user interface for adding new column to a gridview. DataGridViewTextBoxColumn txtBoxColumn = new DataGridViewTextBoxColumn(); txtBoxColumn.Name = columnName; txtBoxColumn.HeaderText = columnName; g_dataGridView.Columns.Add(txtBoxColumn); User will create some custom type column therefore i am adding column directly to grid. I am also able to set its default value before adding for this i am using DataGrid_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (colIndexWithDefaultValue.Count > 0) { if (colIndexWithDefaultValue.Contains(e.ColumnIndex)) { g_dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = colIndexWithDefaultValue[e.ColumnIndex]; } } } where colIndexWithDefaultValue is list of columns with its default value. It is able to show newly created column with default value. But values are getting set for currently visible rows. To set value for all rows i have to do scrolling. So, how do i overcome this problem...

    Read the article

  • related categories - database design

    - by mike
    Hello! I'm looking for a little database design advice... I have a spreadsheet with a few columns in it. Column 1 being a list of categories and the rest being related categories(to the category in column 1). I'm trying to figure out what the best way to setup the tables would be... My thought so far is to have a table that just lists the categories then have a table with 2 columns that holds the id of the category and the id of a related category.... Would this be the best way to do this? Any better ideas?

    Read the article

  • MySQL COUNT help

    - by space
    I'm trying to count all the ids form table3 that are related to the first two tables but I think my SQL code is wrong can some one help me fix it? Here is the code: $dbc = mysqli_query($mysqli,"SELECT table1.*, table2.*, COUNT(id) as num, table3.id FROM table1 INNER JOIN table2 ON table1.id = table2.id INNER JOIN table3 ON table2.id = table3.id WHERE table2.id = '$id'"); Here is the error message. Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4

    Read the article

  • hibernate - Postgres- target lists can have at most 1664 entries

    - by Vineyard
    We are using hibernate, postgres 8.3x Our entities are many to one mapped with eager fetching. We have multiple associations with Many to one mapping. As we added new columns to any other existing entities, We are getting below error: target lists can have at most 1664 entries I searched internet and they say this is due to More number of select statements in sql query (generated by hibernate) Can you any body please let us know if there is any configuration (in postgres) to update max number columns in configuration or any other solution to solve this issue. Thank you in advance.

    Read the article

  • Change list link to foreign key change page

    - by Adam
    When viewing the admin change list for a model, is it possible to make the columns that correspond to foreign keys links to their respective pages? A simple example is I have a Foo object which contains Bar as a foreign key. If I'm viewing the admin change list for Foo (and have it set to include Bar in the display_list columns), the main column would link to the Foo instance's edit page while the Bar column would link to the Boo instance's edit page. I understand I can override the template that's used, but I was curious if there was a solution that didn't require that.

    Read the article

  • How would you write this Clojure snippet in Ruby and/or Haskell?

    - by dnolen
    I was working on a Rails template and was trying to write a bit of code that allows me to populate a table or multiple columns of ul tags "top-to-bottom" and "left-to-right" across however many columns I specify. I'm just getting the hang of Ruby so I couldn't figure this out. I'm also curious about an idiomatic Haskell version for this useful snippet. Improvements to Clojure version appreciated: (defn table [xs & {:keys [cols direction] :or {cols 1 direction 'right}}] (into [] (condp = direction 'down (let [c (count xs) q (int (/ c cols)) n (if (> (mod c q) 0) (inc q) q)] (apply map vector (partition n n (repeat nil) xs))) 'right (map vec (partition cols cols (repeat nil) xs))))) With this bit of code I can then do the following: (table (range 10) :cols 3) Printed out this would look like so: 0 1 2 3 4 5 6 7 8 9 And the trickier one: (table (range 10) :cols 3 :direction 'down) Looks like so: 0 4 8 1 5 9 2 6 3 7

    Read the article

  • How to extract a submatrix from a matrix .. ?

    - by ZaZu
    Hello, I have a matrix in a txt file and I want to load the matrix based on my input of number of rows and columns For example, I have a 5 by 5 matrix in the file. I want to extract a 3 by 3 matrix, how can I do that ? I created a nested loop using : FILE *sample sample=fopen("randomfile.txt","r"); for(i=0;i<rows;i++){ for(j=0;j<cols;j++){ fscanf(sample,"%f",&matrix[i][j]); } fscanf(sample,"\n",&matrix[i][j]); } fclose(sample); Sadly the code does not work .. If I have this matrix : 5.00 4.00 5.00 6.00 5.00 4.00 3.00 25.00 5.00 3.00 4.00 23.00 5.00 2.00 352.00 6.00 And inputting 3 for rows and 3 for columns, I get : 5.00 4.00 5.00 6.00 5.00 4.00 3.00 25.00 5.00 Which is obviously wrong , its reading line by line rather than skipping the unmentioned column ... What am I doing wrong ? Thanks !

    Read the article

  • Is there a way to hide a row or column in excel without using VBA?

    - by AJ
    I know of several approaches using a macro (VBA) to show/hide columns and rows in Excel, but I cannot figure out or find a way to do this using either a formula or conditional formatting. Of particular interest is Excel 2007 - but I'd be curious to know if someone has managed to do it in any version of Excel. For those who want background, I have a spread of data with dates across the top and labels down the first column. I would like to specify a date window (on another sheet) as two cells with drop down dates (months) which would then show/hide the appropriate columns on the data sheet.

    Read the article

  • Create a basic matrix in C (input by user !)

    - by DM
    Hi there, Im trying to ask the user to enter the number of columns and rows they want in a matrix, and then enter the values in the matrix...Im going to let them insert numbers one row at a time. How can I create such function ? #include<stdio.h> main(){ int mat[10][10],i,j; for(i=0;i<2;i++) for(j=0;j<2;j++){ scanf("%d",&mat[i][j]); } for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d",mat[i][j]); } This works for inputting the numbers, but it displays them all in one line... The issue here is that I dont know how many columns or rows the user wants, so I cant print out %d %d %d in a matrix form .. Any thoughts ? Thanks :)

    Read the article

  • User activity vs. System activity on the Index Usage Statistics report

    - by Zachary G Jensen
    I recently decided to crawl over the indexes on one of our most heavily used databases to see which were suboptimal. I generated the built-in Index Usage Statistics report from SSMS, and it's showing me a great deal of information that I'm unsure how to understand. I found an article at Carpe Datum about the report, but it doesn't tell me much more than I could assume from the column titles. In particular, the report differentiates between User activity and system activity, and I'm unsure what qualifies as each type of activity. I assume that any query that uses a given index increases the '# of user X' columns. But what increases the system columns? building statistics? Is there anything that depends on the user or role(s) of a user that's running the query?

    Read the article

  • Python code to do csv file row entries comparison operations and count the number of times row value

    - by Venomancer
    have an excel based CSV file with two columns (or rows, Pythonically) that I am working on. What I need to do is to perform some operations so that I can compare the two data entries in each 'row'. To be more precise, one column has constant numbers all the way down, whereas the other column has varying values. So I need to count the number of times the varying column data entry values crosses the constant value on the other column. For example, fro the csv file i have two columns: Varying Column; Constant Column 24 25 26 25 crossed 27 25 26 25 25.5 25 23 25 crossed 26 25 crossed Thus, the varying column data entries have crossed 25 three times. I need to generate a code that can count the number of the crosses. Please do help out, Thanks.

    Read the article

  • Insert into select and update in single query

    - by Ossi
    I have 4 tables: tempTBL, linksTBL and categoryTBL, extra on my tempTBL I have: ID, name, url, cat, isinserted columns on my linksTBL I have: ID, name, alias columns on my categoryTBL I have: cl_id, link_id,cat_id on my extraTBL I have: id, link_id, value How do I do a single query to select from tempTBL all items where isinsrted = 0 then insert them to linksTBL and for each record inserted, pickup ID (which is primary) and then insert that ID to categoryTBL with cat_id = 88. after that insert extraTBL ID for link_id and url for value. I know this is so confusing, put I'll post this anyhow... This is what I have so far: INSERT IGNORE INTO linksTBL (link_id,link_name,alias) VALUES(NULL,'tex2','hello'); # generate ID by inserting NULL INSERT INTO categoryTBL (link_id,cat_id) VALUES(LAST_INSERT_ID(),'88'); # use ID in second table I would like to add here somewhere that it only selects items where isinserted = 0 and iserts those records, and onse inserted, will change isinserted to 1, so when next time it runs, it will not add them again.

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >