Click here to Skip to main content
15,881,757 members
Everything / Table

Table

table

Great Reads

by J.Jash
Data Auditing Trigger Generator
by Technoses
The above code will slow down the browser and the browser can hang when Rows in Grid will be 10000 or above.Please view the below suggestion:CS Codeprotected void grvGroups_RowDataBound(object sender, GridViewRowEventArgs e){ if (e.Row.RowType == DataControlRowType.DataRow) { ...
by ManojKumar19
Update row column with another row column in same table SQL only if it is null.
by RovenetBill
ASP.NET c# component for editing SQL tables with plug-in column format adapter architecture.

Latest Articles

by Perić Željko
Sorting Multi-Dimensional Arrays in C# with QuickSort Sort Extensions
by Telegram:@ArastoAhmadi
Tutorial to monitor database changes without using tools and by using a simpler trick
by Arctype SQL
How to use full text search and the match keyword to find a string in every table in a MySQL database
by Bart-Jan Brouwer
Use bootstrap tables with minimal coding on .Net Core 2.0!

All Articles

Sort by Score

Table 

27 Jun 2012 by Technoses
The above code will slow down the browser and the browser can hang when Rows in Grid will be 10000 or above.Please view the below suggestion:CS Codeprotected void grvGroups_RowDataBound(object sender, GridViewRowEventArgs e){ if (e.Row.RowType == DataControlRowType.DataRow) { ...
17 Aug 2012 by ManojKumar19
Update row column with another row column in same table SQL only if it is null.
29 Nov 2012 by RovenetBill
ASP.NET c# component for editing SQL tables with plug-in column format adapter architecture.
23 Jul 2013 by Guirec
The simple answer is : you need a 3rd table StudentHasBorrowedBook with 2 PKs colums Roll number and Book number.That said the question might become much more complicated if you have 2 prints of the same 'Book'
2 Mar 2014 by ASP.NET Community
In my case, I use  a FileUpload Control(Id:->FileUpload1), an ImageButton(ImageButton1) or you can use the Image,  a Button Control(Id:->Updatebttn)
10 Apr 2017 by CHill60
Quote: (sic) i have 5 tables with same column names but different records, can i add the records form all tables into 1 table and display it? If you have 5 tables with the same column names but different records then what you do have is a very bad database design. Revisit your database design....
12 Mar 2024 by Perić Željko
Sorting Multi-Dimensional Arrays in C# with QuickSort Sort Extensions
11 Jul 2011 by OriginalGriff
The best way if to use Cascaded Deletes[^], so that the database will always handle it for you.Alternatively, I would suggest that using transactions might be a better alternative, possibly inside a stored procedure.
2 Apr 2012 by Not Active
11,700,000 hits in .25 seconds. Why are you waiting for an answer here?https://www.google.com/search?aq=1&oq=insert+excel+to+sql&sourceid=chrome&ie=UTF-8&q=insert+excel+to+sql+server[^]
24 May 2012 by Maciej Los
SELECT F1 FROM Table1UNION ALLSELECT F2 AS F1 FROM Table2More at MSDN: UNION[^][EDIT]Analogically, if data comes from the same table:SELECT F1 FROM Table1UNION ALLSELECT F2 AS F1 FROM Table1[/EDIT]
6 Sep 2012 by Syed Salman Raza Zaidi
Use: @model IEnumerableon top of your view,as you're having IList so you'll have to specify model as IEnmumerable
13 Sep 2012 by TRK3
It's usually best if you take things one error at a time. The first error you get is the table creation fails with a 121 error code.If you google "mySQL 121 error" you'll find it's a "foreign key constraint error"So, most likely there is a problem with:CONSTRAINT `produkt_id` ...
27 Nov 2012 by Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.
26 Feb 2013 by AshishChaudha
foreach(GridViewRow gvr in GridView1.Rows) { if (gvr.RowType == DataControlRowType.DataRow) { string value = ((DropDownList)gvr.FindControl("didDdl")).SelectedValue; //here write code for inserting in sql table.use parameterized query for...
16 Sep 2013 by Maciej Los
Test it:DECLARE @lessons TABLE(LessonID INT IDENTITY(1,1), LessonName VARCHAR(30))INSERT INTO @lessons (LessonName)SELECT 'lesson A'UNION ALL SELECT 'lesson B'UNION ALL SELECT 'lesson C'UNION ALL SELECT 'lesson D'--UNION ALL SELECT 'lesson E'DECLARE @subject_lesson TABLE...
22 Oct 2013 by bjdestiny
Exactly before solution i would like to suggest you that please place your code so we could judge your exact problem.further you just try this in your css settings ul li{display:inline; /| text-align:right; /| float:left;}still if you are facing same problem then you need to post your code.
26 Jun 2015 by CPallini
It's time time to read one (or more) tutorial on "database normalization for beginners"[^].
22 Feb 2016 by Sifiso W Ndlovu
This tip illustrates a workaround to SQL Server pivoting on variable character data types.
12 Sep 2017 by Bart-Jan Brouwer
Use bootstrap tables with minimal coding on .Net Core 2.0!
2 May 2020 by MadMyche
Probably the most important thing to include with your question is to be specific with the environment information. I also have data stored out in the cloud. It happens that I happen to be working with MS SQL Server which actually has native...
26 Jul 2010 by Andrew Rissing
The new instance of the datatable set into "tbldt" is being reset by the line:tbldt = (DataTable)xmlDatadocTimeTable.DataSet.Tables["TIMETABLES"];I would check to make sure your file "TimeTable_Full.xml" indeed has the TIMETABLES table. Because it seems, it does not.
31 Jan 2011 by Igor Kushnarev
Use Jasper Reports: http://jasperforge.org/projects/jasperreports[^]There is a good...
8 Apr 2011 by Wendelius
The question can be related to many different things. Few examples:- table types, used for example to dynamically transfer data to/from stored procedure- computed columns in a table- calculated fields in an SQL statement- dynamic SQL statements- inline views etcIf you explain a bit...
24 Jun 2011 by Dave Kreskowiak
Your code isn't writing a proper .DOC file for any version of Word. A .DOC file is not expected to contain HTML, but that's what you're writing out.My first suspect would be the UTF7 encoding. Change it to UTF8 and try it again.
28 Sep 2011 by Pradeep Shukla
First you should not store the "Category Desc" in tblProduct, use the CategoryID instead. As far as the question of filling up the combo box...Use a SQL query like this : SELECT NAME, CATEGORYID FROM TBLCATEGORYuse this to fetch the data and bind the combo box with the datatable.set the...
29 Nov 2011 by Kevin Derrick Murphy
I have a SQL Server 2008 table with three columns, ID, ProvinceID and NameID and ProvinceID are both integers. ID is an identity for each item and ProvinceID is either 0 or an ID entry to indicate its parent. A sample of the table count as entered is...
30 Nov 2011 by Amir Mahfoozi
Hi Kevin,Try this one :WITH search_graph (ID,ProvinceID,Name, ProvDepth, CountryPath )AS ( SELECT [ID],[ProvinceID],[Name], 0 AS ProvDepth, cast(id as varchar(max)) as CountryPath FROM [Counties] WHERE provinceid = 0 UNION ALL SELECT e.ID, e.ProvinceID, e.Name,...
14 Dec 2011 by Wendelius
If you're trying to delete a post, shouldn't you delete it using the primary key of the post table (post_id)? If you're UI is giving the user the possibility to try to delete a post posted by another user, consider changing the UI so that this option isn't shown to the user unless it's the...
18 Jan 2012 by Morten Lossius
Copy tables between servers with smo - different collation
11 Mar 2012 by CRDave1988
OKI have fount something like this check this:http://jwcooney.com/2011/09/08/generating-excel-documents-through-html-xml-and-css-part-2/[^]
30 Mar 2012 by Sergey Alexandrovich Kryukov
I have no idea which of your border, alignment and similar attributes create the loss in cross-browser compatibility. I can tell you why: I never use them. Using such attributes is really a bad thing. I don't even know who develop Web sites using them. Probably none of real Web...
24 May 2012 by ujju.1
you can use union all for thise.g.select column_Name1 from tbl_1 union all select column_Name2 from tbl_2
25 May 2012 by CPallini
You should check the result (that is $result) of mysqli_query before passing it to mysqli_num_rows, see the documentation [^].
4 Jun 2012 by Peta2010
I was using wrong SQL query.// Define a query that retrieves all fields names and id $query = "SELECT cards.card_id, series.series_name, cards.card_player,cards.card_condition FROM cards, series WHERE cards.cards_id = series.cards_id ";Thanks for your help guys.
14 Jun 2012 by Sandeep Mewara
OP commented that he solved the issue. Posting here just to pop it out of Unanswered list.
12 Sep 2012 by Karthik. A
Hi,Replace this line:alert(document.getElementById('myDataTable').rows[1].cells[1].childNodes[0].data);with this:alert($(this).find('td:eq(1)').html());Some explanation: this refers to your entire row, where the user double clicks. Then using td:eq(1) I find the 2nd cell in...
13 Sep 2012 by Zoltán Zörgő
Try this one:CREATE TRIGGER liczy_zarobek_koszyk BEFORE INSERT ON koszykFOR EACH ROW BEGIN SET NEW.koszyk_zarobek = NEW.koszyk_ilosc * (SELECT produkt_zarobek FROM produkty WHERE product_id=NEW.produkt_id);END;Here is the cross reference:CONSTRAINT `koszyk_id` FOREIGN...
7 Nov 2012 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I checked the website http://line25.com/wp-content/uploads/2010/snowboard-design-code/demo/index.html[^] and found that the div "features" has width "940px". So no matter what content goes inside it and what width it has inside that div (like the ul tag inside this div has width "2820px"),...
3 Mar 2013 by willington.d
1. If you checked Allow Nulls, It will be null when you insert without any value.2. The value will be empty in code behind If it is Varchar data type in db3. You can set default value (Go to design view of the table--> click on the column name --> Look into the column property and find...
4 Mar 2013 by Andrews Smith
How can I add rows to a table with this structure using javascript?Basically I want to be able to click a button and have a new row created within the table for each of the columns used below. So for instance, it could be name: new book, quantity:30 etc. ...
4 Mar 2013 by Jameel VM
Using jQuery you can easily add rows like below$('#buttonId').click(function(){string htmlRow="My Favorite book2x 20
4 Mar 2013 by MattHarrington
The strategy is to first get the element ID you want to append to, then create a new row element with the new data, and then append that element to the ID you got in step 1.Perhaps something like this?var tableBody = document.getElementById('tableBody');var...
16 Mar 2013 by OriginalGriff
Swap the date around: BETWEEN expects the first one to be the start date, and the second to be the end date. Since your end is before your start, no records are returned.
16 Mar 2013 by Prasad Khandekar
Hello,For date comparison all values must be of date type. Your query will return no records as you are trying string comparison, BETWEEN will not work as expected. CONVERT(VARCHAR(11), CreateDate, 103) I suggest you change your SQL to SELECT JobTitle, CONVERT(VARCHAR(11),CreatedDate,103) ...
16 Mar 2013 by Prasad Khandekar
Hello,Rows deleted can not be recovered after COMMIT operation. If COMMIT is already performed then only way I know to recover data is via database restore provided you have taken a backup before performing this operation.Regards,
25 Mar 2013 by Maciej Los
Probably, no matter on BodyFormat (rtf/html/text), the only way to achieve that is to use VBScript.RegExp library.To use it, you need to add reference in VBA editor as is shown here: simple-regular-expression-tutorial-for-excel-vba[^].Many useful information, you'll find here: Microsoft...
27 May 2013 by Aarti Meswania
Select MatchId,[Home Win],[Draw],[Away Win],[Under 2.5],[Over 2.5]From TableName PIVOT( SUM(Odds) For SelectionName in ([Home Win],[Draw],[Away Win],[Under 2.5],[Over 2.5])) as pvttblHappy Coding!:)
23 Jul 2013 by Sharathkumar k.r
SELECT Student.Rollnumber, Book.Bookname, Student.StudentnameFROM StudentINNER JOIN BookON Student.Booknumber=Book.Booknumber;
21 Aug 2013 by thatraja
Don't delete record from employee table. Update Flag on particular employee.DELETE FROM Employee WHERE Employee_ID='EMP001'Employee-----------Employee_IDEmployee_NameActiveEmployee_Job-----------Assigned_PersonJob_IDJob_NameStatusWhen you want to delete an...
21 Aug 2013 by OriginalGriff
You can't. That's the whole idea of a foreign key relationship: it enforces database integrity by not allowing "orphaned" references.Besides, you may well want to know in six months time which projects "Old Joe" worked on - because the ones you have looked at so far all have the same fault,...
8 Nov 2013 by C For Code!!!
In you main style put Float:left if it dosn't work put Float:left in each controls style attribute either by class or directly as controls are accepting styling.Hope it helps!!!
24 Nov 2013 by Kornfeld Eliyahu Peter
See this in your SP...(select CategoryId from [dbo].[CategoryIdArray])You can not select from a type you probably ment this(select CategoryId from @dt)
2 Apr 2014 by KasGuest
Hi!Iam using VS 2012, MS office 2013, i don't know how to solve this error in c# program? An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dllAdditional information: The Microsoft Office Access database engine cannot find the input table or query...
8 Apr 2014 by Er. Puneet Goel
hi Akhil:Check this page, here is very simple and straight Crystal report with Stored ProcedureStored Proc In Crystal Report[^]
29 Jul 2015 by Mr Ellipse
When possible, try to link objects in EF to each other by setting Navigation properties. After all, EF is an Object Relationship Mapper :)In order to check if a 'related' entity exists already in the database context (to maintain relationship integrity), you are going to have to do some...
10 Sep 2015 by Uttam katariya
As per maciaji think use left join instead of inner joinUPDATE t1 SET t1.Reporting_manager_id = t2.EidFROM Employee AS t1 LEFT JOIN Employee AS t2 ON t1.Employee_name = t2.Reporting_managerbecause in employee table some record manager has null so it's not including in result...
5 Nov 2015 by Suvendu Shekhar Giri
If it is SQL Server, you can use RANK() to do your job.Try something like-SELECT [NAME],IDENTIFIER,TOTALFROM( SELECT [NAME],IDENTIFIER,TOTAL,RANK() OVER (PARTITION BY IDENTIFIER ORDER BY TOTAL) AS SlNo FROM YourTable) AS TWHERE SlNo=1EXAMPLE:SELECT...
15 Nov 2015 by JatinKhimani
I want to implement Backup and Restore functionality for the user where they can take Backup of Certain data from the certain table and then they can restore it. I am working in desktop application in vb.net. Give you a scenario I have One Company Table in that Company id is primary Key ...
23 Mar 2016 by Matt T Heffron
If I understand your problem, it is how to store the "passage" that precedes a group of questions.If so, the way I'd do it would be to have an additional Passage table with Id (integer) and Text (varchar) columns; and have an additional column in the Question table that is the foreign key to...
23 Mar 2016 by CHill60
Responding to your comment to Solution 1 - If I was doing this I would probably have three tables, namely* passage* answer* questionThat way I can re-use (incorrect) answers for some of the question options - so I am only storing the text once. Every table should have its own Id column...
9 May 2016 by Kornfeld Eliyahu Peter
I assume you are asking about running an ALTER TABLE [] ADD/DORP/ALTER COLUMN [] query, and not about Management Studio...There are several steps in such query and a lot of depends on, what the column is, and what the state of the current table is (I mean, does the column part of an index, how...
30 Jun 2016 by Karthik_Mahalingam
try this function calculate() { var x1 = document.getElementById('a.qty').value; var x2 = document.getElementById('rate').value; var x3 = document.getElementById('amt1').value; var x4 = x1 * x2; amt1.value =...
5 Apr 2017 by OriginalGriff
Why? To be honest, you are making life deliberately difficult for yourself, and involving processes that will do very little more than introduce errors. A jpeg image contains no text - plus it's a "lossy" compression format - so if you convert a dataset to a jpeg, you then need to use OCR to...
17 Apr 2017 by User 4180254
You can use of RowDataBound event to iterate with data rows to check your empty value and make that row hide per below. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { //Use your column value...
25 Apr 2017 by CHill60
To generate a sequence see Generating a Sequence in SQL[^] For the first column [Book No] use an identity column:CREATE TABLE Book ( [Book No] int identity(1,1), [Receipt No] varchar(9) ) For the second column use the means of generating a sequence, format it (this is poor practice by the...
20 Oct 2017 by Patrice T
Already 92 questions and you still don't the basics of debugging da2 = new OleDbDataAdapter(@"SELECT column2," + "Sum(MediumVal) As [Dine In] " + "Sum(LargeVal) As [Deliery], " + "Sum(RoyalVal) As [Take Away], " + "From ( " + "SELECT " + "column2 As [column2]" + ",Switch(column3 like 'DineIn%',...
11 Dec 2017 by kastriotcunaku
Go to Appearance > Customize and add some custom CSS: th, td { border-right: 1px solid #eeeeef; } th:last-child, td:last-child { border-right: none; } Now it should show borders between columns.
29 Jan 2018 by CPallini
If you need just a single row, why don't you use LIMIT 1 in your query? By the way, your query looks correct, however you failed to report here the exact error message as well the table structure.
29 Apr 2018 by Wendelius
A simple way would be to use INSERT INTO...SELECT FROM query to copy the relevant data from database A to database B. After a successful copy, just delete the source rows. In order to avoid identity problems use SET IDENTITY_INSERT (Transact-SQL) | Microsoft Docs[^] Also you probably need to...
21 Jun 2018 by OriginalGriff
That isn't a question we can answer: there are no "standard laboratory equipment" fields for any database. You have been set a task, and it's your job to work out what information you need to store - we can't help with that because we have no idea what information you have available about your...
2 Aug 2018 by Jochen Arndt
What you are looking for is the SQL DISTINCT keyword which returns only distinct (different) values. Also your SQL command is much too complicated (contains redundant information). As far as I understand, you want to query the single table 'union' for a single field. Then the general syntax...
20 Oct 2018 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which...
30 Oct 2018 by CHill60
You are getting the error on the line UPDATE @Statement SET INTAKEM = A.INTAKEM, INTAKEY = A.INTAKEY FROM [dbo].[AD_StudentRecord] A WHERE @Statement.SID = A.SID If you want to update a table (actual table, table variable or temporary table) with values from one or more other tables, then you...
20 Feb 2020 by TheRealSteveJudge
You can achieve this by adding some javascript between the head tags. var counter = 0; document.addEventListener('click', function mark (e) { if(counter === 6){ alert("Maximum reached."); return; ...
27 Jul 2020 by Richard MacCutchan
you have still not explained your problem. however, maybe this is what you need to look at: HTML select tag[^].
28 Jul 2020 by Paramu1973
Thank Richard, I found the following codes gave me the solutions for Dynamic Select Options. Code ...
4 Mar 2021 by Richard MacCutchan
Structure types - C# reference | Microsoft Docs[^]. Arrays - C# Programming Guide | Microsoft Docs[^]. So once you have defined your struct and its members you can create the individual instances of it. And each instance you create needs to be...
4 Mar 2021 by OriginalGriff
Using an array of struct items is exactly the same as using an array of class items, with a few exceptions. You declare it the same way: myStruct[] array = new myStruct[10]; But because all struct items are value types rather than reference...
16 Dec 2010 by AleXX Zero
Hi, I have to create a table using javascript. Firefox displays the expected result but for IE, the column width is screwed .I have to use the col tag to set width because sometimes the first row maybe merged. All I need is to create a table that strictly displays according to the inputted...
31 Dec 2010 by AnupKumarYadav
Try Changing lightgray To gray in style.borderTop = "1px solid gray"; style.borderLeft="1px solid gray";
31 Jan 2011 by AschB
Hello,I would like to know if someone knows an (fairly) easy way to create and print documents in Java. These documents must contain multiple tables/images/etc. I've allready tried to print tables using the print method of the JTable, but I find it verry difficult to extend this class so...
1 Feb 2011 by Yusuf
What have you done so far? Don't expect people will do the work for you.In another hand, you will find a lot of help and support, if you demonstrate your work and clearly ask question wherever you are stuck.
10 Feb 2011 by nairnishitha
I have created a dataset for my table tbl_Cust.In code created a tableadapter object adapter n a typed datatable custtb.then i have inserted 2 rows, updated 2 rows and deleted 2 rows in my datatable custdb thru code.then i called adapter.Update(custtb) to update same in my DB....
10 Feb 2011 by Vipin Kumar Mallaya G
Der Friend If there is any relation ship then it may cause problem(hope you know).If you are using stored procedure to perform operation then check the stored procedure so that the comparison is correct or notregards Vipin Kumar
14 Feb 2011 by nairnishitha
Thanks Vipin,But Im using direct SQL command, not a SP. Also there is no relationship as my dataset stands for a single table.Nishitha
14 Feb 2011 by Ramalinga Koushik
Hope this[^] might give you an idea.
22 Feb 2011 by Bil2y
Hello! :) For my application I will have one XML file which will contain multiple tables inside. It will be for application support. Inside will be different data and settings. I didn't need XML for something similar yet and I'm not sure how to format/design this XML structure.I created...
22 Feb 2011 by Sandeep Mewara
To me, Design 1 from clean, understandable, maintainable and easier to parse.
22 Feb 2011 by Henry Minute
Design your tables in SqlServer. Write a small application to load them into a DataSet and then use the DataSet.WriteXML()[^] method to create your XML file.
15 Mar 2011 by dingoishere
How do I compare two database of sql server?I want compare schema and data , table ,view ,Trigger, Procedure
16 Mar 2011 by Manas Bhardwaj
Wiki has a comprehensive list [^]for this.
24 Mar 2011 by Henry Minute
You need to write a query against your item_code/item_description table to retrieve the description for any item_code that is passed to it. Queries like this are called Parameterized QueriesYou can read about them:here[^]andhere[^]and in lots of other places, if you can come up with...
8 Apr 2011 by Juan-ITSM
What is a dynamic field in SQL, and when does it become in a dynamic table? Could someone help me?I was looking for information but I can't find examples and I was practicing but I want to learn how to do a little more.Thanks.
8 Apr 2011 by Mahendra.p25
Try this LinkClick [^]
10 Apr 2011 by anilkumar1986
I hope that Your Using Primary key once u delete the primary key and try.And while debugging the application please close the msacess database.
11 Apr 2011 by Wendelius
Few options come in mind:- if (hopefully) you're using transactions, ensure that the transaction gets committed and is not rolled back.- if the MDB is included into your project, check that you're not using the file from bin/debug (or equivalent) directory. If you use the file from there, it...
17 Apr 2011 by Sergey Alexandrovich Kryukov
To execute anything, you need to write a program.This is your turn: do it.If you face any problem, ask a Question, but don't forget to explain what you were trying to achieve and what was your ultimate goal.This is how CodeProject works, not the other way around.—SA
17 Apr 2011 by Sandeep Mewara
It does not work like this here. I am sorry but there is no quick question here. This sounds like your college project, you should put some effort.We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here. I see...
4 May 2011 by novice51
Does anyone here knows how to export Database Table to a CSV file in VC++?-if Possible SQLite DB table to CSV file.I've searched over the net but to no avail.-It could be a library or just a simple class but it should be free...please help.any help would be much appreciated.. Thanks in...