I'm working under refactoring of database (SQL Server 2008) scheme and gather arguments to change NCHAR(1) columns (which keep Y|N values) to BIT. Everybody understand this is necessary and don't know why does it take place but this change affects production database so weighty arguments are required. Table keeps address catalog (up to 1...
Consider the following sample table in MySQL:
CREATE TABLE transactions
(
transId BIGINT NOT NULL AUTO_INCREMENT,
transDate DATETIME NOT NULL,
transTotal DECIMAL(10,2),
PRIMARY KEY (transId)
);
This table is used in high volume operations i.e. lots of INSERTS. You will eventually reach the maximum limit of transId. ...
I have a table whose size I'd like to keep down, and one of the columns can be treated as a 5-byte unsigned integer. This is a column that I won't need to search by.
MySQL offers integer datatypes
TINYINT, for 1-byte integersSMALLINT, for 2-byte integersMEDIUMINT, for 3-byte integersINT, for 4-byte integersBIGINT, for 8-byte integers.
...
I have an NSArray that contains two types of objects. Lets call them Apple and Orange.
Apple *myApple = [self.searchQueryResults objectAtIndex:indexPath.row];
When I am building my cell's I don't know what type is in my array, apples or oranges. How can I use the generic id type to store the object, and then cast appropriately?
...
Hi,
Can I know if void is data type in "C"? what type of values it can store, if we have int, float, char etc to store the values why is void needed?
...
I am creating such application where user can post there articles upto 800-1000 words .
What should I use to maintain text formating like paragraph, next line etc.(if i use textarea as input textbox for article?). I am using mySql so what shod my datatype to store article text VARCHAR or TEXT?? and what shoud be the size for 1000 words? ...
I have following confusions -
1. Which datatype is used for bigger amount of data store
2. When we specify varcha(100) so this 100 represent 100 characters or 100 bits or bytes
...
well i want an enum i can use in switch function.
i need to get that enum using something like iValue.GetType().somethingidontknow()
so basically this system enum should contain all the basic reference types like int , string , long and so on.
thanks
...
What Java data type does the Oracle JDBC driver assign to the Oracle SQL data type NUMERIC? Does this vary with the size of the NUMERIC type?
...
When run against and Oracle database, what is the runtime type of the object that the following Spring Hibernate Template (Spring 2.5 and Hibernate 3.3.2GA) code returns where the SQL query is a counting query like select count(*) from table?
String sql = "select count(*) from table";
BigDecimal count = (BigDecimal) hibernateTemplate....
I posted other question: http://stackoverflow.com/questions/3509470/what-type-should-i-use-for-binary-representation-of-c-enum, and by the answer, I have to know my compiler's enum data-type.
What's the data-type of C enum on Clang compiler?
...
I understand the size/storage constraints of MySQL TEXT and MEDIUMTEXT fields, but I just wanted to make absolutely sure (before I sign off on a change) that I'm not looking at any adverse effects from converting a field with existing data from TEXT to MEDIUMTEXT.
My concerns are mainly performance, integrity, and disk storage.
Thanks
...
I'm reading excel and there's cell that represents total cost of budget in percents.
In excel it looks like 8%, but once i read it, i get string 8.33333333329E-2.
Got confused a bit.
What would be correct data type and parsing technique to use and avoid losing data?
...
Say I have a method declaration like:
private void someMethod(final String someKey, final Object dataType){
// Some code
}
I want to call it like:
someMethod("SomeKey", String);
someMethod("SomeKey", Date);
I can it do it in different ways like declaring an int with different values representing the type, an enum, or the like.
B...
Hi,
I´m pretty new to scala, so excuse my question if it is dumb.
Is there any way to build dynamic multi-dimensional arrays in scala. I know arrays in scala must be initializes in its sizes and dimensions, so I don't want that. The Datastructure should be dynamic. I tried to build it with lists in lists, but I lost myself some way :)...
Hi All.
I am performing a query on the following table:
Approval
person (long int)
item (long int)
reason (long int)
date (date)
valid (bool)
The first 3 fields are linked to other tables. Each person may have any number of entries in this table, for various items, reasons or dates. I then perform the following query:
SELECT Appro...
For example, suppose I have a TINYINT column that I want to change into an ENUM. Is it possible to write a MySQL query that changes the datatype of the column while mapping the existing data so that (for example) 0 becomes No, 1 becomes Yes, and 2 becomes Maybe?
...
I have a float value that i need to do some calculations on and insert into a numeric(9,2). However in rare (and likley erronous) cases there are some data anomolies and I end up with a value that will not fit into numeric(9,2).
What is a good solution to this problem? Maybe just use 9999999.99 if the number is 9999999.99 or greater?
A...
I was wanting to create a personal note database, to store notes in HTML or text that are quite long. What would be the difference between VARCHAR and TEXT fields, which one would be more efficient to use?
I think VARCHAR's max is 65535 characters, I can't wrap my head around if I'll contain anything larger than that though. I wonder if...
hello all,
I have a teradata table with about 10 million records in it, that stores a numeric id field as a varchar. i need to transfer the values in this field to a bigint column in another table, but i can't simply say cast(id_field as bigint) because i get an invalid character error. looking through the values, i find that there co...