Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

Page 25/286 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • dynamic memory allocation of 2d array in which columns are of different size

    - by vishal kumar
    i want to create a 2d array dynamically in c++ language. But in that 2d array columns should be of different size. i mean to say that 2d array should not be in M * N. It should be something like.... 1 2 next line 3 4 5 next line 2 3 4 5 next line 5 next line 4 5 7 I am able to create 2d array in above manner but how to display content of array continously create a problem for me. Please anyone explain me how to come up with this problem.

    Read the article

  • Merging tables in MySQL - sum up columns

    - by Alan Williamson
    I have an interesting problem, that i am sure has a simple answer, but i can't seem to find it in the docs. I have two separate database tables, on different servers. They are both identical table schema with the same primary keys. I want to merge the tables together on one server. But, if the row on Server1.Table1 exists in Server2.Table2 then sum up the totals in the columns i specify. Table1{ column_pk, counter }; "test1", 3 "test2", 4 Table2{ column_pk, counter }; "test1", 5 "test2", 6 So after i merge i want: "test1",8 "test2",10 Basically i need to do a mysqldump but instead of it kicking out raw INSERT statements, i need to do a INSERT..ON DUPLICATE KEY UPDATE statements. What are my options? Appreciate any input, thank you

    Read the article

  • Page break between columns group in RDCL report

    - by sintetico82
    I have on table matrix with columns group. I want that the table length is break on new page if change the group value. Example of my table; GROUP COLUMN 1 | GROUP COLUMN 2 |mounth1 | month2 | month3 | mounth4 | month5 | month6 TEXT1 | ............................................................ TEXT1 | ............................................................ Some one can help me? EDIT: I uploaded an image of the report. It's a very simple matrix table. I would like page break after the "Periodo" column its was changed value. Thank...

    Read the article

  • Indexing XMLType columns

    - by Chris
    Hello, I am working with a XMLType and currently experiencing significant performance issues and would like to incorporate indexing to the column type. Currently I am taking the approach of using the XMLTable() and XQuery functions to create a virtual table. I would like to use this Virtual Table to create a function based index on the table containing the XMLType, but I am receiving this error: Error report: SQL Error: ORA-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis" *Cause: *Action: This is the index.. any assistance would be greatly appreciated. CREATE INDEX indx_medicinalproduct ON d.ProductName XMLTable('for $i at $a in /safetyreport/patient//drug for $j in $i/medicinalproduct return element r { $i/medicinalproduct }' PASSING s.safetyreport COLUMNS ProductName varchar2(70) PATH 'medicinalproduct') d;

    Read the article

  • Alter multiple tables' columns length

    - by gdoron
    So, we just found out that 254 tables in our Oracle DBMS have one column named "Foo" with the wrong length- Number(10) instead of Number(3). That foo column is a part from the PK of the tables. Those tables have other tables with forigen keys to it. What I did is: backed-up the table with a temp table. Disabled the forigen keys to the table. Disabled the PK with the foo column. Nulled the foo column for all the rows. Restored all the above But now we found out it's not just couple of tables but 254 tables. Is there an easy way, (or at least easier than this) to alter the columns length? P.S. I have DBA permissions.

    Read the article

  • MySQL COUNT() multiple columns

    - by liam
    Hello, I'm trying to fetch the most popular tags from all videos in my database (ignoring blank tags). I also need the 'flv' for each tag. I have this working as I want if each video has one tag: SELECT tag_1, flv, COUNT(tag_1) AS tagcount FROM videos WHERE NOT tag_1='' GROUP BY tag_1 ORDER BY tagcount DESC LIMIT 0, 10 However in my database, each video is allowed three tags - tag_1, tag_2 and tag_3. Is there a way to get the most popular tags reading from multiple columns? The record structure is: +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | flv | varchar(150) | YES | | NULL | | | tag_1 | varchar(75) | YES | | NULL | | | tag_2 | varchar(75) | YES | | NULL | | | tag_3 | varchar(75) | YES | | NULL | | +-----------------+--------------+------+-----+---------+----------------+

    Read the article

  • postgres - group by on multiple columns - master/detail type table

    - by smpillay
    I have a table order(orderid, ordernumber, clientid, orderdesc etc.,) and a corresponding status for that order on an order_status table ( statusid, orderid, statusdesc, statusNote, statustimestamp) say I have a record in order as below orderid orderumber clientid orderdesc 1111 00980065 ABC blah..blah.. and a corresponding status entries statusid orderid statusdesc statusNote statustimestamp 11 1111 recvd status blah yyyy-mm-dd:10:00 12 1111 clientproce status blah yyyy-mm-dd:11:00 13 1111 clientnotice status blah yyyy-mm-dd:15:00 14 1111 notified status blah yyyy-mm-dd:17:00 How can I get the following result (latest timestamp along with multiple columns) 1111 14 00980065 ABC blah..blah.. notified status blah yyyy-mm-dd:17:00

    Read the article

  • Copy Data from One SQL Server Table to Other in Same Database Without Specifying Columns

    - by Scott
    In SQL Server there is the ability to INSERT all of the data from one table into another using the following statement: INSERT INTO TABLE1 SELECT * FROM TABLE2 When running this on a table with an identity column, even though we have run the command SET IDENTITY_INSERT TABLE1 ON, we get the error: An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON This implies that we would have to list off all of the columns within the INSERT in order for this to work properly. In the situation that we are in, we do not have access to the column names, only the list of the tables we need to copy over. Is there any way to get around this limitation?

    Read the article

  • Dynamic columns in C# rdlc report

    - by Mugume David
    Suppose I have a report that lists employees (as rows) with their respective taxes charged (in columns). It is possible for a new tax to come up. Since my rdlc report file is currently designed (from XML of-course) to statically generate the coulumns. A future shift in events will need me to alter the rdlc file and add in a new column. how can i do this dynamically. I intend to avoid opening the rdlc file and adding XML code.

    Read the article

  • select columns by a conact text as columnname in oracle

    - by glaudiston
    I have a table with columns named with the number of hour of day like this: col00 NUMBER(5) col01 NUMBER(5) col02 NUMBER(5) ... col23 NUMBER(5) ...and I have another query that returns a count by hour. I want to recover the colXX value by hour.... then I can recover with "decode" or "case when..." but I want know if exists any way to recover the column by a text like this: select "col"||hour from table; in the hypothetical above example if hour is 13 then would be translated like: select col13 from table; there is any way to do this ?

    Read the article

  • Hibernate entities: columns without entity properties

    - by lewap
    Is there a way to "magically" persist a column which is not represented as a property in an entity? Concretely I want to add audit info to an entity without having the audit info on the entity. The audit values are not stored in the entity, but are retrieved from the environment at the time of persisting the entity. This happens in a AuditInfoUserType. The nullSafeSet gets the info from the SecurityContext, instead of reading from the entity. In the hibernate mapping, however, the audit info properties have to be defined. Is there a way in hibernate to define columns without properties?

    Read the article

  • JPA: Database Generated columns

    - by jpanewbie
    Hello, I am facing an issue with Hiebrnate and JPA. My requirement is column CreatedDTTM and LastUPDATEDDTTM should be populated at the DB level. I have tried following but no use. My columns are set NOT NULL. I get a "cannot insert Null into LastUpdatedDttm" exception. Any guidance is appreciated. @Column(name="LAST_UPDATED_DTTM", insertable=false, updatable=false, columnDefinition="Date default SYSDATE") @org.hibernate.annotations.Generated(value=GenerationTime.INSERT) @Temporal(javax.persistence.TemporalType.DATE) private Date lastUpdDTTM; @Column(name="CREATED_DTTM”, insertable=false, updatable=false) @org.hibernate.annotations.Generated(value=GenerationTime.ALWAYS) @Temporal(javax.persistence.TemporalType.DATE) private Date createdDTTM;

    Read the article

  • select columns by a concat text as columnname in oracle

    - by glaudiston
    I have a table with columns named with the number of hour of day like this: col00 NUMBER(5) col01 NUMBER(5) col02 NUMBER(5) ... col23 NUMBER(5) ...and I have another query that returns a count by hour. I want to recover the colXX value by hour.... then I can recover with "decode" or "case when..." but I want know if exists any way to recover the column by a text like this: select "col"||hour from table; in the hypothetical above example if hour is 13 then would be translated like: select col13 from table; there is any way to do this ?

    Read the article

  • select from multiple tables with different columns

    - by Qaiser Iftikhar
    Say I got this sql schema. Table Job: id,title, type, is_enabled Table JobFileCopy: job_id,from_path,to_path Table JobFileDelete: job_id, file_path Table JobStartProcess: job_id, file_path, arguments, working_directory There are many other tables with varying number of columns and they all got foreign key job_id which is linked to id in table Job. My questions: Is this the right approach? I don't have requirement to delete anything at anytime. I will require to select and insert mostly. Secondly, what is the best approach to get the list of jobs with relevant details from all the different tables in a single database hit? e.g I would like to select top 20 jobs with details, their details can be in any table (depends on column type in table Job) which I don't know until runtime. Thanks in advance. Regards,

    Read the article

  • Querying Same Lookup Table With Multiple Columns

    - by dmaruca
    I'm a bit confused on this. I have a data table structured like this: Table: Data DataID Val 1 Value 1 2 Value 2 3 Value 3 4 Value 4 Then I have another table structured like this: Table: Table1 Col1 Col2 1 2 3 4 4 3 2 1 Both columns from Table1 point to the data in the data table. How can I get this data to show in a query? For example, a query to return this: Query: Query1 Column1 Column2 Value 1 Value 2 Value 3 Value 4 Value 4 Value 3 Value 2 Value 1 I'm familiar enough with SQL to do a join with one column, but lost beyond that. Any help is appreciated. Sample sql or a link to something to read. Thanks! PS: This is in sqlite

    Read the article

  • Handling dynamic number of columns

    - by Whistle
    I'm developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to give them the ability to choose to display or hide the left column, the right column and/or the top div. The middle column cannot be hidden since this is where the actual content will show, whereas the other columns are for navigation or side menus. I've been looking for a way to make this as smart and flexible as possible. For now I'm using a MasterPage, but that seems to be too constraining. For instance, with MasterPage you need to add a ContentPlaceHolder control in every of your ASPX pages. What are the best practices in this area? I guess a simpler way of saying this would be "I want to create a template system over which I have complete control".

    Read the article

  • Mysql SELECT with an OR across 2 columns

    - by Haroldo
    I'm creating a 'similar items' link table. i have a 2 column table. both columns contains product ids. The table is showing that these items are similar. However ids in the left column are more valuable. Say i want to select similar items to product '125b'. i only want 3 similar items to 125b. If there are any instances of 125b in col1 I would prefer these to finding 125b in col2. so i need a select statement along the lines of SELECT * FROM similar_items WHERE col_1={$id} OR col_2={$id} ORDER BY column(?) LIMIT 3 i do not want to do 2 separate queries ( ie query 2 if count(query1) <3 )

    Read the article

  • Drop Columns R Data frame

    - by Btibert3
    I have a number of columns that I would like to drop from a data frame. I know that we can drop them using something like: df$x <- NULL but I was hoping to do this with less commands. Also, I know that I could use this: df[ -c(1,3:6, 12) ] but I am concerned that the relative position of my variables may change. Given how powerful R is, I figured I would ask to see if there is another way beyond dropping each column 1 by 1. Thanks in advance.

    Read the article

  • Check for duplicate rows in 2 columns before update

    - by user3891378
    I have a table with 4 columns, and I need to check to see if a Column Pair exists before inserting a row into the database: INSERT INTO dbo.tblCallReport_Detail (fkCallReport, fkProductCategory, Discussion, Action) VALUES (?, ?, ?, ?) The pair in question is fkCallReport and fkProductCategory. For example if the row trying to be inserted has fkCallReport = 3 and fkProductCategory = 5, and the database already has both of those values together, it should display an error and ask if they would like to combine the Disuccsion and Action with the current record. Keep in mind I'm doing this in VBA Access 2010 and am still very new.

    Read the article

  • List DIV tags in columns

    - by cbeberge
    Hi I want to liste these images in 3 columns( see under). What is the HTML cod for this? [IMAGE] [IMAGE] [IMAGE] <div class="rparticle "> <div class="articleEntry Normal"><a href="[LINK]">[IMAGE]</a></div> <div><a href="[LINK]">[TITLE]</a></div> </div> .rparticle { display:inline; clear: both; text-align: center; margin-bottom : 25px; width:190px; }

    Read the article

  • SQL searching two columns for best results

    - by brsmnc
    Hi all I would like to perform an sql search and I would like to get best results. I tried some things but they didn't work well. I have got two columns named subject and content For example we will search "search this keywords" text on subject and content area. First I'm searching "search this keywords" then searching "search" and "this" and "keywords" I would like to retrieve subject's results on top and I would like to retrieve best results liking "search this keywords".My query sometimes works well sometimes not. How should I write this query Thanks..

    Read the article

  • Elegant ways of displaying a GridView with lots of columns (ASP.NET)

    - by Chris
    Hi, just a general design question that I'd like to hear some of your opinions on. I am designing a system for a client, and I'm using GridView' a lot. They need a lot of columns to be displayed in some of these, and I've had to resort to using a panel with a horizontal scrollbar. This presents some issues - keeping track of which row is which is difficult, even with alternating row colours, and it's generally pretty ugly. How have you dealt with these issues before? Are there any sort of AJAX controls that could help, so some data could be only displayed on hover or such? Or any other general ideas.

    Read the article

  • MySQL pivot tables - covert rows to columns

    - by user2723490
    This is the structure of my table: Then I run a query SELECT `date`,`index_name`,`results` FROM `mst_ind` WHERE `index_name` IN ('MSCI EAFE Mid NR USD', 'Alerian MLP PR USD') AND `time_period`='M1' and get a table like How can I convert "index_name" rows to columns like: date | MSCI EAFE Mid NR USD | Alerian MLP PR USD etc In other words I need each column to represent an index and rows to represent date-result. I understand that MySQL doesn't have pivot table functions. What is the easiest way of doing this? I've tried this code, but it generates an error: SELECT `date`, MAX(IF(index_name = 'Alerian MLP PR USD' AND `time_period`='M1', results, NULL)) AS res1, MAX(IF(index_name = 'MSCI EAFE Mid NR USD' AND `time_period`='M1', results, NULL)) AS res2 FROM `mst_ind` GROUP BY `date I need to make the conversion on the query level - not PHP. Please suggest a nice and elegant solution. Thanks!

    Read the article

  • sqlalchemy dynamic mapping

    - by adancu
    Hi, I have the following problem: I have the class: class Word(object): def __init__(self): self.id = None self.columns = {} def __str__(self): return "(%s, %s)" % (str(self.id), str(self.columns)) self.columns is a dict which will hold (columnName:columnValue) values. The name of the columns are known at runtime and they are loaded in a wordColumns list, for example wordColumns = ['english', 'korean', 'romanian'] wordTable = Table('word', metadata, Column('id', Integer, primary_key = True) ) for columnName in wordColumns: wordTable.append_column(Column(columnName, String(255), nullable = False)) I even created a explicit mapper properties to "force" the table columns to be mapped on word.columns[columnName], instead of word.columnName, I don't get any error on mapping, but it seems that doesn't work. mapperProperties = {} for column in wordColumns: mapperProperties['columns[\'%']' % column] = wordTable.columns[column] mapper(Word, wordTable, mapperProperties) When I load a word object, SQLAlchemy creates an object which has the word.columns['english'], word.columns['korean'] etc. properties instead of loading them into word.columns dict. So for each column, it creates a new property. Moreover word.columns dictionary doesn't even exists. The same way, when I try to persist a word, SQLAlchemy expects to find the column values in properties named like word.columns['english'] (string type) instead of the dictionary word.columns. I have to say that my experience with Python and SQLAlchemy is quite limited, maybe it isn't possible to do what I'm trying to do. Any help appreciated, Thanks in advance.

    Read the article

  • Nested Row problem

    - by Patrick
    Hi, I'm using the 1kb css grid framework for a site, and although nested rows are apparently supported by the framework, when I try to drop in a nested row it doesn't work! Sorry not to explain it better - the site's here, may be easier to just look at the source: http://2605.co.uk/saf/build/ the grid: /grid.css the stylesheet: /style.css I'm a graphic designer hacking his way through a site he shouldn't be having to build but there's no budget to speak of! Cheers for any help, Patrick

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >