Search Results

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

Page 119/1052 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • Internet Sharing on Lion breaks my routing table

    - by seaders
    When in the office, I'm connected to a 192.168.1.0/24 network. When Internet Sharing is off, when I run netstat -nr the first entry shows default 192.168.1.254 UGSc 10 62 en0 If I turn Internet sharing on, it shows default link#5 UCS 2 0 en1 This is obviously incorrect and breaks all connectivity of my machine. en1 is my wireless, whereas en0 is my ethernet. If I then disable Internet Sharing, it even deletes that incorrect route, so I'm left with no default route at all. Currently I have one script that I run when I share, or after, when I disable that does route delete default route add default 192.168.1.254 That fixes everything, but I'd love to know what's actually making this happen and how to properly fix it. And just to say that at some point a few months ago, this was working absolutely perfectly, with no hitches, then one day when I brought the laptop home, I couldn't disable the internet sharing, so I couldn't connect to my home wifi. I eventually had to restart the machine and since then this problem has been happening. Any help would be greatly appreciated, thank you.

    Read the article

  • Group / User based security. Table / SQL question

    - by Brett
    Hi, I'm setting up a group / user based security system. I have 4 tables as follows: user groups group_user_mappings acl where acl is the mapping between an item_id and either a group or a user. The way I've done the acl table, I have 3 columns of note (actually 4th one as an auto-id, but that is irrelevant) col 1 item_id (item to access) col 3 user_id (user that is allowed to access) col 3 group_id (group that is allowed to access) So for example item1, peter, , item2, , group1 item3, jane, , so either the acl will give access to a user or a group. Any one line in the ACL table with either have an item - user mapping, or an item group. If I want to have a query that returns all objects a user has access to, I think I need to have a SQL query with a UNION, because I need 2 separate queries that join like.. item - acl - group - user AND item - acl - user This I guess will work OK. Is this how its normally done? Am I doing this the right way? Seems a little messy. I was thinking I could get around it by creating a single user group for each person, so I only ever deal with groups in my SQL, but this seems a little messy as well..

    Read the article

  • ActiveRecord/sqlite3 column type lost in table view?

    - by duncan
    I have the following ActiveRecord testcase that mimics my problem. I have a People table with one attribute being a date. I create a view over that table adding one column which is just that date plus 20 minutes: #!/usr/bin/env ruby %w|pp rubygems active_record irb active_support date|.each {|lib| require lib} ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => "test.db" ) ActiveRecord::Schema.define do create_table :people, :force => true do |t| t.column :name, :string t.column :born_at, :datetime end execute "create view clowns as select p.name, p.born_at, datetime(p.born_at, '+' || '20' || ' minutes') as twenty_after_born_at from people p;" end class Person < ActiveRecord::Base validates_presence_of :name end class Clown < ActiveRecord::Base end Person.create(:name => "John", :born_at => DateTime.now) pp Person.all.first.born_at.class pp Clown.all.first.born_at.class pp Clown.all.first.twenty_after_born_at.class The problem is, the output is Time Time String When I expect the new datetime attribute of the view to be also a Time or DateTime in the ruby world. Any ideas? I also tried: create view clowns as select p.name, p.born_at, CAST(datetime(p.born_at, '+' || '20' || ' minutes') as datetime) as twenty_after_born_at from people p; With the same result.

    Read the article

  • Algorithm for finding similar users through a join table

    - by Gdeglin
    I have an application where users can select a variety of interests from around 300 possible interests. Each selected interest is stored in a join table containing the columns user_id and interest_id. Typical users select around 50 interests out of the 300. I would like to build a system where users can find the top 20 users that have the most interests in common with them. Right now I am able to accomplish this using the following query: SELECT i2.user_id, count(i2.interest_id) AS count FROM interests_users as i1, interests_users as i2 WHERE i1.interest_id = i2.interest_id AND i1.user_id = 35 GROUP BY i2.user_id ORDER BY count DESC LIMIT 20; However, this query takes approximately 500 milliseconds to execute with 10,000 users and 500,000 rows in the join table. All indexes and database configuration settings have been tuned to the best of my ability. I have also tried avoiding the use of joins altogether using the following query: select user_id,count(interest_id) count from interests_users where interest_id in (13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,508) group by user_id order by count desc limit 20; But this one is even slower (~800 milliseconds). How could I best lower the time that I can gather this kind of data to below 100 milliseconds? I have considered putting this data into a graph database like Neo4j, but I am not sure if that is the easiest solution or if it would even be faster than what I am currently doing.

    Read the article

  • adding a route entry to linux routing table

    - by netg
    hi, I have two systems with ip address say 64.103.56.1(A)(Dev name -wlan0) and 64.103.225.18(B),now what i want is , everytime I ping B from my system A, it has to be routed via a router say with address 10.0.0.251(C)(I want this to be my next hop to reach B) , but this router is on a different subnetwork than the two systems.How do I do this? /* Things I tried: I used 'route add -host B gw C wlan0', and got an error saying " no such process exist or no such device found". Tried ping C and traceroute and found the gw addr at my side is some 63.103.236.3(D), so added another entry route add -host C gw D wlan0, I was able to do this without any error! */

    Read the article

  • ORDER BY column_name help (via link in HTML table view) (PHP MySQL

    - by Derek
    My output for my table in HTML has several columns such as userid, name, age, dob. The table heading is simply the title of the column name, I want this to be a link, and when clicked, the selected column is sorted in order, ASC, and then DESC (on next click). I thought this was pretty straight forward but I'm having some difficulty. So far, I have produced this, and no output is taken, apart from the URL works by displaying 'users.php?orderby=userid' <?php if(isset($_GET['orderby'])){ $orderby = $_GET['orderby']; $query_sv = "SELECT * FROM users BY ".mysql_real_escape_string($orderby)." ASC"; } //default query else{ $query_sv = "SELECT * FROM users BY user_id DESC"; } ?> <tr> <th><a href="<?php echo $_SERVER['php_SELF']."?orderby=userid";?>">User ID</a></th> Hoefully if I get this working, I can sort the users by D.O.B. next also using the same principles. Does anyone have any ideas?

    Read the article

  • Nhibernate - getting single column from other table

    - by Muhammad Akhtar
    I have following tables Employee: ID,CompanyID,Name //CompanyID is foriegn key of Company Table Company: CompanyID, Name I want to map this to the following class: public class Employee { public virtual Int ID { get; set; } public virtual Int CompanyID { get; set; } public virtual string Name { get; set; } public virtual string CompanyName { get; set; } protected Employee() { } } here is my xml class <class name="Employee" table="Employee" lazy="true"> <id name="Id" type="Int32" column="Id"> <generator class="native" /> </id> <property name="CompanyID" column="CompanyID" type="Int32" not-null="false"/> <property name="Name" column="Name" type="String" length="100" not-null="false"/> What I need to add in xml class to map CompanyName in my result? here is my code... public ArrayList getTest() { ISession session = NHibernateHelper.GetCurrentSession(); string query = "select Employee.*,(Company.Name)CompanyName from Employee inner join Employee on Employee.CompanyID = Company.CompanyID"; ArrayList document = (ArrayList)session.CreateSQLQuery(query, "Employee", typeof(Document)).List(); return document; } but in the returned result, I am getting CompanyName is null is result set and other columns are fine. Note:In DB, tables don't physical relation Please suggest my solution ------ Thanks

    Read the article

  • How can I get all content within <table></table> tags using a regex?

    - by Bob Dylan
    So I'm writing an application that will do a little screen scrapping. All the pages (about 1000 or so) contain this line: <table border="0" cellspacing="3"> <tr><td>First rows stuff</td></tr> <tr> <td> The data I want is in here <br /> and it's seperated by these annoying <br /> 's. No id's, classes, or even a single <p> tag. Just a bunch of <br /> tags. </td> </tr> </table> So I just need to get the data within the 2nd row out. How can I do this? Should I use a regex or something else?

    Read the article

  • Checking if any of a list of values falls within a table of ranges

    - by Conspicuous Compiler
    I'm looking to check whether any of a list of integers fall in a list of ranges. The ranges are defined in a table defined something like: # Extra Type Field Default Null Key 0 int(11) rangeid 0 NO PRI 1 int(11) max 0 NO MUL 2 int(11) min 0 NO MUL Using MySQL 5.1 and Perl 5.10. I can check whether a single value, say 7, is in any of the ranges with a statement like SELECT 1 FROM range WHERE 7 BETWEEN min AND max If 7 is in any of those ranges, I get a single row back. If it isn't, no rows are returned. Now I have a list of, say, 50 of these values, not stored in a table at present. I assemble them using map: my $value_list = '(' . ( join ', ', map { int $_ } @values ) . ')' ; I want to see if any of the items in the list fall inside of any of the ranges, but am not particularly concerned with which number nor which range. I'd like to use a syntax such as: SELECT 1 FROM range WHERE (1, 2, 3, 4, 5, 6, 7, 42, 309, 10000) BETWEEN min AND max MySQL kindly chastises me for such syntax: Operand should contain 1 column(s) I pinged #mysql who were quite helpful. However, having already written this up by the time they responded and thinking it'd be helpful to fix the answer in a more permanent medium, I figured I'd post the question anyhow. Maybe SO will provide a different solution?

    Read the article

  • Reverse mapping from a table to a model in SQLAlchemy

    - by Jace
    To provide an activity log in my SQLAlchemy-based app, I have a model like this: class ActivityLog(Base): __tablename__ = 'activitylog' id = Column(Integer, primary_key=True) activity_by_id = Column(Integer, ForeignKey('users.id'), nullable=False) activity_by = relation(User, primaryjoin=activity_by_id == User.id) activity_at = Column(DateTime, default=datetime.utcnow, nullable=False) activity_type = Column(SmallInteger, nullable=False) target_table = Column(Unicode(20), nullable=False) target_id = Column(Integer, nullable=False) target_title = Column(Unicode(255), nullable=False) The log contains entries for multiple tables, so I can't use ForeignKey relations. Log entries are made like this: doc = Document(name=u'mydoc', title=u'My Test Document', created_by=user, edited_by=user) session.add(doc) session.flush() # See note below log = ActivityLog(activity_by=user, activity_type=ACTIVITY_ADD, target_table=Document.__table__.name, target_id=doc.id, target_title=doc.title) session.add(log) This leaves me with three problems: I have to flush the session before my doc object gets an id. If I had used a ForeignKey column and a relation mapper, I could have simply called ActivityLog(target=doc) and let SQLAlchemy do the work. Is there any way to work around needing to flush by hand? The target_table parameter is too verbose. I suppose I could solve this with a target property setter in ActivityLog that automatically retrieves the table name and id from a given instance. Biggest of all, I'm not sure how to retrieve a model instance from the database. Given an ActivityLog instance log, calling self.session.query(log.target_table).get(log.target_id) does not work, as query() expects a model as parameter. One workaround appears to be to use polymorphism and derive all my models from a base model which ActivityLog recognises. Something like this: class Entity(Base): __tablename__ = 'entities' id = Column(Integer, primary_key=True) title = Column(Unicode(255), nullable=False) edited_at = Column(DateTime, onupdate=datetime.utcnow, nullable=False) entity_type = Column(Unicode(20), nullable=False) __mapper_args__ = {'polymorphic_on': entity_type} class Document(Entity): __tablename__ = 'documents' __mapper_args__ = {'polymorphic_identity': 'document'} body = Column(UnicodeText, nullable=False) class ActivityLog(Base): __tablename__ = 'activitylog' id = Column(Integer, primary_key=True) ... target_id = Column(Integer, ForeignKey('entities.id'), nullable=False) target = relation(Entity) If I do this, ActivityLog(...).target will give me a Document instance when it refers to a Document, but I'm not sure it's worth the overhead of having two tables for everything. Should I go ahead and do it this way?

    Read the article

  • Refresh table after using jQuery .append()

    - by Aaron Salazar
    The following code gets a JSON object and then spits its contents out into a <table>. The first time I do it I get my JSON content just fine. However, when I refresh, the refreshed data is stuck onto the bottom of my table. How do I refresh the data to show the new data only? I tried using .remove() but there was an obvious deleting and then a refresh of data. $(function() { $('#ReportedIssue').change(function() { //$('.data').remove() $.getJSON('/CurReport/GetUpdatedTableResults', function(json) { for (var i = 0; i < json.GetDocumentResults.length; i++) { $('#DocumentInfoTable').append( "<tr class='data'>" + "<td>" + json.GetDocumentResults[i].Document.DocumentId + "</td>" + "<td>" + json.GetDocumentResults[i].Document.LanguageCode + "</td>" + "<td>" + json.GetDocumentResults[i].ReportedIssue + "</td>" + "<td>" + json.GetDocumentResults[i].PageNumber + "</td>" + "</tr>" ); }; }); }); }); Thank you, Aaron

    Read the article

  • HTML form with table cell height problem

    - by Parhs
    Hello.. I have several forms like this: <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_std"> <tr id="exam_String_newValue_row"> <td width="150" class="table_defaultHeaderColumn">????a????sµ??? ??µ??</td> <td width="802" class="table_defaultHeaderColumn" > <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea> </td> </tr> <tr> <td width="150" class="table_defaultHeaderColumn">??????s? - ??????</td> <td width="802"> <input name="Exam_String_value" type="text" style="width:600px" id="textfield2" /> </td> </tr> <tr> <td width="150" class="table_defaultHeaderColumn">??????s? - ?e?d??</td> <td width="802"> <input name="Exam_String_value" type="text" style="width:600px" id="textfield2" /> </td> </tr> </table> css .table_defaultHeaderColumn { font-size: 11px; } .input_std { width: 200px; } .input_small { width: 4em; } .table_std { border-collapse:collapse; } .table_std td { padding-top: 1px; padding-bottom: 1px; } The problem is the height of the cells.... isnt equal in all browsers... any solution?

    Read the article

  • Using NULLs in matchup table

    - by TomWilsonFL
    I am working on the accounting portion of a reservation system (think limo company). In the system there are multiple objects that can either be paid or submit a payment. I am tracking all of these "transactions" in three tables called: tx, tx_cc, and tx_ch. tx generates a new tx_id (for transaction ID) and keeps the information about amount, validity, etc. Tx_cc and tx_ch keep the information about the credit card or check used, respectively, which link to other tables (credit_card and bank_account among others). This seems fairly normalized to me, no? Now here is my problem: The payment transaction can take place for a myriad of reasons. Either a reservation is being paid for, a travel agent that booked a reservation is being paid, a driver is being paid, etc. This results in multiple tables, one for each of the entities: agent_tx, driver_tx, reservation_tx, etc. They look like this: CREATE TABLE IF NOT EXISTS `driver_tx` ( `tx_id` int(10) unsigned zerofill NOT NULL, `driver_id` int(11) NOT NULL, `reservation_id` int(11) default NULL, `reservation_item_id` int(11) default NULL, PRIMARY KEY (`tx_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Now this transaction is for a driver, but could be applied to an individual item on the reservation or the entire reservation overall. Therefore I demand either reservation_id OR reservation_item_id to be null. In the future there may be other things which a driver is paid for, which I would also add to this table, defaulting to null. What is the rule on this? Opinion? Obviously I could break this out into MANY three column tables, but the amount of OUTER JOINing needed seems outrageous. Your input is appreciated. Peace, Tom

    Read the article

  • using STI and ActiveRecordBase<> with full FindAll

    - by oillio
    Is it possible to use generic support with single table inheritance, and still be able to FindAll of the base class? As a bonus question, will I be able to use ActiveRecordLinqBase< as well? I do love those queries. More detail: Say I have the following classes defined: public interface ICompany { int ID { get; set; } string Name { get; set; } } [ActiveRecord("companies", DiscriminatorColumn="type", DiscriminatorType="String", DiscriminatorValue="NA")] public abstract class Company<T> : ActiveRecordBase<T>, ICompany { [PrimaryKey] private int Id { get; set; } [Property] public String Name { get; set; } } [ActiveRecord(DiscriminatorValue="firm")] public class Firm : Company<Firm> { [Property] public string Description { get; set; } } [ActiveRecord(DiscriminatorValue="client")] public class Client : Company<Client> { [Property] public int ChargeRate { get; set; } } This works fine for most cases. I can do things like: var x = Client.FindAll(); But sometimes I want all of the companies. If I was not using generics I could do: var x = (Company[]) FindAll(Company); Client a = (Client)x[0]; Firm b = (Firm)x[1]; Is there a way to write a FindAll that returns an array of ICompany's that can then be typecast into their respective types? Something like: var x = (ICompany[]) FindAll(Company<ICompany>); Client a = (Client)x[0]; Or maybe I am going about implementing the generic support all wrong?

    Read the article

  • how to add value to windows installer property table

    - by Felix
    According to MSDN installer sets ROOTDRIVE to the local drive that can be written to having the most free space. In my situation it is a slow USB drive that I use for nightly backup, but I would prefer to use my C drive for the install folder. But somehow I can't figure out how to set this property from command line or through PowerShell. I found that it is possible, but these instructions don't make any sense

    Read the article

  • Telerik MVC Grid won't load data into details table (subtable)

    - by henriksen
    I have a list of Plants and assosiated Projects. I want to output this in a table with all the Plants and use Telerik.Grid to expand a Plant, show a Telerik.Grid with associated Projects. I want the Projects to be dynamically loaded with Ajax. The code for the grid: @(Html.Telerik().Grid<PlantDto>() .Name("Plants") .Columns(columns => { columns.Bound(plant => plant.Title); }) .DetailView(details => details.ClientTemplate( Html.Telerik().Grid<ProjectDto>() .Name("Plant_<#= Id #>") .DataBinding(dataBinding => dataBinding.Ajax() .Select("ProjectsForPlant", "User", new { plantId = "<#= Id #>" })) .ToHtmlString() )) .DataBinding(dataBinding => dataBinding.Ajax().Select("PlantsForUser", "User")) ) The initial data is loaded into the grid just fine (the list of Plants) but when I expand a plant I just get an empty sub-table. Looking in FireBug there are no calls to the server. The controller that should serve the list of projects is never called. Anyone have an idea on what it could be?

    Read the article

  • Azure Table Storage rejects an entity with a Property whose value is an Interface

    - by Andrew B Schultz
    I have a type called "Comment" that I'm saving to Azure Table Storage. Since a comment can be about any number of other types, I created an interface which all of these types implement, and then put a property of type ICommentable on the comment. So Comment has a property called About of type ICommentable. When I try to save a Comment to Azure Table Storage, if the Comment.About property has a value, I get the worthless invalid input error. However, if there is no value for Comment.About, I have no problem. Why would this be? Comment.About is not the only property that is a reference type. For example, Comment.From is a reference type, but the Comment.About is the only property of a type that is an interface. Fails: var comment = new Comment(); comment.CommentText = "It fails!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; comment.About = sow1; comment.From = person1; Works: var comment = new Comment(); comment.CommentText = "It works!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; //comment.About = sow1; comment.From = person1; Thanks!

    Read the article

  • PHP MySQLi isn't letting me alter a table (adding a new column)

    - by asdasd
    Well thats pretty much it. This is my query: $query = 'ALTER TABLE permissions ADD '.$name.' INT NOT NULL DEFAULT \'0\''; Where $name is already checked to exist with only lower case alpha letters, and not more than 20 length. Im just starting this out with very simple names. The next 4 lines of code after that one are: if($stmt = $db -> prepare($query)) { $success = $stmt -> execute(); $stmt -> close(); if(!$success) echo 'ERROR: Unsuccessful query: ',$db->error,PHP_EOL; } And I get back, every time ERROR: Unsuccessful query: And no error message. Is there a way to get more error messages so I can see what is failing? I can add new columns through phpmyadmin, but that really doesnt help me at all. The $db is fine, i do lots of stuff before and after this one section. It is only adding new column to the table that fails. side question: prepare() rejected my query every time when i tried to make those 2 variables, the $name and the 0 value as ? ? prepared statement values. Thats why they are in the real query and not bound later. If i could change that too I would like that.

    Read the article

  • Want to create an SQL function that removes table row duplicates [migrated]

    - by Hoser
    I'd be following the procedure outlined here (unless of course someone has a better way to do it), and I'm wondering if I could just have some help being pointed in the right direction on how to start. Basically I need help first on HOW to create functions, and general tips on making it adjustable for varying number of columns etc. This may be a very complicated task, as I have no previous experience making SQL functions, so please let me know if this is a difficult task for an SQL noobie working with MS SQL 2005.

    Read the article

  • core data saving in textboxes in table view controller

    - by user1489709
    I have created a five column (text boxes) cell (row) in table view controller with an option of add button. When a user clicks on add button, a new row (cell) with five column (text boxe) is added in a table view controller with null values. I want that when user fills the text boxes the data should get saved in database or if he changes any data in previous text boxes also it get saved. this is my save btn coding.. -(void)textFieldDidEndEditing:(UITextField *)textField { row1=textField.tag; NSLog(@"Row is %d",row1); path = [NSIndexPath indexPathForRow:row1 inSection:0]; Input_Details *inputDetailsObject1=[self.fetchedResultsController objectAtIndexPath:path]; /* Update the Input Values from the values in the text fields. */ EditingTableViewCell *cell; cell = (EditingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row1 inSection:0]]; inputDetailsObject1.mh_Up= cell.cell_MH_up.text; inputDetailsObject1.mh_down=cell.cell_MH_dn.text; inputDetailsObject1.sewer_No=[NSNumber numberWithInt:[cell.cell_Sewer_No.text intValue]]; inputDetailsObject1.mhup_gl=[NSNumber numberWithFloat:[cell.cell_gl_MHUP.text floatValue]]; inputDetailsObject1.mhdn_gl=[NSNumber numberWithFloat:[cell.cell_gl_MHDN.text floatValue]]; inputDetailsObject1.pop_Ln=[NSNumber numberWithInt:[cell.cell_Line_pop.text intValue]]; inputDetailsObject1.sew_len=[NSNumber numberWithFloat:[cell.cell_Sewer_len.text floatValue]]; [self saveContext]; NSLog(@"Saving the MH_up value %@ is saved in save at index path %d",inputDetailsObject1.mh_Up,row1); [self.tableView reloadData]; }

    Read the article

  • Table not created by Hibernate

    - by User1
    I annotated a bunch of POJO's so JPA can use them to create tables in Hibernate. It appears that all of the tables are created except one very central table called "Revision". The Revision class has an @Entity(name="RevisionT") annotation so it will be renamed to RevisionT so there is not a conflict with any reserved words in MySQL (the target database). I delete the entire database, recreate it and basically open and close a JPA session. All the tables seem to get recreated without a problem. Why would a single table be missing from the created schema? What instrumentation can be used to see what Hibernate is producing and which errors? Thanks. UPDATE: I tried to create as a Derby DB and it was successful. However, one of the fields has a a name of "index". I use @org.hibernate.annotations.IndexColumn to specify the name to something other than a reserved word. However, the column is always called "index" when it is created. Here's a sample of the suspect annotations. @ManyToOne @JoinColumn(name="MasterTopID") @IndexColumn(name="Cx3tHApe") protected MasterTop masterTop; Instead of creating MasterTop.Cx3tHApe as a field, it creates MasterTop.Index. Why is the name ignored?

    Read the article

  • DB Design to store custom fields for a table

    - by Fazal
    Hi All, this question came up based on the responses I got for the question http://stackoverflow.com/questions/2785033/getting-wierd-issue-with-to-number-function-in-oracle As everyone suggested that storing Numeric values in VARCHAR2 columns is not a good practice (which I totally agree with), I am wondering about a basic Design choice our team has made and whether there are better way to design. Problem Statement : We Have many tables where we want to give certain number of custom fields. The number of required custom fields is known, but what kind of attribute is mapped to the column is available to the user E.g. I am putting down a hypothetical scenario below Say you have a laptop which stores 50 attribute values for every laptop record. Each laptop attributes are created by the some admin who creates the laptop. A user created a laptop product lets say lap1 with attributes String, String, numeric, numeric, String Second user created laptop lap2 with attributes String,numeric,String,String,numeric Currently there data in our design gets persisted as following Laptop Table Id Name field1 field2 field3 field4 field5 1 lap1 lappy lappy 12 13 lappy 2 lap2 lappy2 13 lappy2 lapp2 12 This example kind of simulates our requirement and our design Now here if somebody is lookinup records for lap2 table doing a comparison on field2, We need to apply TO_NUMBER. select * from laptop where name='lap2' and TO_NUMBER(field2) < 15 TO_NUMBER fails in some cases when query plan decides to first apply to_number instead of the other filter. QUESTION Is this a valid design? What are the other alternative ways to solve this problem One of our team mates suggested creating tables on the fly for such cases. Is that a good idea How do popular ORM tools give custom fields or flex fields handling? I hope I was able to make sense in the question. Sorry for such a long text.. This causes us to use TO_NUMBER when queryio

    Read the article

  • Can't type text into table cell when form is protected in Word 2002

    - by Gus
    I created several tables in an Word 2002 document to act as a form for users to fill out. In some cells I added check boxes and dropdown lists for people to select options from. When I click on the Protect form button the check boxes and dropdowns become active; however, I can't type anything in the other cells. If I click in an empty cell it automatically moves to the next checkbox. When I unprotect the form then I can type in the empty cells but then checkboxes and dropdowns become useless. I know that the user can double click on the checkbox and then manually select to have it checked, but they can't do this with the dropdowns. What do I have to do to allow the user to type in responses to the tables cells and also select answers from checkboxes and dropdowns? Thanks!

    Read the article

  • ActiveRecord Validations for Models with has_many, belongs_to associations and STI

    - by keruilin
    I have four models: User Award Badge GameWeek The associations are as follows: User has many awards. Award belongs to user. Badge has many awards. Award belongs to badge. User has many game_weeks. GameWeek belongs to user. GameWeek has many awards. Award belongs to game_week. Thus, user_id, badge_id and game_week_id are foreign keys in awards table. Badge implements an STI model. Let's just say it has the following subclasses: BadgeA and BadgeB. Some rules to note: The game_week_id fk can be nil for BadgeA, but can't be nil for BadgeB. Here are my questions: For BadgeA, how do I write a validation that it can only be awarded one time? That is, the user can't have more than one -- ever. For BadgeB, how do I write a validation that it can only be awarded one time per game week?

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >