How can I replace CHAR with VARCHAR2 in all tables in a schema?
Note: I'm content with a query that returns the ALTER TABLE statements so I can save the script and run it again.
Hi friends,
I want to insert 3 rows at a time in a table based on select statement..
consider the query
insert into tblTemp
(
a,b
)
select a, b from tblTemp2
This lets me insert one row in tblTemp..
my requirement is to add 3 rows with iterative values a,a+1,a+2 for each b inserted.
I have a scores table that has two fields:
user_id
score
I'm fetching specific rows that match a list of user_id's. How can I determine a rank for each row relative to the total number of rows, based on score? The rows in the result set are not necessarily sequential (the scores will vary widely from one row to the next). I'm not sure if this matters, but user_id is a unique field.
I'm trying to create a table using google spreadsheet API as described here
http://code.google.com/apis/spreadsheets/data/3.0/developers_guide_protocol.html#TableRecordFeeds
But I'm not sure how to construct the Atom object in Javascript and POST it to an URL.
How can I use touchesbegan in a table's cell without having to subclass a whole cell. Something like addTarget..... which is available for a UIButton?
(in vb.net this would be like AddHandler I think)
How can I get the rearranged columns out of a datagridview in C#? I need to get all the columns currently being displayed in order. I can get the default columns order by setting datagridview.AutoGenerateColumns=false but I get the same old order even after I've rearranged the columns in my table.
Thanks
I want to build perl apps with a gui that:
A: are windows compatible (no cygwin or the like)
B: utilize a nice GUI builder
C: is easily distributed (minimizing additional components that must be installed)
D: has good documentation and tutorials for building and using the GUI
E: is still be developed (has a future) and appears to be the future of perl GUIs
Maybe someone could provide a table something like the following for the alternatives (wxperl, perlqt, tk gtk2...etc)?:
tool1 = AB
tool2 = CE
tool3 = ACD ...
Unfortunately, Java has no syntax for multi-line string literals. No problem if the IDE makes it easy to work with constructs like
String x = "CREATE TABLE TEST ( \n"
+ "A INTEGER NOT NULL PRIMARY KEY, \n"
...
What is the fastest way to paste a multi-line String from the clipboard into Java source using Eclipse (in a way that it automagically creates code like the above).
Hello,
In my table I have a field named eventdate in datetime format like 2010-05-11 00:00:00.
How do i make a query so that it adds one day to the eventdate eg if today is 2010-05-11, i want to show in where clause to return all records with tomorrow's date.
My project is like a classifieds kind of stuff..
I have a search text box in the first page.
When the user enters some text in that, i need to compare that text to the XML file from where all the data are being recieved, and should list out all the advertisements in the Table View (next page)..
I had did this kind of search in sql database..but not with XML..
Just need some help..
Hello!
I have a question. Transaction isolation level set to serializable. When the one user open transaction and INSERT or UPDATE data in "table1" and then another user open transaction and try to INSERT data to the same table is second user need to wait 'til the first user commits the transaction?
hello everyone!
I'm trying to find the best way to display images inside of UILabels (in fact, I wouldn't mind switching to something other than UILabel if it supports images with no hassle)
The scenario is:
I have a table view with hundreds of cells and UILabel being the main component of each cell
The text I assign to each cell contains sequences of characters that need to be parsed out and represented as an image
In simpler words, imagine a TableView of an instant messenger that parses replaces all ":)", ":(", ":D" etc with corresponding smiley images
Any input would be greatly appreciated!
How to make an SQL query if there are 30 records in table and I want to pick rows from 12 to 20 where 12 and 20 are row numbers not Ids.
**Ids Code**
5 ABC
6 SDF
8 WSA
10 FSD
15 IOP
.
.
.
.
80 AWS
I wish to be able to change the table a class is mapped to at run time, I can’t do this if all the mappings are defined with attributes. Therefore is there a way to define the mappings at runtime in code.
(I would rather not have to maintain xml mapping files.)
Hi everyone,
how to do a select * from table in jython and get the result for each row into a list or string.
i know how to do for select counmn_name1 ,column_name2 from table1 but not able to figure out for select *
Please suggest .thanks
Is there any way I can find the rank of a set of values in Microsoft Reports?
For instance, in order to produce a table like the one below, what function/formula do I enter in the Rank column?
+------+-----+
|Value | Rank|
+------+-----+
| 12 | 3 |
| 30 | 5 |
| 5 | 1 |
| 10 | 2 |
| 24 | 4 |
+------+-----+
Update
Values in the value column are produced from calculations on the report-side so I cannot find the rank using a query.
Hi,
I'm a beginner of ASP. I'm maintaining at ASP 1.0 page and I want to reload the page with an additional parameter when user click client-side URL.
The objective is to export the table currently display in Excel. So I want to reload the page with a special parameter that would tell the page to change the ResponseType to be Excel data.
Any idea ?
Thanks
Hi,
I have an SQL table like this : sales(product,timestamp)
I want to display a chart using Open Flash Chart but i don't know how to get the total sales per hour within the last 12 hours. ( the timestamp column is the sale date )
By example i will end up with an array like this : array(12,5,8,6,10,35,7,23,4,5,2,16) every number is the total sales in each hour.
Note: i want to use php or only mysql for this.
Thanks
I have a table in the form:
test_name| test_result |
test1 | pass |
test2 | fail |
test1 | pass |
test1 | pass |
test2 | pass |
test1 | pass |
test3 | pass |
test3 | fail |
test3 | pass |
As you can see all test1's pass while test2's and test3's have both passes and fails.
Is there a SQL statement that I can use to return the distinct names of the tests that only pass? E.g. test1
Hi everybody,
I have the following query in my application. It works well, but I need it to also contain the number of products that are associated with each manufacturer.
The current query:
SELECT * FROM (`manufacturers`)
JOIN `languages` ON `manufacturers`.`lang` = `languages`.`id`
ORDER BY `languages`.`id` asc, `id` asc
My products table looks like this:
id | name | manufacturerid
0 | Product1 | 0
I am trying to mix dynamic and static cells in a grouped table view: I would like to get two sections with static cells at the top followed by a section of dynamic cells (please refer to the screenshot below). I have set the table view contents to static cells.
I designed the static cells in Interface Builder and gave them identifiers related to their section and row: "section0static0", "section0static1", "section1static0" and "section1static1". I named the dynamic cell "section2dynamic".
My delegate methods, in which I am trying to return the correct cell identifier (static or dynamic) are as follows:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
switch (section) {
case 0:
return 2;
break;
case 1:
return 2;
break;
case 2:
return 0;
break;
default:
break;
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"";
if (indexPath.section <= 1) CellIdentifier = [NSString stringWithFormat:@"section%istatic%i",indexPath.section,indexPath.row];
else CellIdentifier = [NSString stringWithFormat:@"section%idynamic",indexPath.section];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
return cell;
}
Edit
Based on AppleFreak's advice I have changed my code as follows:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell;
if (indexPath.section <= 1) { // section <= 1 indicates static cells
cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
} else { // section > 1 indicates dynamic cells
CellIdentifier = [NSString stringWithFormat:@"section%idynamic",indexPath.section];
cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
}
return cell;
}
However, my app crashes with error message
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'UITableView dataSource
must return a cell from tableView:cellForRowAtIndexPath:'
for section 0 and row 0. The cell returned from cell = [super tableView:tableView cellForRowAtIndexPath:indexPath] for section 0 and row 0 is nil.
What is wrong with my code? Could there be any problems with my outlets? I haven't set any outlets because I am subclassing UITableViewController and supposedly do not any outlets for tableview to be set (?). Any suggestions on how to better do it?
I'm generating an HTML report by C# to print pairs of files in a table which has 3 columns: the first two columns used for the filenames and the 3rd column is a hyperlink Compare - I want this link to run WinMerge to compare to two files and I currently don't know how to do it. Please help!
Hi
All i need is a simple explanation on how does this function work
I also attached a piece of php which I think is the one that retrieves the data from the database. Please correct me if I'm wrong
Cheers.
function loadDatabaseRecords ()
{
// Mozilla/Safari
if (window.XMLHttpRequest)
{
xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject)
{
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
alert ("To Server (Load Records):\n\najax-open-DB.php");
xmlHttpReq.open('GET', "ajax-open-DB.php", true);
xmlHttpReq.onreadystatechange = loadDatabaseRecordsCallback;
xmlHttpReq.send(null);
}
<?php
$link = mysql_connect ("ipaddress", "localhost", "password");
mysql_select_db ("database1");
$query = "SELECT * from addressbook";
$result = mysql_query ($query);
print "<table>";
print "<tr>";
print "<th>Firstname</th><th>Lastname</th><th>Address</th><th>Telephone</th>";
print "</tr>";
for ($i = 0; $i < mysql_num_rows ($result); $i ++)
{
$row = mysql_fetch_object ($result);
print "<tr>";
print "<td>$row->firstname</td>";
print "<td>$row->lastname</td>";
print "<td>$row->address</td>";
print "<td>$row->telephone</td>";
print "</tr>";
}
print "</table>";
mysql_close ($link);
?>
Is it possible to search through blob text using sql statement?
I can do select * from $table where f1 like '%foo%' if the f1 is varchar, how about f1 is a blob? Any counter part for this?