Is there a system column - timestamp - in Oracle table to determine when was it changed last time?
I would assume there must be one to let mat views pull changes only ...
Is it possible to have Outputs from PL/SQL in real time? I have a pretty huge package that runs for more than an hour and I'd like to see where the package is at a particular time.
Anyways, I currently do this with a log table, which gets filled up with hundreds of log descriptions per run, I'm just curious if this is possible.
Thanks!
I have a logins table which records all login and logout activities. I want to look at all login activities of a particular user within 24 hrs. how to do it? something like this:
var records = from record in db.Logins
where record.Users.UserId == userId
&& record.Timestamp <= (DateTime.Now + 24)
select record;
record.Timestamp <= (DateTime.Now + 24) is wrong here. I am using C# 3 + L2E.
Is it possible to create a "tree resolver" in SQL?
I have a table:
ID Name Parent
1 a
2 b 1
3 c 1
4 d 3
Now I want a SQL query that returns:
ID PATH
1 /a
2 /a/b
3 /a/c
4 /a/c/d
Is this possible with SQL? It would make many things easier for me. Any help would really be appreciated!
Hello,
In my table I have a serial number field, which is represneted by string.. It has a prefix and some numbers follow. Eg: ABC1234, ABC2345 etc. How to retrieve the largest value (max equivalent of int type) from this column. In my case it would be ABC2345. I probably could retrieve all the data,, sort it and get the same, but that would be slow.
thanks in advance..
Hiya,
I dont know if this can be done but i'd though i'd ask.
What I want to do is have a case statement query and if a 1 begin another action. if 0 dont do anything.
For Example
select CASE WHEN client.deathofdeath = yes THEN 1
do another select in here (which is another table)
Else 0 End AS DeathDate
From Client client
Can this be done?
I am trying to show all of the data in the 'status' column of my table but am having troubles. What am I doing wrong:
<?php
$query1 = "SELECT id, status FROM alerts WHERE customerid='".$_SESSION['customerid']."' ORDER BY id LIMIT $start, $limit ";
$result = mysql_query($query1);
while ($row = mysql_fetch_array($result))
{
echo $row['status'] ;
}
?>
I have some records in datastore, I want to delete a specific record from the table. for example in SQL , we use delete * from table1 where name ="mike" what is the equivalent code in java (I m using Eclipse with Google appengine API plugin)? or any other method to do that?
I would like to ask if there is a way to include the total number of rows, as an additional column, in the returned result sets from a TSQL query using also the Row_Number (SQL 2005) command.
For example, getting the results set from a query against Book table in a form similar to this:
RowNum BookId BookTitle TotalRows
--------------------------------------------
1 1056 Title1 5
2 1467 Title2 5
3 121 Title3 5
4 1789 Title4 5
5 789 Title5 5
With the following CSS, anchor links end up being hidden by the navigation bar.
What solution would you proposed to have the anchor link text being shown just under it?
/* style and size the navigation bar */
table.navigation#top
{
position: fixed;
margin-top: 0;
margin-bottom: 0;
top: 0;
left: 0;
z-index: 10;
}
thanks
I'm going to make a small application for a business that will be used locally for scanning, and storing documents in a database located on the local machine or on a machine located in the same LAN.
I could create a table called Users with username and password and according to the usertype ID show a form, or another form. But I'm more interested in the recommended approach by seasoned programmers.
Any advice?
I have a table with the following fields in MySQL: date, Value, Type.
Type can be either exports or imports. I want a query that returns the trade deficit (exports-imports) for each month. Is this possible with a single query?
I want my image wrapping with text align like this
--------------------
--------------------
_________ ----------
image |----------
|----------
|----------
_________|------<end>
I've tried text text text text .... but the result comes like this
_________
image |----------
|----------
|----------
_________|----------
-------------------
--------------------
What should I do without manual putting and without table ? (like align text first , then image and final , text) because all images and texts of my website will be fetched from the database.
Many thanks !!!
Hi all
I have a HTML table like below:
ColA ColB ColC ColD ColE ColF
Checked AAAA BBBB CCCC DDDD EEEE
Unchecked AAAA BBBB CCCC DDDD EEEE
Checked AAAA BBBB CCCC DDDD EEEE
Checked AAAA BBBB CCCC DDDD EEEE
Unchecked AAAA BBBB CCCC DDDD EEEE
Checked AAAA BBBB CCCC DDDD EEEE
Checked AAAA BBBB CCCC DDDD EEEE
ColA is a Check box. I want to get the ColD value of all rows whose ColA is Checked. I want to use the jquery to do it. Does anyone meet it before?
Best Regards,
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.
appendTo() causes flicker when it is inside $.each....
$.each(jsob.Table, function(i, employee) {
$('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category :</span> <span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis :</span> <span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary :</span> <span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address :</span> <span class="resultfieldvalues">' + employee.Address + '</span></div>').appendTo('#ResultsDiv');
});
Right now i am appending every new div to #ResultsDiv inside$.each is it good/bad to do so... If it is bad
What can be done to make my divs appendTo() after the loop so that i it wont flicker....
EDIT:(based on answer)
var divs = '';
$.each(jsob.Table, function(i, employee) {
divs += '<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category :</span> <span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis :</span> <span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary :</span> <span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address :</span> <span class="resultfieldvalues">' + employee.Address + '</span></div>';
});
$("#ResultsDiv").append(divs);
But that too doesn't stop the flicker...
Hi all,
I want to upload excel file using SqlBulkCopy into sql server 2005 table. My excel file size is 43MB. When i am uploading this file it will display error message that "The request filtering module is configured to deny a request that exceeds the request content length.".
My web.config file setting is
<httpRuntime executionTimeout="12000" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
Thanks in advance.
I am trying to import a text file into Access using a saved "Import Specification" in my access database using VBA. The import generates the Import Error table showing the errors in the last two fields. BUT if I use the same import specification manually to import the text file, the Import works perfect !!!!! Strange ..... why would they have different behavior ?
Here is the database and the text file
http://www.box.net/shared/ro7n3b7a77
My current query reads:
SELECT entry_id, user_id, cat_id, AVG( rating ) as avg_rate
FROM entry_rate
WHERE 1
GROUP BY entry_id
cat_id relates to different categories: 1, 2, 3 or 4
Is there a way I can find the maximum average for each user in each category without setting up an additional table? The return could potentially be 4 maximum avg_rate for each user_id
Visit the link below for example:
http://lh5.ggpht.com/_rvDQuhTddnc/S8Os_77qR9I/AAAAAAAAA2M/IPmzNeYjfCA/s800/table1.jpg
Take this simple query:
SELECT DATE_FORMAT(someDate, '%y-%m-%d') as formattedDay
FROM someTable
GROUP BY formatterDay
This will select rows from a table with only 1 row per date.
How do I ensure that the row selected per date is the earliest for that date, without doing an ordered subquery in the FROM?
Cheers
What are the differences between the two queries?
SELECT CountryMaster.Id
FROM Districts INNER JOIN
CountryMaster ON Districts.CountryId = CountryMaster.Id
SELECT CountryMaster.Id
FROM CountryMaster INNER JOIN
Districts ON Districts.CountryId = CountryMaster.Id
Please mind the
i) Table positions and second
ii) On Fields
As I know, output will be same. But I want to know, is there any drastic effects of the same if I neglect positions of tables and columns in complex queries or tables having tons of data like thousands and lakhs of rows...
Is there any good (eazy to understend, small - not lotof code lines) sample of working with google openid? (php) -
What I need is to see how to get users name from google openId ;
a good way of how to integrate openid into my current users DB (tooday in DB I have table user with name and pass)?
and how to get any Idea about if useris currently loged in from this computer with openId?
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).
Hi, does anyone know of a known method in PHP to auto connect to MySQL db/table in case an app is using multiple databases on multiple hosts?
Question 1: are there scripts around that allow to auto connect to necessary host/DB based on query?
Question 2: if above is not possible, is there a known approach to properly passing host/DB info to make sure app is properly connected before executing the query?
I was wondering if there was a way of adding javascript in every occurrence of a certain HTML tag, eg.
<td onmousedown="">
At the moment I just have it in every single one of my td tags in my table, but there must be a cleaner way. Something like adding javascript in the way CSS adds formatting.