Search Results

Search found 9542 results on 382 pages for 'row'.

Page 5/382 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SQL Query Help - Return row in table which relates to another table row with max(column)

    - by Seth
    I have two tables: Table1 = Schools Columns: id(PK), state(nvchar(100)), schoolname Table2 = Grades Columns: id(PK), id_schools(FK), Year, Reading, Writing... I would like to develop a query to find the schoolname which has the highest grade for Reading. So far I have the following and need help to fill in the blanks: SELECT Schools.schoolname, Grades.Reading FROM Schools, Grades WHERE Schools.id = (* need id_schools for max(Grades.Reading)*)

    Read the article

  • Table rows with identifying parameter in each row SQL SERVER 2008 into single row

    - by LiverpoolsNumber9
    Sorry - my question title is probably as inept at my attempt to do this. I have the following (well, similar) in a table in a CMS pageID key value 201 title Page 201's title 201 description This is 201 201 author Dave 301 title Page 301's title 301 description This is 301 301 author Bob As you've probably guessed, what I need is a query that will produce: pageID title description author 201 Page 201's title This is page 201 Dave 301 Page 301's title This is page 301 Bob If anybody could help, i'd be eternally grateful - I know this is "please send me the code" but I'm absolutely stuck. Thanks in advance.

    Read the article

  • added row to a table with jquery but added rows disappear with browser refresh

    - by user840930
    I added rows to a html table with jquery, but when I refresh the browser, the rows disappear. How can I get the rows to stay? <TABLE id="dataTable" width="100%" align="center"> <TR align="center" border="1"> <TH></TH> <TH>ID </TH> <TH>Name</TH> <TH>Status</TH> </TR> <TR align="center"> <TD><INPUT type="checkbox" name="chk"/></TD> <TD> 1 </TD> <TD> <INPUT type="text" value="Submission 1" /> </TD> <TD>Working version</TD> </TR> </TABLE> <script type="text/javascript"> $(document).ready(function(){ $('#createNew').click(function() { var table = document.getElementById('dataTable'); var rowCount = table.rows.length; $('#dataTable tr:last').after('<TR align="center"><TD><INPUT type="checkbox" name="chk"/></TD><TD>'+ rowCount + '</TD><TD> <INPUT type="text" value="Submission 1" /> </TD><TD>Working version</TD></TR>');

    Read the article

  • Gridview adding row dynamically on RowDataBound with the same RowState (Alternate or Normal)

    - by rob waminal
    I am adding rows dynamically on code behind depending on the Row currently bounded on RowDataBound event. I want that added row to be the same state (Alternate or Normal) of the currently bounded row is this possible? I'm doing something like this but it doesn't follow what I want. I'm expecting the added row dynamically would be the same as the current row. But it is not. protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { GVData data = e.Row.DataItem as GVData; // not original object just for brevity if(data.AddHiddenRow) { // the row state here should be the same as the current GridViewRow tr = new GridViewRow(e.Row.RowIndex +1, e.Row.RowIndex + 1, DataControlRowType.DataRow, e.Row.RowState); TableCell newTableCell = new TableCell(); newTableCell.Style.Add("display", "none"); tr.Cells.Add(newTableCell); ((Table)e.Row.Parent).Rows.Add(tr); } } }

    Read the article

  • collapse row by row with (jQuery)

    - by Mini
    I want to hide/show a lot of contents by id Here is an example: <a href="#" class="click"> title here </a> <p class="content" id="1"> text here ... </p> <a href="#" class="click" id="2"> another title here </a> <p class="content"> another text here ... </p> I can add an ID into my HTML code. How Can I get it by jQuery? The jQuery lines: <script type="text/javascript"> $(document).ready(function(){ $('.content').hide(); $('.click').click(function() { $('.content').slideToggle(500); return false; });

    Read the article

  • Convert a Row to a Column (or Backwards) in Google Docs Spreadsheets

    - by The Geek
    If you have to deal with a lot of spreadsheets, you’re probably really bored right now. You also might be wondering how to turn a row into a column, or a column into a row. Here’s how to do it with Google Docs Spreadsheets. If you’re an Excel user, you’re also in luck, because we’ve already shown you how to turn a row into a column, or vice-versa. It won’t make you any less bored though. Convert a Row to a Column (or backwards) The first thing you’ll need is a column or a row of information that you want to convert into the opposite. For our example, we’ve got this set of data that we created by using the Auto Fill options in Google Docs. Now in another cell, you’ll need to use the TRANSPOSE function, which you can use by simply typing in the following: =TRANSPOSE( And then selecting the cells with the mouse, or manually typing in the range of cells you want to copy. The final function in this example was: =TRANSPOSE(A1:A11) Finish it off with the final ) character to complete the function, hit the Enter key, and there we are… the column was transposed over to the right. You can use the same thing to turn columns into rows, or rows into columns—just change the range you are looking for. Similar Articles Productive Geek Tips How To Use AutoFill on a Google Docs Spreadsheet [Quick Tips]Integrate Google Docs with Outlook the Easy WayHow To Export Documents from Google Docs to Your ComputerConvert a Row to a Column in Excel the Easy WayScroll Backwards From the Ubuntu Server Command Line TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Check Your IMAP Mail Offline In Thunderbird Follow Finder Finds You Twitter Users To Follow Combine MP3 Files Easily QuicklyCode Provides Cheatsheets & Other Programming Stuff Download Free MP3s from Amazon Awe inspiring, inter-galactic theme (Win 7)

    Read the article

  • How to set alternate row color for an iterated table in php?

    - by chandru_cp
    I am using php and i am iterating a table with a result array ... I want to add row color and alternate row color to it.... How to do so? Any suggestion... <table id="chkbox" cellpadding="0" cellspacing="2" width="100%" class="table_Style_Border"> <tr> <td style="width:150px" class="grid_header" align="center">RackName</td> <td style="width:150px" class="grid_header" align="center">LibraryName</td> <td style="width:200px" class="grid_header" align="center">LibrarianName</td> <td style="width:200px" class="grid_header" align="center">Location</td> <td style="width:1%" class="grid_header"></td> </tr> <? if(isset($comment)) { echo '<tr> <td class=table_label colspan=5>'.$comment.'</td></tr>'; } ?> <?php foreach($rackData as $row) { ?> <tr> <td align="left" class="table_label"> <?=$row['rack_name']?> </td> <td align="left" class="table_label"> <?=$row['library_name']?> </td> <td align="center" class="table_label"> <?=$row['librarian']?> </td> <td align="center" class="table_label"> <?=$row['location']?> </td> <td align="center"> <input type="checkbox" name="group" id="group" value="<?=$row['rack_id']?>" onclick="display(this);" > </td> </tr> <? } ?> <table>

    Read the article

  • Deleting a row from self-referencing table

    - by Jake Rutherford
    Came across this the other day and thought “this would be a great interview question!” I’d created a table with a self-referencing foreign key. The application was calling a stored procedure I’d created to delete a row which caused but of course…a foreign key exception. You may say “why not just use a the cascade delete option?” Good question, easy answer. With a typical foreign key relationship between different tables which would work. However, even SQL Server cannot do a cascade delete of a row on a table with self-referencing foreign key. So, what do you do?…… In my case I re-wrote the stored procedure to take advantage of recursion:   -- recursively deletes a Foo ALTER PROCEDURE [dbo].[usp_DeleteFoo]      @ID int     ,@Debug bit = 0    AS     SET NOCOUNT ON;     BEGIN TRANSACTION     BEGIN TRY         DECLARE @ChildFoos TABLE         (             ID int         )                 DECLARE @ChildFooID int                        INSERT INTO @ChildFoos         SELECT ID FROM Foo WHERE ParentFooID = @ID                 WHILE EXISTS (SELECT ID FROM @ChildFoos)         BEGIN             SELECT TOP 1                 @ChildFooID = ID             FROM                 @ChildFoos                             DELETE FROM @ChildFoos WHERE ID = @ChildFooID                         EXEC usp_DeleteFoo @ChildFooID         END                                    DELETE FROM dbo.[Foo]         WHERE [ID] = @ID                 IF @Debug = 1 PRINT 'DEBUG:usp_DeleteFoo, deleted - ID: ' + CONVERT(VARCHAR, @ID)         COMMIT TRANSACTION     END TRY     BEGIN CATCH         ROLLBACK TRANSACTION         DECLARE @ErrorMessage VARCHAR(4000), @ErrorSeverity INT, @ErrorState INT         SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(), @ErrorState = ERROR_STATE()         IF @ErrorState <= 0 SET @ErrorState = 1         INSERT INTO ErrorLog(ErrorNumber,ErrorSeverity,ErrorState,ErrorProcedure,ErrorLine,ErrorMessage)         VALUES(ERROR_NUMBER(), @ErrorSeverity, @ErrorState, ERROR_PROCEDURE(), ERROR_LINE(), @ErrorMessage)         RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState)     END CATCH   This procedure will first determine any rows which have the row we wish to delete as it’s parent. It then simply iterates each child row calling the procedure recursively in order to delete all ancestors before eventually deleting the row we wish to delete.

    Read the article

  • Shows how to make your GridViews row-selectable and how to bind to a row's detail.

    How to make an ASP.NET GridView row-selectable and how to bind selected row detail to other controls. The key "trick" to learn is to be able to add an onclick javascript event to each row in the grid that will fire the intrinsic ASP.NET __doPostBack() method.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Create shortcut key to insert new row using Excel 2010

    - by Dave Jarvis
    Tried to create a macro in Excel to insert a row: Sub InsertRow() ' ' InsertRow Macro ' ' Keyboard Shortcut: Ctrl+Shift+I ' Selection.EntireRow.Insert End Sub However, this does not insert a new row without first manually selecting a row. Every solution I've found requires that a row be highlighted before inserting a new row. See also: http://www.shortcutworld.com/en/win/Excel_2010.html How would you create a shortcut key (e.g., Ctrl+Shift+J) to highlight the current row and insert a new row? Thank you! Update Looks like Shift+Space highlights the current row.

    Read the article

  • Select newly added Row - DataGridView and BindingSource

    - by Ruben Trancoso
    I'm adding a new Row to a BindingSource that is Bound to a DataGridView source.AddNew(); After this, use BindingSource to get the newly added row is return the next row in the DataGridView when its sorted. ROW "A" ROW "B" <- myBindingSource.AddNew(); ROW "C" myBindingSource.Current gives ROW "C". (it became the selected row in the DataGridView) I need this because I want to update just the newly added row DataRowView drv = (DataRowView)myBindingSource.Current; myTableAdapter.Update(drv.Row); and not the entire table. myTableAdapter.Update(myDataSet.myTable); and also, I would like to have this newly added line selected in the DataGridView after insertion. is it possible in some way?

    Read the article

  • jQuery: How to find and change multiply th classes between n & n

    - by Ravex
    Hi everyone. I have some table structure: <tr class="row-2"><tr> <tr class="row-3">..<tr> <tr class="row-4">..<tr> <tr class="row-5">..<tr> <tr class="row-6">..<tr> <tr class="row-7"><tr> <tr class="row-8">..<tr> <tr class="row-9">..<tr> <tr class="row-10">..<tr> <tr class="row-11">..<tr> ...etc for this example TR with classes "row-2" and "row-7" is parrent product link wich expand child rows. <script> $(function() { $('tr.parent') .css("cursor","pointer") .css("color","red") .attr("title","Click to expand/collapse") .click(function(){ $(this).siblings('.child-'+this.id).toggle(); }); $('tr[@class^=child-]').hide().children('td'); }); </script> Rows -3...-6 is child of row-2 and Rows -8...-11 is child of row-7 How i can find row-2, row-7, etc then add second class "parrent" and ID similar class (id="row-2", id="row-7", etc)? Also i need add in each TR between row-2 and row-7 class equal previous parrent row. In bottom line i need something like this: <tr class="row-2 parrent" id="row-2"><tr> <tr class="row-3 child-row2">..<tr> <tr class="row-4 child-row2">..<tr> <tr class="row-5 child-row2">..<tr> <tr class="row-6 child-row2">..<tr> <tr class="row-7 parrent" id="row-7"><tr> <tr class="row-8 child-row7">..<tr> <tr class="row-9 child-row7">..<tr> <tr class="row-10 child-row7">..<tr> <tr class="row-11 child-row7">..<tr> ..etc Thanks for any Help.

    Read the article

  • iPhone SDK: How to detect a row-hit while in the editing mode?

    - by Carol
    I've looked everywhere and I can't find it. I have a UITableView that contain rows of "checkmark" cells. The user clicks on a row to check/uncheck it. (It works!!!!) But I also want to allow the user to EDIT the data on that row. ... so I have an "EDIT" button at the top. The user hits it and is allowed to DELETE any rows. (That works too!!!!) But how do I also detect a "tap" on that row. Where is there some kind of a didSelectRowAtIndexPathWhileInEditMode ???? (Is that really the best way to do this: Allow "selections", and "deletions", and "editing" of each row?)

    Read the article

  • Convert a Row to a Column in Excel the Easy Way

    - by Matthew Guay
    Sometimes we’ve entered data in a column in Excel, only to realize later that it would be better to have this data in a row, or vise-versa.  Here’s a simple trick to convert any row or set of rows into a column, or vise-versa, in Excel. Please Note: This is tested in Excel 2003, 2007, and 2010.  Here we took screenshots from Excel 2010 x64, but it works the same on the other versions. Convert a Row to a Column Here’s our data in Excel: We want to change these two columns into rows.  Select all the cells you wish to convert, right-click, and select copy (or simply press Ctrl+C): Now, right-click in the cell where you want to put the data in rows, and select “Paste Special…”   Check the box at the bottom that says “Transpose”, and then click OK. Now your data that was in columns is in rows! This works the exact same for converting rows into columns.  Here’s some data in rows:   After copying and pasting special with Transpose selected, here’s the data in columns! This is a great way to get your data organized just like you want in Excel. Similar Articles Productive Geek Tips Convert Older Excel Documents to Excel 2007 FormatHow To Import a CSV File Containing a Column With a Leading 0 Into ExcelExport an Access 2003 Report Into Excel SpreadsheetMake Row Labels In Excel 2007 Freeze For Easier ReadingKeyboard Ninja: Insert Tables in Word 2007 TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Increase the size of Taskbar Previews (Win 7) Scan your PC for nasties with Panda ActiveScan CleanMem – Memory Cleaner AceStock – The Personal Stock Monitor Add Multiple Tabs to Office Programs The Wearing of the Green – St. Patrick’s Day Theme (Firefox)

    Read the article

  • Rowspan not using top row

    - by DaAwesomeP
    I don't understand why my column won't span to the top and bottom rows I created. It is supposed to look like the "Today" column is taller on the top and bottom then the other columns. I tried accomplishing this by adding rows above and below it and then using rowspan. For some reason, it only works on the bottom row. It's a lot of code, and I wasn't sure what I should cut without deforming it all or adding a new variable (it needs a fluid height). JSFiddle: http://jsfiddle.net/DaAwesomeP/aU9Le/ Basic HTML Layout (the full fiddle has the css: <table id="weatherForecast"> <tr class="weatherForecast-row-outer"> <td></td> </tr> <tr id="weatherForecast-row"> <td id="weatherForecast-DATE" class="weatherForecast-day weatherForecast-day-today" rowspan="2"> <!-- Cell Content for "Today" Here --> <td id="weatherForecast-DATE" class="weatherForecast-day "> <!-- Cell Content Here. There are 4 of these --> </td> </tr> <tr class="weatherForecast-row-outer"> <td></td> </tr> </table> An image showing what I am trying to accomplish: http://s14.postimg.org/ba3xwcm75/Rowspan_not_using_top_row.png

    Read the article

  • Get id when inserting new row using TableAdapter.Update on a file based database

    - by phq
    I have a database table with one field, called ID, being an auto increment integer. Using a TableAdapter I can read and modify existing rows as well as create new ones. However if I try to modify a newly inserted row I get an DBConcurrencyException: OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Shift.mdb;Persist Security Info=True"); ShiftDataSetTableAdapters.ShiftTableAdapter shiftTA = new ShiftDataSetTableAdapters.ShiftTableAdapter(); shiftTA.Connection = conn; ShiftDataSet.ShiftDataTable table = new ShiftDataSet.ShiftDataTable(); ShiftDataSet.ShiftRow row = table.NewShiftRow(); row.Name = "life"; table.Rows.Add(row); shiftTA.Update(row); // row.ID == -1 row.Name = "answer"; // <-- all fine up to here shiftTA.Update(row); // DBConcurrencyException: 0 rows affected Separate question, is there any static type of the NewShiftRow() method I can use so that I don't have to create table everytime I want to insert a new row. I guess the problem in the code comes from row.ID that is still -1 after the first Update() call. The Insert is successful and in the database the row has a valid value of ID. How can I get that ID so that I can continue with the second Update call? Update: IT looks like this could have been done automatically using this setting. However according to the answer on msdn social, OLEDB drivers do not support this feature. Not sure where to go from here, use something else than oledb? Update: Tried SQLCompact but discovered that it had the same limitation, it does not support multiple statements. Final question: is there any simple(single file based) database that would allow you to get the values of a inserted row.

    Read the article

  • Adjust width of td to make make row widths even

    - by user1729886
    I am trying to produce a table with a different number of cells in each row. The first row is a header row (every other row contains cells). This header is the width of the table. The second row has 2 cells in it... the third has 1 cell... the fourth has 4 cells... the fifth and final row has 3 cells. I want the table set up so that the rows span the full width of the table. If the table is 1000px... The header would be 1000px wide the cells in the 2nd row would be 500px EACH the cell in the 3rd row would be 1000px the cells in the 4th row would be 250px EACH and the cells in the 5th row would be 333px, 334px, and 333px each (left-to-right) I figured out I could use colspan for the first 4 rows, but the 5th (with 3 cells) would require a non-integer value. The cells in the 5th row won't expand beyond their column without colspan that I can tell... trying the width:## CSS code inside a div tag for each cell inside the td tag creating a class or classes that define the cell widths id-ing each cell, with or without a div tag, and defining widths individually and adjuting the table-layout: option After several days, I'm now at my rope's end. The only thing I can come up with is deliberately tripling the number of cells in each row so that colspan would be all integer values. That sounds inconvenient and unreasonably difficult to format the table the way I'd like. It's a table of Batman movies for a website -- a practice website I'm building, in order to learn HTML/CSS. I've been working on-and-off with HTML for several months, and CSS for a few weeks. PS: It is not being used for layout, I am simply trying to adjust the layout of the table itself.

    Read the article

  • Getting selected row in inputListOfValues returnPopupListener

    - by Frank Nimphius
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Model driven list-of-values in Oracle ADF are configured on the ADF Business component attribute which should be updated with the user value selection. The value lookup can be configured to be displayed as a select list, combo box, input list of values or combo box with list of values. Displaying the list in an af:inputListOfValues component shows the attribute value in an input text field and with an icon attached to it for the user to launch the list-of-values dialog. The list-of-values dialog allows users to use a search form to filter the lookup data list and to select an entry, which return value then is added as the value of the af:inputListOfValues component. Note: The model driven LOV can be configured in ADF Business Components to update multiple attributes with the user selection, though the most common use case is to update the value of a single attribute. A question on OTN was how to access the row of the selected return value on the ADF Faces front end. For this, you need to know that there is a Model property defined on the af:inputListOfValues that references the ListOfValuesModel implementation in the model. It is the value of this Model property that you need to get access to. The af:inputListOfValues has a ReturnPopupListener property that you can use to configure a managed bean method to receive notification when the user closes the LOV popup dialog by selecting the Ok button. This listener is not triggered when the cancel button is pressed. The managed bean signature can be created declaratively in Oracle JDeveloper 11g using the Edit option in the context menu next to the ReturnPopupListener field in the PropertyInspector. The empty method signature looks as shown below public void returnListener(ReturnPopupEvent returnPopupEvent) { } The ReturnPopupEvent object gives you access the RichInputListOfValues component instance, which represents the af:inputListOfValues component at runtime. From here you access the Model property of the component to then get a handle to the CollectionModel. The CollectionModel returns an instance of JUCtrlHierBinding in its getWrappedData method. Though there is no tree binding definition for the list of values dialog defined in the PageDef, it exists. Once you have access to this, you can read the row the user selected in the list of values dialog. See the following code: public void returnListener(ReturnPopupEvent returnPopupEvent) {   //access UI component instance from return event RichInputListOfValues lovField =        (RichInputListOfValues)returnPopupEvent.getSource();   //The LOVModel gives us access to the Collection Model and //ADF tree binding used to populate the lookup table ListOfValuesModel lovModel =  lovField.getModel(); CollectionModel collectionModel =          lovModel.getTableModel().getCollectionModel();     //The collection model wraps an instance of the ADF //FacesCtrlHierBinding, which is casted to JUCtrlHierBinding   JUCtrlHierBinding treeBinding =          (JUCtrlHierBinding) collectionModel.getWrappedData();     //the selected rows are defined in a RowKeySet.As the LOV table only   //supports single selections, there is only one entry in the rks RowKeySet rks = (RowKeySet) returnPopupEvent.getReturnValue();     //the ADF Faces table row key is a list. The list contains the //oracle.jbo.Key List tableRowKey = (List) rks.iterator().next();   //get the iterator binding for the LOV lookup table binding   DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();   //get the selected row by its JBO key   Key key = (Key) tableRowKey.get(0); Row rw =  dciter.findRowByKeyString(key.toStringFormat(true)); //work with the row // ... }

    Read the article

  • Blocking row navigation in af:table , synchronize row selection with model in case of validation failure- Oracle ADF by Ashish Awasthi

    - by JuergenKress
    In ADF we often work on editable af:table and when we use af:table to insert ,update or delete data, it is normal to use some validation but problem is when some validation failure occurs on page (in af:table) ,still we can select another row and it shows as currently selected Row this is a bit confusing for user as Row Selection of af:table is not synchronized with model or binding layer See Problem- i have an editable table on page Read the complete article here. WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Wiki Technorati Tags: ADF,Ashish Awasthi,WebLogic,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

  • How to write basic matrix using row and column differently

    - by kounabg
    #include<stdio.h> #include<conio.h> int main() { int a[3][3],i,j; for(i=0;i<3;i++) {printf("enter the value of row A: ",a[i]); scanf("%d",& a[i]);} for(i=0;i<3;i++) {printf("enter the value of row B: ",a[i]); scanf("%d",& a[i]);} for(i=0;i<3;i++) {printf("enter the value of row C: ",a[i]); scanf("%d",& a[i]);} } ***I did this. I want to convert it into matrix and how can I do it?

    Read the article

  • When row estimation goes wrong

    - by Dave Ballantyne
    Whilst working at a client site, I hit upon one of those issues that you are not sure if that this is something entirely new or a bug or a gap in your knowledge. The client had a large query that needed optimizing.  The query itself looked pretty good, no udfs, UNION ALL were used rather than UNION, most of the predicates were sargable other than one or two minor ones.  There were a few extra joins that could be eradicated and having fixed up the query I then started to dive into the plan. I could see all manor of spills in the hash joins and the sort operations,  these are caused when SQL Server has not reserved enough memory and has to write to tempdb.  A VERY expensive operation that is generally avoidable.  These, however, are a symptom of a bad row estimation somewhere else, and when that bad estimation is combined with other estimation errors, chaos can ensue. Working my way back down the plan, I found the cause, and the more I thought about it the more i came convinced that the optimizer could be making a much more intelligent choice. First step is to reproduce and I was able to simplify the query down a single join between two tables, Product and ProductStatus,  from a business point of view, quite fundamental, find the status of particular products to show if ‘active’ ,’inactive’ or whatever. The query itself couldn’t be any simpler The estimated plan looked like this: Ignore the “!” warning which is a missing index, but notice that Products has 27,984 rows and the join outputs 14,000. The actual plan shows how bad that estimation of 14,000 is : So every row in Products has a corresponding row in ProductStatus.  This is unsurprising, in fact it is guaranteed,  there is a trusted FK relationship between the two columns.  There is no way that the actual output of the join can be different from the input. The optimizer is already partly aware of the foreign key meta data, and that can be seen in the simplifiction stage. If we drop the Description column from the query: the join to ProductStatus is optimized out. It serves no purpose to the query, there is no data required from the table and the optimizer knows that the FK will guarantee that a matching row will exist so it has been removed. Surely the same should be applied to the row estimations in the initial example, right ?  If you think so, please upvote this connect item. So what are our options in fixing this error ? Simply changing the join to a left join will cause the optimizer to think that we could allow the rows not to exist. or a subselect would also work However, this is a client site, Im not able to change each and every query where this join takes place but there is a more global switch that will fix this error,  TraceFlag 2301. This is described as, perhaps loosely, “Enable advanced decision support optimizations”. We can test this on the original query in isolation by using the “QueryTraceOn” option and lo and behold our estimated plan now has the ‘correct’ estimation. Many thanks goes to Paul White (b|t) for his help and keeping me sane through this

    Read the article

  • How to insert and call by row and column into sqlite3 python, great tutorial problem.

    - by user291071
    Lets say i have a simple array of x rows and y columns with corresponding values, What is the best method to do 3 things? How to insert, update a value at a specific row column? How to select a value for each row and column, import sqlite3 con = sqlite3.connect('simple.db') c = con.cursor() c.execute('''create table simple (links text)''') con.commit() dic = {'x1':{'y1':1.0,'y2':0.0},'x2':{'y1':0.0,'y2':2.0,'y3':1.5},'x3':{'y2':2.0,'y3':1.5}} ucols = {} ## my current thoughts are collect all row values and all column values from dic and populate table row and columns accordingly how to call by row and column i havn't figured out yet ##populate rows in first column for row in dic: print row c.execute("""insert into simple ('links') values ('%s')"""%row) con.commit() ##unique columns for row in dic: print row for col in dic[row]: print col ucols[col]=dic[row][col] ##populate columns for col in ucols: print col c.execute("alter table simple add column '%s' 'float'" % col) con.commit() #functions needed ##insert values into sql by row x and column y?how to do this e.g. x1 and y2 should put in 0.0 ##I tried as follows didn't work for row in dic: for col in dic[row]: val =dic[row][col] c.execute("""update simple SET '%s' = '%f' WHERE 'links'='%s'"""%(col,val,row)) con.commit() ##update value at a specific row x and column y? ## select a value at a specific row x and column y?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >