Search Results

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

Page 72/489 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Are Multi-column Primary Keys in MySQL a optimisation problem?

    - by David
    Been looking into using multi-column primary keys and as performance is extremely important with the size of traffic and database I need to know if there is anything to consider before I start throwing out the unique ID method on many of my tables and start using mulit column primary keys. So, what are the performance/optimisation pros/cons to using multi column primary keys versus a basic single column, auto-inc primary key?

    Read the article

  • Hiding Group Column Names

    - by Robert
    You once replied to a post about hiding list group header names. http://edinkapic.blogspot.com/2008/06/hiding-list-view-group-headers.html I do not write code or jQuery at that. But you mentioned that it would be better to write a solution in jQuery. Would you have code that would hide the group header and colon in a 2003 list (SP v.2)? Do you have any good leads? Thanks. Robert S.

    Read the article

  • t-sql pivot filter based on input column name

    - by stackoverflowuser
    Based on following AreaState table Area State ------------------- A1 Active A1 Active A1 Active A1 Proposed A1 Proposed A2 Active A2 Proposed I want to write a stored proc that returns count of state for each of the areas. Input to the stored proc is any valid State (in this case @state is the input parameter). I was hoping that below would work but it does not. declare @state varchar(10) set @state = 'Active' select Area, QUOTENAME(@state) from ( select Area, State from AreaState ) as src pivot ( count(State) for State in (QUOTENAME(@state)) ) as pvt Pls. suggest.

    Read the article

  • jQuery UL sortable list, CSS how to align column style data

    - by Brett
    Hi, I'm using jQuery UI, sortable on an ul element. All good, except over time the data in my li elements has become table like, in the sense there are multiple columns of data. They aren't aligning correctly because this seems to be hard to do in ul, and indeed not what ul's are designed for. I have 2 choices the way I see Work out some really cool css to make my ul / li format nicely Work out how to convert this to a sortable table With option 2., looking at a few plugins that exist (tablednd for example), they seem very old. I don't believe the jQuery UI Anyone got any recommendations as far as a direction I should head?

    Read the article

  • SQL: Update a column with multiple values with single query

    - by Sandeep Jindal
    Hi, I have an update query like following: update table TABLE1 set COL1 = 'X' where COL2 = 'Y' ---1 Support the values 'X' and 'Y' are fetched from database now TABLE2. E.g. select COL1, COL2 from TABLE2. ----2 I want to update table TABLE1 with values from TABLE2. Just to make it more clear, assume that TABLE2 has following values: Can you please help me in doing this in a single query!

    Read the article

  • How to Compute a Database Column in .NET

    - by Michael
    I have a Database named CarsType.accdb there are four fields in the data base Item_Name, Item_Num, Item_Qty, Item_Cost. I am able to get the database to display my data in VisualBasic but I am not sure how to get the total cost to appear in my label (lblTotalCost). I prefer doing it in VB versus writing in my access program. All I am wanting to do it multiply item_qty * Item_Cost How would I go about doing that?

    Read the article

  • MySQL VARCHAR strange column behavior

    - by Mat
    I have the following SQL statement which returns a single record as expected: select * from geodatasource_cities C, geodatasource_countries D where C.CC_FIPS = D.CC_FIPS and D.CC_ISO='AU' and UCASE(TRIM(C.FULL_NAME_ND)) LIKE '%JAN JUE%'; However, If I use the following SQL statement, no records are returned. I have only changed the LIKE clause to an equal to clause: select * from geodatasource_cities C, geodatasource_countries D where C.CC_FIPS = D.CC_FIPS and D.CC_ISO='AU' and UCASE(TRIM(C.FULL_NAME_ND)) = 'JAN JUE'; Can anybody please help me understand why this may be happening?

    Read the article

  • select rows with unidentical column values using R

    - by Bazon
    Hi Guys, I need to create a new data frame that excludes dams that appear in "dam1" and "dam2" columns on the same fosdate (fostering date). I tried df <- df[df$dam1!=df$dam2,] but did not work. Dam1 and dam2 are factors which are the ids's of mothers. my df: fosdate dam1 dam2 8/09/2009 2Z523 2Z523 30/10/2009 1W509 5C080 30/10/2009 1W509 5C640 30/10/2009 1W509 1W509 1/10/2009 1W311 63927 The new data frame that I need to get is: dfnew: fosdate dam1 dam2 30/10/2009 1W509 5C080 30/10/2009 1W509 5C640 1/10/2009 1W311 63927 Would appreciate any help! Bazon

    Read the article

  • Get only latest row, grouped by a column

    - by Cylindric
    I have a large data-set of emails sent and status-codes. ID Recipient Date Status 1 [email protected] 01/01/2010 1 2 [email protected] 02/01/2010 1 3 [email protected] 01/01/2010 1 4 [email protected] 02/01/2010 2 5 [email protected] 03/01/2010 1 6 [email protected] 01/01/2010 1 7 [email protected] 02/01/2010 2 In this example: all emails sent to someone have a status of 1 the middle email (by date) sent to them has a status of 2, but the latest is 1 the last email sent to others has a status of 2 What I need to retrieve is a count of all emails sent to each person, and what the latest status code was. The first part is fairly simple: SELECT Recipient, Count(*) EmailCount FROM Messages GROUP BY Recipient ORDER BY Recipient Which gives me: Recipient EmailCount [email protected] 2 [email protected] 3 [email protected] 2 How can I get the most recent status code too? The end result should be: Recipient EmailCount LastStatus [email protected] 2 1 [email protected] 3 1 [email protected] 2 2 Thanks. (Server is Microsoft SQL Server 2008, query is being run through an OleDbConnection in .Net)

    Read the article

  • How to do multiple column UniqueConstraint in hbm?

    - by DataSurfer
    Working on some legacy hibernate code. How do I do the following with hbm.xml(hibernate mapping file) instead of with annotations? @Table(name="users", uniqueConstraints = { @UniqueConstraint(columnNames={"username", "client"}), @UniqueConstraint(columnNames={"email", "client"}) }) public class User implements Serializable { private static final long serialVersionUID = 1L; @Id private int id; private String username; private String email; private Client client; }

    Read the article

  • Necessary rights to be able to add a column with ALTER TABLE ADD column_name

    - by Sorin Comanescu
    Hi, Could somebody point out the necessary rights to do something like ALTER TABLE myTable ADD myColumn int NOT NULL CONSTRAINT [Constraint_name] DEFAULT ((0)) ? I assumed grant alter on myTable to [user] was enough but I'm getting the error message The UPDATE permission was denied on the object 'myTable', database 'x', schema 'dbo'. Could UPDATE rights be needed because of the DEFAULT constraint? Thanks.

    Read the article

  • Counting characters in an Access database column using SQL

    - by jzr
    I have the following table col1 col2 col3 col4 ==== ==== ==== ===== 1233 4566 ABCD CDEF 1233 4566 ACD1 CDEF 1233 4566 D1AF CDEF I need to count the characters in col3, so from the data in the previous table it would be: char count ==== ===== A 3 B 1 C 2 D 3 F 1 1 2 Is this possible to achieve by using SQL only? At the moment I am thinking of passing a parameter in to SQL query and count the characters one by one and then sum, however I did not start the VBA part yet, and frankly wouldn't want to do that. This is my query at the moment: PARAMETERS X Long; SELECT First(Mid(TABLE.col3,X,1)) AS [col3 Field], Count(Mid(TABLE.col3,X,1)) AS Dcount FROM TEST GROUP BY Mid(TABLE.col3,X,1) HAVING (((Count(Mid([TABLE].[col3],[X],1)))>=1)); Ideas and help are much appreciated, as I don't usually work with Access and SQL.

    Read the article

  • Filter by virtual column?

    - by user329957
    I have the following database structure : [Order] OrderId Total [Payment] OrderId Amount Every Order can have X payment rows. I want to get only the list of orders where the sum of all the payments are < than the order Total. I have the following SQL but I will return all the orders paid and unpaid. SELECT o.OrderId, o.UserId, o.Total, o.DateCreated, COALESCE(SUM(p.Amount),0) AS Paid FROM [Order] o LEFT JOIN Payment p ON p.OrderId = o.OrderId GROUP BY o.OrderId, o.Total, o.UserId, o.DateCreated I have tried to add Where (Paid < o.Total) but it does not work, any idea? BTM I'm using SQL CE 3.5

    Read the article

  • Select a row having a column with max value - On a date range

    - by Abhi
    Excuse me for posting a similar question. Please consider this: date value 18/5/2010, 1 pm 40 18/5/2010, 2 pm 20 18/5/2010, 3 pm 60 18/5/2010, 4 pm 30 18/5/2010, 5 pm 60 18/5/2010, 6 pm 25 19/5/2010, 6 pm 300 19/5/2010, 6 pm 450 19/5/2010, 6 pm 375 20/5/2010, 6 pm 250 20/5/2010, 6 pm 310 The query is to get the date and value for each day such that the value obtained for that day is max. If the max value is repeated on that day, the lowest time stamp is selected. The result should be like: 18/5/2010, 3 pm 60 19/5/2010, 6 pm 450 20/5/2010, 6 pm 310 The query should take in a date range like the one given below and find results for that range in the above fashion: where date = to_date('26/03/2010','DD/MM/YYYY') AND date < to_date('27/03/2010','DD/MM/YYYY')

    Read the article

  • SQL inserting value of a specific column under multple case

    - by Lo Wai Lun
    Suppose I have got a table which I have to insert the description of the contract under different keys of contract. But when executing, there is a n error near then Is there any limitation of using syntax set ? The below is my SQL declare @i int, @j v nvarchar(MAX) set @i = 1 while (@i<=8) begin set @j = case when @i = 1 then 'CR' when @i = 2 then 'Facebook' else 'N/A' end INSERT INTO CostNature (CNKey, CNNDescription) VALUES (@i , @j ); set @i = @i + 1 end

    Read the article

  • Convolve a column vector

    - by Geoff
    This is an OpenCV2 question. I have a matrix: cv::Mat_<Point3f> points; representing some space curve. I want to smooth it (using, for example a Gaussian kernel). I have tried using: cv::Mat_<Point3f> result; cv::GaussianBlur(points, result, cv::Size(4 * sigma, 1), sigma, sigma, cv::BORDER_WRAP); But I get the error: Assertion failed (columnBorderType != BORDER_WRAP)

    Read the article

  • RODBC sqlSave and column names

    - by waanders
    I've a question about using sqlSave. How maps RODBC data in the data frame to the database table columns? If I've a table with columns X and Y and a data frame with columns X and Y, RODBC puts X into X and Y into Y (I found out by trail-and-error). But can I explicitly tell R how to map data.frame columns to database table columns, like put A in X and B in Y. I'm rather new to R and think the RODBC manual is a bit cryptic. Nor can I find an example on the internet.

    Read the article

  • Adding a new column to Table which contains live data

    - by Ardman
    I have a large table consisting of over 60 millions records and I would like to add 2 new columns for data migration purposes. There are indexes on the table and some of them are large. So, by me adding the 2 new columns to the table, will I run the risk of slowing down the database whilst it attempts to add them and maybe time-out? Or will it just work? I know that if I try and rearrange the columns SQL Server will ask me to drop and re-create the table, so I definately don't want this. Is this something everyone is challenged with?

    Read the article

  • How to use another type of EditingControl in a single C# 3.5 DataGridView column ?

    - by too
    Is this possible to have two (or more) different kinds of cells to be displayed interchangeably in single column of C# .Net 3.5 DataGridView? I know one column has specified single EditingControl type, yet I think grid is flexible enough to do some tricks, I may think of only: Adding as many invisible columns to grid as required types of cells and on CellBeginEdit somehow exchange current cell with other column's cell Create custom column and custom cell with possibility of changing EditingControl for single cell Which approach is better, are there any examples ?

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >