Search Results

Search found 26283 results on 1052 pages for 'temporary table'.

Page 54/1052 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • SQL Query to truncate table in IBM DB2

    - by Cshah
    Hi, Can any one give me the syntax to truncate a table in IBM DB2. I m running the following command: truncate table tableName immediate; The eror is DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=table;truncate ;JOIN , DRIVER=3.50.152 Message: An unexpected token "table" was found following "truncate ". Expected tokens may include: "JOIN ".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.50.152 The syntax matches the one specified in the reference docs of IBM : http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_sql_truncate.htm

    Read the article

  • How to assert on number of html table rows in ruby using capybara + cucumber

    - by Neil
    I am trying to get to grips with BDD web development in Ruby using cucumber + capybara and I am stuck at what should be an easy task - just to check the number of rows in a table. Something along the lines of: page.should have_xpath("//table[@id='myTable']") find("//table[@id='myTable']/tr").length.should = 3 But this doesn't work and I can't find a way to assert against the table length. Any ideas anyone (please be easy on me tho' I'm a ruby nooby) Thanks in advance Neil

    Read the article

  • union on the same table

    - by StupidDeveloper
    I have a table: ID | Id1 | Id2 1 | 100 | 12 2 | 196 | 140 3 | 196 | 141 4 | 150 | 140 5 | 150 | 199 I want to write a query that will give me a table containing records with the same ID2 and with id1 equal to 196 or 150. I thought about union: select * from table where itemId = 196 union select * from table where itemId = 150 but that doesn't cover the ID2 requirement. How should I do that?

    Read the article

  • C# On Quit WebPage Delete Files and Folders on Server with no user action

    - by user325558
    Hi, I have some problems to delete temporary folder and files on my server when users not finish some action in webpages and quit to other webpages. Initialy at Page Load folders are created to allow the user to load files.I have tried implementing destruction during Idisposable without success. Could someone point the best method to delete folders and files when user quit the page with no action or cancel button. Thanks.

    Read the article

  • How to solve this problem in Vaadin Table?

    - by Kumar
    Hi Friends, I used Vaadin Table component in my application and i set a page length to 15, Length of the Table is not consistent in different screens resolutions . For example in 1440 x 900 resolution height of the table is big but in 1280 x 1024 resolution the height of the table is less . I don't know how to solve this problem.Can any one help me to sort out this problem. Thanks in advance.

    Read the article

  • SQL Reset Identity ID in already populated table

    - by rockinthesixstring
    hey all. I have a table in my DB that has about a thousand records in it. I would like to reset the identity column so that all of the ID's are sequential again. I was looking at this but I'm ASSuming that it only works on an empty table Current Table ID | Name 1 Joe 2 Phil 5 Jan 88 Rob Desired Table ID | Name 1 Joe 2 Phil 3 Jan 4 Rob Thanks in advance

    Read the article

  • jQuery, get table cell at specific index

    - by Jarek Waliszko
    Hello, I know that I can get first or last table cell (ex for last row) using jquery expression like below: first cell: $('#table tr:last td:first') or last cell: $('#table tr:last td:last') Can I get cell at specific index, for example index 2, using similliar expression: ex: $('#table tr:last td:[2]')... Regards.

    Read the article

  • Change MS Access to Exclusive on the fly

    - by Nate
    I have a process in an MS Acess database that the users will usually run once daily, but could be more or less. It takes several minutes and requires temporary exclusive access because it deletes and recreates the main table. I have code to check to see if there are other users in the db before the process starts, but is there a way to change the access to "exclusive" at the beginning, and then change it back to open access at the end? Thanks for any help.

    Read the article

  • How to Update the primary key of table which is referenced as foreign key in another table?

    - by Mobin
    Suppose a Table "Person" having columns "SSN","Name","Address" and another Table "Contacts" having "Contact_ID","Contact_Type","SSN"(primary key of Person) similarly Table "Records" having "Record_ID","Record_Type","SSN"(primary key of Person) Now i want that when i change or update SSN in person table that accordingly changes in other 2 tables. If anyone can help me with a trigger for that Or how to pass foreign key constraints for tables

    Read the article

  • Undo Table Updates

    - by sikas
    I updated a table in my MS SQL Server 2008 by accident, I was updating a table from another by copying cell by cell, but I have overwritten the original table. Is there a way that I can restore my table contents as it was?

    Read the article

  • wicket: how to add table background image

    - by vivmal
    Hi All Can anyone please tell me how to add table background image in wicket. Actually I've tried a lot like <table background="images/logo.jpg"> also <style>table {background-image: url('images/logo.jpg')}</style> also <table style="background-image: url('images/logo.jpg')"> But nothing works. Please help. Thanks in advance.

    Read the article

  • MySQL Optimization 20 gig table

    - by user169743
    I have a 20 gig table that has a large amount of inserts and updates daily. This table is also frequently searched. I'd like to know if the MySQL indices can become fragmented and perhaps need to be rebuilt or something similar. I'm finding it difficult to figure out which of the CHECK TABLE, REPAIR TABLE or something similar? Any guidance appreciated, I'm a db newb.

    Read the article

  • Sorting Dynamically generated HTML Table

    - by Mahesh Varia
    I am generating a dynamic HTML table string and displaying inside a div. I am assigning ID and runat server in that string. eg. string s="<table id='tblAll' runat='server'></table>". This string is generated on some different page, and its passed as XmlhttpResponseText I want to apply sorting on this table, It would be great if any one can help me out. Thanks

    Read the article

  • How to apply Containstable 4 two join table?

    - by jaykanth
    product table pid modelnumber 1 a 2 b 3 c ProductTransation pid name description... 1 ball ball 2 bat cricket bat i create fullText for Modelnumber in product table. " for name & Description in productTrasaction table. Now i want to join this table if i search through modelnumber or name result should be pid name modelnumber 1 ball a

    Read the article

  • How do I create a table in SQLite using the VS2008 Server Explorer

    - by fishhead
    Hello, I would like to create a table in a SQLite database using the Server Explorer in VS2008. I am able to do other operations on the database but when it comes to creating a table using the query builder I get Not Supported messages. is there another way other than writing code just for the sole purpose of creating the table? CREATE TABLE myTable ( ID INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR(100) ) .NET Framework Data Provider for SQLite 3.6.16

    Read the article

  • Script to create a table and fields in SQL wont work

    - by Jacksta
    Warning this is lenghty! attack if you knowledagble. well at least more then a newb beginner like me. This script uses three files as detailed below. It is suppoed to create the database and fields from the form input. It gets to the end and shows my_contacts has been created!. But when i go into phpMyadmin the table has not been created. I have a file named show_createtable.html which is used to create a table in MySQL <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <h1>Step 1: Name and Number</h1> <form method="post" action="do_showfielddef.php" /> <p><strong>Table Name:</strong><br /> <input type="text" name="table_name" size="30" /></p> <p><strong>Number of fields:</strong><br /> <input type="text" name="num_fields" size="30" /></p> <p><input type="submit" name="submit" value="go to step2" /></p> </form> </body> </html> This Form Posts to do_showfielddef.php <?php //validate important input if ((!$_POST[table_name]) || (!$_POST[num_fields])) { header( "location: show_createtable.html"); exit; } //begin creating form for display $form_block = " <form action=\"do_createtable.php\" method=\"post\"> <input name=\"table_name\" type=\"hidden\" value=\"$_POST[table_name]\"> <table cellspacing=\"5\" cellpadding=\"5\"> <tr> <th>Field Name</th><th>Field Type</th><th>Table Length</th><th>Primary Key?</th><th>Auto-Increment?</th> </tr>"; //count from 0 until you reach the number fo fields for ($i = 0; $i <$_POST[num_fields]; $i++) { $form_block .=" <tr> <td align=center><input type=\"texr\" name=\"field name[]\" size=\"30\"></td> <td align=center> <select name=\"field_type[]\"> <option value=\"char\">char</option> <option value=\"date\">date</option> <option value=\"float\">float</option> <option value=\"int\">int</option> <option value=\"text\">text</option> <option value=\"varchar\">varchar</option> </select> </td> <td align=center><input type=\"text\" name=\"field_length[]\" size=\"5\"></td> <td aligh=center><input type=\"checkbox\" name=\"primary[]\" value=\"Y\"></td> <td aligh=center><input type=\"checkbox\" name=\"auto_increment[]\" value=\"Y\"></td> </tr>"; } //finish up the form $form_block .= " <tr> <td align=center colspan=3><input type =\"submit\" value=\"create table\"> </td> </tr> </table> </form>"; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Create a database table: Step 2</title> </head> <body> <h1>defnie fields for <? echo "$_POST[table_name]"; ?> </h1> <? echo "$form_block"; ?> </body> </html> Which in turn creates the table and fields with this file do_showfielddef.php //connect to database $connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); //start creating the SQL statement $sql = "CREATE TABLE $_POST[table_name]("; //continue the SQL statement for each new field for ($i = 0; $i < count($_POST[field_name]); $i++) { $sql .= $_POST[field_name][$i]." ".$_POST[field_type][$i]; if ($_POST[auto_increment][$i] =="Y") { $additional = "NOT NULL auto_increment"; } else { $additional = ""; } if ($_POST[primary][$i] =="Y") { $additional .= ", primary key (".$_POST[field_name][$i].")"; } else { $additional = ""; } if ($_POST[field_length][$i] !="") { $sql .= " (".$_POST[field_length][$i].") $additional ,"; } else { $sql .=" $additional ,"; } } //clean up the end of the string $sql = substr($sql, 0, -1); $sql .= ")"; //execute the query $result = mysql_query($sql, $connection) or die(mysql_error()); //get a giid message for display upon success if ($result) { $msg = "<p>" .$_POST[table_name]." has been created!</p>"; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Create A Database Table: Step 3</title> </head> <body> <h1>Adding table to <? echo "$db_name"; ?>...</h1> <? echo "$msg"; ?> </body> </html>

    Read the article

  • import data from another table with same id

    - by Luca Romagnoli
    Hi, i have 2 table User (id, name, surname,cod) UserNew (uid, uname, usurname, ucod) The first table has data the second no. I have to copy the data of the User table in the UserNew table. I've tried with a insert query but uid (primary key) value changes. How can i do to mantaince the same values? thanks

    Read the article

  • Getting field of type bytea in helper table when using GenerationType.IDENTITY

    - by dtrunk
    I'm creating my db scheme using Hibernate. There's a Table called "tbl_articles" and another one called "tbl_categories". To have a n-n relationship a helper table ("tbl_articles_categories") is needed. Here are all necessary Entities: @Entity @Table( name = "tbl_articles" ) public class Article implements Serializable { private static final long serialVersionUID = 1L; @Id @Column( nullable = false ) @GeneratedValue( strategy = GenerationType.IDENTITY ) private Integer id; // other fields... public Integer getId() { return id; } public void setId( Integer id ) { this.id = id; } // other fields... } @Entity @Table( name = "tbl_categories" ) public class Category implements Serializable { private static final long serialVersionUID = 1L; @Id @Column( nullable = false ) @GeneratedValue( strategy = GenerationType.IDENTITY ) private Integer id; // other fields public Integer getId() { return id; } public void setId( Integer id ) { this.id = id; } // other fields... } @Entity @Table( name = "tbl_articles_categories" ) @AssociationOverrides({ @AssociationOverride( name = "pk.article", joinColumns = @JoinColumn( name = "article_id" ) ), @AssociationOverride( name = "pk.category", joinColumns = @JoinColumn( name = "category_id" ) ) }) public class ArticleCategory { private ArticleCategoryPK pk = new ArticleCategoryPK(); public void setPk( ArticleCategoryPK pk ) { this.pk = pk; } @EmbeddedId public ArticleCategoryPK getPk() { return pk; } @Transient public Article getArticle() { return pk.getArticle(); } public void setArticle( Article article ) { pk.setArticle( article ); } @Transient public Category getCategory() { return pk.getCategory(); } public void setCategory( Category category ) { pk.setCategory( category ); } } @Embeddable public class ArticleCategoryPK implements Serializable { private static final long serialVersionUID = 1L; @ManyToOne @ForeignKey( name = "tbl_articles_categories_fkey_article_id" ) private Article article; @ManyToOne @ForeignKey( name = "tbl_articles_categories_fkey_category_id" ) private Category category; public ArticleCategoryPK( Article article, Category category ) { setArticle( article ); setCategory( category ); } public ArticleCategoryPK() { } public Article getArticle() { return article; } public void setArticle( Article article ) { this.article = article; } public Category getCategory() { return category; } public void setCategory( Category category ) { this.category = category; } } Now, I'm getting a serial type what I wanted in my articles table as well as in my categories table. But looking into my helper table, there aren't the expected fields article_id and category_id each of type integer - instead there are article and category of type bytea. What's wrong here? EDIT: Sorry, forgot to mention that I'm using PostgreSQL.

    Read the article

  • Resort (reorder) table data

    - by Dave Jarvis
    What is the fastest way to reorder (resort) a table? In MySQL, you can do: CREATE TABLE table2 LIKE table1; INSERT INTO table2 SELECT * FROM table1 ORDER BY by name; DROP TABLE table1; RENAME TABLE table2 TO table1; What about PostgreSQL? Is there a faster way?

    Read the article

  • unwanted space before and after nested html table using Internet Explorer 8

    - by John
    I have an html table nested in an html table cell. I want the nested table to use the full size of the cell it is nested in. When I use firefox or google chrome I get the result I want but when I use Internet Explorer 8 (even if I use td style="height="100%") the height of the nested cell depends on it's content. As a result I get whitespace before and after my nested table.

    Read the article

  • How efficient is a details table?

    - by Jeffrey Lott
    At my job, we have pseudo-standard of creating one table to hold the "standard" information for an entity, and a second table, named like 'TableNameDetails', which holds optional data elements. On average, for every row in the main table will have about 8-10 detail rows in it. My question is: What kind of performance impacts does this have over adding these details as additional nullable columns on the main table?

    Read the article

  • make VIEW of SHOW TABLE query

    - by cneeds
    Is there a way to make a VIEW of this SHOW TABLE query? SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table" When I save this as a view (using phpMyAdmin) I get #1064 - 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 'SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table"' at line 4 when phpMyAdmin tries to execute this CREATE ALGORITHM = UNDEFINED VIEW `Tables` AS SHOW FULL TABLES FROM `db_name` WHERE `Table_type` = "Base table"

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >