Hello,
I have a table which logs the userid, course, sessionid and requestdate each time a webpage is loaded.
I want to calcuate the duration per userid for a given courseid.
It is problematic to do this due to overlapping timespans.
The data provided here should result in 10 minutes duration per user for course 1.
I can't seem to get ...
I am working on a one to many query for an assets database. Here is some sample data
Server Name Application Primary_User
Server1 SQL DBA
Server1 Citrix IT
Server1 Oracle DBA
Server2 Sharepoint Web
Server3 SQL ...
Hi,
I'm currently getting the error: "java.sql.SQLException: ORA-01843: not a valid month" which I assume is to do with the way I am setting a timestamp...
So I have a query like this :
select * from A_TABLE where A_TIMESTAMP_COL < '1252944840000'
But it doesn't work...and I don't want to have to convert it to a date ideally. Is the...
Traditionally most programming languages have priority of AND higher than priority of OR so that expression "a OR b AND c" is treated as "a OR (b AND c)". Following that idea search engines and query/addressing languages (css,xpath,sql,...) used the same prioritization. Wasn't it mistake ?
When dealing with large enough data, that prior...
Postgresql got enum support some time ago.
CREATE TYPE myenum AS ENUM (
'value1',
'value2',
);
How do I get all values specified in the enum with a query?
...
I have one table with specific columns, in that there is a column which contains comma separated values like test,exam,result,other.
I will pass a string like result,sample,unknown,extras as a parameter to the stored procedure. and then I want to get the related records by checking each and every phrase in this string.
For Example:
T...
Here is a statement in SubSonic which does a find using the strongly typed column ProductId:
var products = Product.Find(x => x.ProductID <= 10);
Is there a way to not use a strongly typed column name and instead specify the column name with a string literal like so:
var columnName = "SampleColumn";
var products = Product.Find(x => x...
I've 3 tables:
Parts: Name: internal name, Active: bool
Languages: list of languages (English, French, German, ....)
PartsTranslations: RealName and Id's of the other 2 tables.
I would like to get a list of Parts telling me the internal name, active status and how many translations are missing (total lang subtract translations made)...
SELECT problems . * , users.id AS new_user_id, users.nick AS nick
FROM problems, users
WHERE problems.deleted =0
AND problems.topic_id =1
AND problems.user_id = users.id
AND problems.id NOT
IN (
SELECT DISTINCT (problem_id)
FROM problems_attempted
WHERE user_id =1
AND total_questions = ( attempted_right + attempted_wrong + skippe...
I am using subsonic 2.2 with Oracle provider. I can use active record but my simple query does not work!
int record = new Select(VenApplication.ApplicationidColumn).From(VenApplication)().GetRecordCount();
The error that i got is
ORA-00923: FROM keyword not found where expected
Description: An unhandled exception occurred during the ...
hi
i writ thie query:
select Fname,Age*2 as Demo from Men where Demo = 5
i get error - ORA-00904 (Demo not identified )
how i can use it ?
thank's in advance
...
I have the following table in MySQL...
CREATE TABLE `visits` (
`id` int(10) unsigned NOT NULL auto_increment,
`visit` datetime NOT NULL default '0000-00-00 00:00:00',
`bulletin` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
)
Where "visit" is the time a visit occurs, and "bulletin" is the article requested at that time.
I...
This is for vbscript application.
Dim objRs
set objRs = server.CreateObject("ADODB.Recordset")
set objRs = objConn.Execute(sql)
When the sql statement got syntax error, it will cause the whole ASP page into error.
I want to do logging by performing the following:
When the query go into error, log the sql into a text file ...
I want to write a search query that search on the criteria like city, rent, area. i am new to database and sql queries. How to write query. Please help. Any suggestions will be highly appreciated. My form snapshot is here ->>
...
Hi,
Using MySQL Server, I have a table structure like:
(Table test)
id Name
1 "test1"
2 "test2"
3 "test3"
When I perform the following query: "Select name from test", the results are:
"test1"
"test2"
"test3"
How can I adjust this query so the results are columns, as such:
"test1" "test2" "test3"
...
I'm writing a Game Website, where the draw is a series of four digits. e.g 1234
I"m trying to write a query in django that will select all winners based on the four digits entered. winners are any combination of the same numbers or the same combination, 1 2 3 4, 2 3 1 4, 4 1 3 2 are all winners.
how is the most efficient way to write ...
I have a table called cartypes which currently has 2 fields: id & type. I am adding subtype and I want to move the contents after the dash - from the field called type and put those contents into subtype. Disposing of the dash (any extra whitespace too for that matter). What's the best SQL query for this?
before:
id type ...
Hello,
What I need to do is searching from companies and tags table and listing companies.
My table structure is as follows;
tags (tag_ID, tag)
tag_relation (tag_ID, company_ID)
companies (company_ID, company_name, company_description)
The query should be able to search both company info (name, description) and tags. If tag searched,...
Is there a command/SQL query to lock a particular table in MS SQL Server to stop all related transactions using ODBC?
...
Business World 1256987 monthly 10 2009-10-28
Business World 1256987 monthly 10 2009-09-23
Business World 1256987 monthly 10 2009-08-18
Linux 4 U 456734 monthly 25 2009-12-24
Linux 4 U 456734 monthly 25 2009-11-11
Linux 4 U 456734 monthly 25 2009-10-28
I get this result with the query:
...