Search Results

Search found 12215 results on 489 pages for 'identity column'.

Page 133/489 | < Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >

  • CSS fixed div. Avoid unwanted overlapping

    - by Justa Randomone
    I've got a CSS layout made of 2 columns. the navigation column to the left is a fix div. It stays there while scrolling down the main content in the column to the right. The problem comes when I reduce the browser window, or zoom in: when scrolling the browser windom horizontally, the main content on the right starts overlapping the navigation column on the left. How can I fix it so that whatever the size of my browser window or my zoom level is, when i scroll horizontally the fixed div isn't overlapped but pushes the main column to the right? You can see it for real at: http://justarandomone.tumblr.com/ All the code is in the source (It is pretty messy, sorry for that). Hope some one can help. Thanks!

    Read the article

  • SQL Select between two fields depending on the value of one field

    - by Filip
    Hi. I am using a PostgreSQL database, and in a table representing some measurements I've two columns: measurement, and interpolated. In the first I've the observation (measurement), and b is the interpolated value depending on nearby values. Every record with an original value has also an interpolated value. However, there are a lot of records without "original" observations (NULL), hence the values are interpolated and stored in the second column. So basically there are just two cases in the database: Value Value NULL Value Of course, it is preferable to use the value from the first column if available, hence I need to build a query to select the data from the first column, and if not available (NULL), then the database returns the value from the second column for the record in question. I have no idea how to build the SQL query. Please help. Thanks.

    Read the article

  • Is it possible to pass Calendar new date in the bean without listener?

    - by isabsent
    I am trying to pass new date from PrimeFaces p:calendar (placed in p:dataTable column) to the backing bean: <p:column > <p:calendar value="#{bean.date}">` <p:ajax /> </p:calendar> </p:column> It does not update bean.date. Variants with <p:ajax update="@this" event="change"/> <p:ajax update="@this" event="select"/> do not update bean.date too. The only way I have found is using of listener. However, I suppose, there should be a way without listener implementation like for simple facelets: <p:column> <h:inputText value="#{bean.note}" > <f:ajax/> </h:inputText> </p:column> that works fine for me. Does anybody know how to get it working!?

    Read the article

  • Add Unique Key For Nullable Columns - SQL Server

    - by Ruby
    I'm using sql server 2008 R2 and would like to apply unique key constraint to nullable columns. This code works good, but if I have multiple columns to add this rule to, it would generate as many 'nullbuster' columns. ALTER TABLE tblBranch ADD nullbuster AS (CASE WHEN column1 IS NULL THEN BranchID ELSE NULL END); CREATE UNIQUE INDEX UK_Column1 ON tblBranch(column1,nullbuster); tblBranch is the table name, nullbuster would be the new column name, BranchId is the Primary key column of the target table, and Column1 is the column name of the target column. Is there any way that I could achieve the goal without generating new columns.

    Read the article

  • Is it possible to specify the name of the Index property to use for lists in a fluent nhibernate con

    - by Teevus
    When mapping a HasMany or HasManyToMany in fluent nhibernate, you can specify the column name to use for the list as a parameter to the AsList() method as follows: HasMany(c => c.Customers) .AsList(c => c.Column("PositionIndex")); I would prefer to be able to set this using a Fluent NHibernate convention (either a pre-existing one, or a custom one), especially since the default name appears to be "Index" which is a reserved word in MSSQL. I've tried using a custom convention implementing IHasManyConvention, but the instance parameter does not seem to contain the information about whether its a list, a bag, or a set, and also does not contain the column details for the index column. public void Apply(IOneToManyCollectionInstance instance) { } Any ideas?

    Read the article

  • copy rows with special condition

    - by pooria_googooli
    I have a table with a lot of columns. For example I have a table with these columns : ID,Fname,Lname,Tel,Mob,Email,Job,Code,Company,...... ID column is auto number column. I want to copy all rows in this table to this table and change the company column value to 12 in this copied row. I don't want to write name all of the columns because I have a lot of table with a lot of columns. I tried this code but I had this error : declare @c int; declare @i int; select * into CmDet from CmDet; select @C= count(id) from CmDet; while @i < @C begin UPDATE CmDet SET company =12 WHERE company=11 set @i += 1 end error : Msg 2714, Level 16, State 6, Line 3 There is already an object named 'CmDet' in the database. I changed the code to this declare @c int declare @i int insert into CmDet select * from CmDet; select @C= count(id) from CmDet; while @i < @C begin UPDATE CmDet SET company =12 WHERE company=11 set @i += 1 end and I had this error : Msg 8101, Level 16, State 1, Line 3 An explicit value for the identity column in table 'CmDet' can only be specified when a column list is used and IDENTITY_INSERT is ON. What should I do ?

    Read the article

  • VIM: Columnvise Increment inside and outside?

    - by hhh
    By outside, I want solutions that does not use Vim's scripting hacks but try to reuse certain basic *ix tools. Inside Vim stuff asks for solutions to get the column-increment with inside stuff such as scripting. 1 1 1 2 1 3 1 ---> 4 1 5 1 6 . . . . Vim has a script that does column-vise icrementing here. It has gathered about 50/50 ups and down, perhaps tasting a bit reinventing-the-wheel. How do you column-increment stuff in Vim without using such script? Then the other question is, how do you column-increment stuff without/outside Vim? Most elegant, reusable and preferrably-small wins the race!

    Read the article

  • doctrine default values and relations

    - by Skirmantas
    Concept: Lets say we have table Properties with columns id and name (lets say with some predefined values: "Good" "Better" "Best"). Another table Users has column property_id with many to one relation on Properties (property_id = id). Users has default value on property_id, lets say 1 which means "Good". We might have another table analogue to Users however with default property, lets say "Better". What I need is ability to change default value for Users or other tables in administrator's panel. In mysql I can set default value for column like this: ALTER TABLE <Table> CHANGE <Column> DEFAULT <NEW_DEFAULT_VALUE> I can retrieve default value: SELECT DEFAULT(<Column>) FROM <Table> LIMIT 1 Is it possible to achieve this concept with Doctrine? What I actually need is such method in my table class: class UserTable extend Doctrine_Table { /* ... */ getDefaultProperty() { } setDefaultProperty($value) { /* $value can be either integer or Doctrine_Record */ } }

    Read the article

  • how to use database name as a value

    - by user316833
    I have more than 1000 access databases with the same table names.Each database has a unique name. In each database, I want to add column to one existing table and populate that new column (all rows in the table would be the same) with the database name. I found the example below - How can I alter this to give the new column the name of the database. ALTER TABLE TestTable ADD NewColumn INT; UPDATE TestTable SET NewColumn = 0;

    Read the article

  • how to make the two class fields(not referring any other table) as composite key in hibernate?

    - by M Sach
    i want to make pgId and pgName both as composite key where both pgId anf pgName are assgined values. i am not sure how should i go about it? on net i get examples where composite key column refering to column of some other table but not this kind of scenario? @Entity @Table(name = "PersonDetails") public class PersonDetailsData implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic private int pgId; @Basic(optional = true) @Column(nullable = true) private int orgId; @Basic(optional = true) @Column(nullable = true) private String pgName; public PersonWikiDetailsData() { } public int getPpId() { return ppId; } public void setPpId(int ppId) { this.ppId = ppId; } public String getSpaceName() { return spaceName; } public void setSpaceName(String spaceName) { this.spaceName = spaceName; } }

    Read the article

  • Sqlalchemy: Many to Many relationship error

    - by 1001010101
    Dear everyone, I am following the Many to many relationship described on http://www.sqlalchemy.org/docs/mappers.html#many-to-many #This is actually a VIEW tb_mapping_uGroups_uProducts = Table( 'mapping_uGroups_uProducts', metadata, Column('upID', Integer, ForeignKey('uProductsInfo.upID')), Column('ugID', Integer, ForeignKey('uGroupsInfo.ugID')) ) tb_uProducts = Table( 'uProductsInfo', metadata, Column('upID', Integer, primary_key=True) ) mapper( UnifiedProduct, tb_uProducts) tb_uGroupsInfo = Table( 'uGroupsInfo', metadata, Column('ugID', Integer, primary_key=True) ) mapper( UnifiedGroup, tb_uGroupsInfo, properties={ 'unifiedProducts': relation(UnifiedProduct, secondary=tb_mapping_uGroups_uProducts, backref="unifiedGroups") }) where the relationship between uProduct and uGroup are N:M. When I run the following sess.query(UnifiedProduct).join(UnifiedGroup).distinct()[:10] I am getting the error: sqlalchemy.exc.ArgumentError: Can't find any foreign key relationships between 'uProductsInfo' and 'uGroupsInfo' What am I doing wrong?

    Read the article

  • Want to avoid the particular rows from select join query... See description

    - by OM The Eternity
    I have a Select Left Join Query whis displays me the rows for the latest changedone(its a time) column name ("field" should not be equal) column name ("trackid" should not be equal), and column name "Operation should be "UPDATE" ", below is the query I am talking about... SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL Now here I don't want a row to be displayed with a two particular column's value i.e. "field's value" the value is "LastvisitDate" and "hits" Now if if append the condition in the above query that " AND j1.field != 'lastvistDate' AND j1.field != 'hits' " theni do not get any result... The table structure is jos_audittrail: id trackid operation oldvalue newvalue table_name live changedone(its a time) I hope i have given the details properly If u still find something missing I will try to provide it more better way... Pls help me to avoid those two rows with those to mentioned value of "field"

    Read the article

  • Convert Object Hierachey to Object Array

    - by Killercam
    All, I want to create an object array foo[], where the constructor for Foo is public Foo(string name, string discription){} I have a database object which has a structure (not incuding stored procedures, functions or views for simplicity) like public class Database { public string name { get; set; } public string filename { get; set; } public List<Table> tables { get; set; } public Database(string name, string filename) { this.name = name; this.filename = filename; } } protected internal class Table { public string name { get; set; } public List<Column> columns { get; set;} public Table(string name, List<Column> columns) { this.name = name; this.columns = columns; } } protected internal class Column { public string name { get; set; } public string type { get; set; } public Column(string name, string type, int maxLength, bool isNullable) { this.name = name; this.type = type; } } I would like to know the quickest way to add Column and Table information to the Foo[] object array? Clearly I can do List<Foo> fooList = new List<Foo>(); foreach (Table t in database.tables) { fooList.Add(new Foo(t.Name, "Some Description")); foreach (Column c in t.columns) fooList.Add(new Foo(c.Name, "Some Description")); } Foo[] fooArr = fooList.ToArray<Foo>(); But is there a quicker way? Clearly LINQ is likely to be slower for a query that does a simalar operation, but I care allot about speed here so any advice would be appreciated. Perhaps the use of a HashSet would be the way to go as there will not be duplicate entries... Thanks for your time.

    Read the article

  • Hibernate-Search: Search records from the last x hours, x days, x months, x years?

    - by Aaron
    @Entity @Table(name = "USERS") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "USERNAME", nullable = false, length = 20) private String userName; @Column(name = "PASSWORD", nullable = false, length = 10) private String password; @Column(name = "Date", nullable = false ) private Date date; } How can I select the records which have the date between [now | now-x hours] [now | now-x days] [now | now-x months] [now | now-x years]

    Read the article

  • Excel macro, to copy and paste a cell value based on another cell value?

    - by Keziah Dorman
    Hi I shall try to explain clearly what I need to be able to do, here goes: I have an Excel spread sheet 1 with postcodes in column a and a number in column b. I need to create a macro/formula so that it will see the number (i.e 4) and copy and paste the postcode that number of times into sheet 2 column a underneath each other. I need to do this for the next row down etc until it comes to a blank. Sheet 1 A,B DE43PP,3 DE43PQ,8 Sheet 2 A,B DE43PP, DE43PP, DE43PP, Thanks

    Read the article

  • mysql with 3 group by and sum

    - by cyberfly
    Hi all I have this data in my table (tb_cash_transaction) I want to group the TYPE column, CURRENCY_ID column and AMOUNT column so it will become like below: **Currency** **Cash IN** **Cash OUT** **Balance** 14 40000 30000 10000 15 50000 40000 10000 Rule : 1.Group by currency 2.Then find the sum of cash in for that currency 3.Find the sum of cash out for that currency 4.Get the balance (sum cash in - sum cash out) How to achieve it using mysql? I try using group by but cannot get the desired output. Thanks in advance

    Read the article

  • Modify url in browser using javascript?

    - by user246114
    Hi, Is it possible to change the url in the user's browser without actually loading a page, using javascript? I don't think it is (could lead to unwanted behavior), I'm in a situation where this would be convenient though: I have a web app which displays reports generated by users. Layout roughly looks like: ----------------------------------------------------------- Column 1 | Column 2 ----------------------------------------------------------- Report A | Report B | Currently selected report contents here. Report C | right now the user would be looking at a url like: www.mysite.com/user123 To see the above page. When the user clicks the report names in column 1, I load the contents of that report in column 2 using ajax. This is convenient for the user, but the url in their browser remains unchanged. The users want to copy the url for a report to share with friends, so I suppose I could provide a button to generate a url for them, but it would just be more convenient for them to have it already as the url in their browser, something like: www.mysite.com/user123/reportb the alternate is to not load the contents of the report in column 2 using ajax, but rather a full page refresh. This would at least have a linkable url ready for the user in their url bar, but not as convenient as using ajax. Thanks

    Read the article

  • PHP --> MSSQL + Excel file upload from a specific row

    - by lucky
    Hello, I have a requirement in which, i need to upload an excel file into MSSQL database. It is working well till this point. But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed everytime. so the format of the table after upload is not as expected. It is assigning F1, F2 as column names for the table in mssql. It varies from file to file. I want to program it in such away so that the user can enter the row number and the column number from where the actual data is starting. So that while upload it should from line 3 and column 2. I dont know how to specify that row and column while uploading. Please help me to solve the same.

    Read the article

  • Hibernate not loading associated object

    - by Noor
    Hi, i am trying to load a hibernate object ForumMessage but in it contain another object Users and the Users object is not being loaded. My ForumMessage Mapping File: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Jan 4, 2011 10:10:29 AM by Hibernate Tools 3.4.0.Beta1 --> <hibernate-mapping> <class name="com.BiddingSystem.Models.ForumMessage" table="FORUMMESSAGE"> <id name="ForumMessageId" type="long"> <column name="FORUMMESSAGEID" /> <generator class="native" /> </id> <property name="ForumMessage" type="java.lang.String"> <column name="FORUMMESSAGE" /> </property> <many-to-one name="User" class="com.BiddingSystem.Models.Users" fetch="join"> <column name="UserId" /> </many-to-one> <property name="DatePosted" type="java.util.Date"> <column name="DATEPOSTED" /> </property> <many-to-one name="Topic" class="com.BiddingSystem.Models.ForumTopic" fetch="join"> <column name="TopicId" /> </many-to-one> </class> </hibernate-mapping> and I am using the follwing code: Session session = gileadHibernateUtil.getSessionFactory().openSession(); SQL="from ForumMessage"; System.out.println(SQL); Query query=session.createQuery(SQL); System.out.println(query.list().size()); return new LinkedList <ForumMessage>(query.list());

    Read the article

  • Check for existing mapping when writing a custom applier in ConfORM

    - by Philip Fourie
    I am writing my first custom column name applier for ConfORM. How do I check if another column has already been map with same mapping name? This is what I have so far: public class MyColumnNameApplier : IPatternApplier<PropertyPath, IPropertyMapper> { public bool Match(PropertyPath subject) { return (subject.LocalMember != null); } public void Apply(PropertyPath subject, IPropertyMapper applyTo) { string shortColumnName = ToOracleName(subject); // How do I check if the short columnName already exist? applyTo.Column(cm => cm.Name(shortColumnName)); } private string ToOracleName(PropertyPath subject) { ... } } } I need to shorten my class property names to less than 30 characters to fit in with Oracle's 30 character limit. Because I am shortening the column names it is possible that I generate the same name for two different properties. I would like to know when a duplicate mapping occurs. If I don't handle this scenario ConfORM/NHibernate allows two different properties to 'share' the same column name - this is obviously creates a problem for me.

    Read the article

  • DataGridView - DefaultCellStyle, rows and columns propriority

    - by angelPL
    Hi! In C#, in DataGridView I want to set the BackColor property for the first row and first column. And the cell from first row and first column, should have property from first column, not row - but it does. For example: (table 3 x 3); 'X' - property for first row, 'Y' - property for first column, 'a' - default property should be: Y X X Y a a Y a a but is: X X X Y a a Y a a There is no matter which property I set first: dataGridView1.Rows[0].DefaultCellStyle.BackColor = Color.Lavender; dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.Beige; or: dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.Beige; dataGridView1.Rows[0].DefaultCellStyle.BackColor = Color.Lavender; Sorry for my english...

    Read the article

  • MATLAB: comparing 2 columns content

    - by Patrick
    hi, I need to compare the content of 2 tables, more exactly 2 columns (1 column per table) in Matlab to see, for each element of the firsts column, there is an equal element in the second column. Should I use a for loop or is there any MATLAB function doing this ? thanks

    Read the article

  • PHP --> SQL Server + Excel file upload from a specific row

    - by lucky
    I have a requirement in which, i need to upload an excel file into SQL Server database. It is working well till this point. But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed every time. so the format of the table after upload is not as expected. It is assigning F1, F2 as column names for the table in SQL Server. It varies from file to file. I want to program it in such away so that the user can enter the row number and the column number from where the actual data is starting. So that while upload it should from line 3 and column 2. I don't know how to specify that row and column while uploading. Please help me to solve the same.

    Read the article

< Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >