|
I can not create database when using Database Configuration Assistant (Oracle 12.1.0).
IMAGE ERROR DESCRIPTION
Help me! Please..
|
|
|
|
|
Do you have McAffee virus on you computer? Deactivate it!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
|
..and what does the log message say?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
sorry, where i can find log error file in oracle 12c?
|
|
|
|
|
Try the one mentioned in the error.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have the following SQL table,
ID LogDate Name Department
-----------------------------------------------
1 3/26/2015 7:55 AM Adam HR
2 3/26/2015 7:53 AM Tony Fin
3 3/26/2015 7:59 AM Mark Mang
1 3/26/2015 8:15 AM Adam HR
3 3/26/2015 8:10 AM Mark Mang
2 3/26/2015 7:53 AM Tony Fin
i like to get this output
ID LogDate Name Department
-------------------------------------------------
2 3/26/2015 7:53 AM Tony Fin
1 3/26/2015 7:55 AM Adam HR
3 3/26/2015 7:59 AM Mark Mang
i want to get a single record for each user ordered by min LogDate.
my table name is "DeviceLogs"
|
|
|
|
|
A simple solution would be,
SELECT TOP 1 * FROM DeviceLogs ORDER BY LogDate;
Which will select the top 1 record from your records, ordering them by your column containing LogData, you can add or remove DESC at the end of the ORDER BY clause if it returns the opposite side and so on.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
then is selects just a single record.
i want records of all users to be selected but without repeating.
if userid 1 has more than one log then just select earliest record for user id 1 and ignore other records for him.
|
|
|
|
|
Then you should group your records using GROUP BY clause over your LogTime column.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
SELECT * FROM DeviceLogs GROUP BY LogDate
this gives me error "because it is not contained in either an aggregate function or the GROUP BY clause"
|
|
|
|
|
Well you select all columns and group by LogDate.
Group by makes a single row out of all the rows that have the same LogDate in this example.
But what information is it supposed to put in ?
That's what aggregate functions are for.
However I think you should group by name, where LogDate=the day you want to select by.
You could also group by LogDate and name.
Anything that isn't in group by must be in an aggregate function.
So you have to decide which time you want to have selected (from what I deducted, first log ? ).
A bit unrelated to your question, but why do you have ID's that repeat ?
|
|
|
|
|
Are your Logdates varchars?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Would this help?
SELECT ID, MIN(LogDate) AS LogDate, Name, Department
FROM yourtable
GROUP BY ID, Name, Department;
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
SELECT d.ID, d.LogDate, d.Name, d.Department
FROM DeviceLogs d, (SELECT MIN(LogDate) FROM DeviceLogs GROUP BY Name) s
WHERE s.MIN(LogDate) = d.LogDate
ORDER BY d.LogDate;
SELECT ID, MIN(LogDate) AS LogDate, Name, Department
FROM yourtable
GROUP BY ID, Name, Department;
|
|
|
|
|
|
Hi All,
I have written a small sql script to drop a table and recreate it but it is failing, I tried to drop all existing indexes on the table and column then trying to drop the column, but still fails by saying there is one constraint that's missing, and I don't know why but that constraint doesn't exist in database.
Here is the script that I am writing
DECLARE @ConstraintName nvarchar(200);
DECLARE @TableName nvarchar(500)='ApplicationData';
DECLARE @ColumnName nvarchar(500)='ReportingFpl';
SET NOCOUNT ON
SET xact_abort ON
WHILE 0=0 BEGIN
SET @constraintName = (
SELECT TOP 1 constraint_name
FROM information_schema.constraint_column_usage
WHERE table_name = @tableName and column_name = @columnName );
IF @constraintName is null BREAK;
EXEC ('alter table "'+@tableName+'" drop constraint "'+@constraintName+'"');
END
ALTER TABLE dbo.ApplicationData DROP COLUMN ReportingFpl;
GO
Error Message
Msg 5074, Level 16, State 1, Line 16
The index 'IX_ApplicationData_ApplicationId-ReportingFpl_PriorityPoints-ContractorPriorityPoints' is dependent on column 'ReportingFpl'.
Msg 4922, Level 16, State 9, Line 16
ALTER TABLE DROP COLUMN ReportingFpl failed because one or more objects access this column.
But the constraint 'IX_ApplicationData_ApplicationId-ReportingFpl_PriorityPoints-ContractorPriorityPoints' doesn't exist in the constraint table at all.
Can anybody please help me in resolving this issue, any link, any suggestion or code snippet helps greatly.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Hello sir,
I have dedicated server with 8 Gb RAM.I have developed the CRM when multiple user working at a time Sql server working very slow task is going on suspended.
Sql server 2008 R2 Express Edition
Database Size=6Gb
Maximum Memory=2147483647 Mb
Minimum Memory Per query=1024 kb
Pls.... suggest
|
|
|
|
|
Is it a 64-bit version? Using a 64-bit OS?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes it's 64 bit OS and Microsoft SQL Server Express Edition with Advanced Services (64-bit)
|
|
|
|
|
How did you determine it is "slow"?
Do you have an example query executed on the database-server itself?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
When multiple user working at a time.Maximum task is suspended for this reason sql fetch data very slow.
|
|
|
|
|
1. Check for min and max memory configuration
2. Check is your procedure is creating any locks
Krishna Murthy G
|
|
|
|
|
Sql server
Maximum Memory=2147483647 Mb
Manimum Memory=0 Mb
Minimum Memory Per query=1024 kb
and procedure is not creating any locks.
|
|
|
|
|
How many users? If they're all hitting a large table without index, then I'd expect it to perform slowly. Can you give us an example of a typical query that is slow?
How many of those are reads and how many updates/inserts? The latter does create a lock, and would require updating of the index.
Needs more details
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|