|
Hi,
The only privilege I assigned to a newly created user "U" was CREATE SESSION, then I had to assign DBA to it and create a test table then I revoked the DBA Role from the SYS user, now it shows me that the only privilege and role I have for this user is CREATE SESSION
SQL> SELECT PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE = 'U';
PRIVILEGE
----------------------------------------
CREATE SESSION
SQL> SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'U';
no rows selected
SQL>
why can I still select, update and delete that table though I didnt grant this privileges to this table and how can I revoke something I didnt even granted??
Please help guys
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Evryone
I have 2 Oracle Question
1. Is somone know good manual for install Oracle on my Computer ?
2. Is somone know How to transfer my SQL server database to Oracle ?
thank's for any help
|
|
|
|
|
Hi friends.
I am using Ms-Access and following query does not work:
"CREATE TABLE MyTable as Select * from MasterTable"
or give me another solution if it is not possible.
Thank you in Advance
(Riaz)
|
|
|
|
|
try
SELECT * INTO myTable<br />
FROM MasterTable
|
|
|
|
|
Yes, this will create the table, but will also copy over the records from MasterTable into myTable.
Instead, try
SELECT * INTO myTable FROM MasterTable where false<br />
The above will only copy the structure of the table
HTH
|
|
|
|
|
Hi,
in my database table having different type of languages like
id uname
1 Évian-les-Bains
2 Évreux
3 Eysines
4 Île d?Aix
5 L?Isle-d?Abeau
can i get uname values in to english language using select query
thanks in advance
icanmakeiteasy
|
|
|
|
|
whether you try following query?
select id, uname as [english language] from tableName
|
|
|
|
|
icanmakeiteasy wrote: can i get uname values in to english language using select query
Do you mean translate to English? If so, then I don't think that is possible.
|
|
|
|
|
Hey,
How can I change dataType of a coloum with quert and witout loosing its records?
Best wishes
|
|
|
|
|
|
Good Day All
I have the Following SP
ALTER PROC GET_BASED_PATTERN
(
@SUBJECT VARCHAR(30),
@Pattern nvarchar(128) output
)
AS
SET @Pattern = (SELECT TOP 1 TERM.[CYCLETEMPLATES]FROM tbl_term TERM
INNER JOIN dbo.TBL_ACTV v
on TERM.ID = V.TERM
INNER JOIN DBO._Subjects S
ON V.TERM = S.[LEVEL]
WHERE CODE = @SUBJECT)
SELECT
CASE
WHEN LEN(@Pattern) > 1 THEN @Pattern
ELSE '00000000'
END
It returns
00000000
and NUll at the Bottom if the len is not greater than 1. i want it to return 00000000 if its like that.
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Not sure what you need but if you want to get the same value in both the places, here's a way:
SET @Pattern = (SELECT TOP 1 TERM.[CYCLETEMPLATES]FROM tbl_term TERM
INNER JOIN dbo.TBL_ACTV v
on TERM.ID = V.TERM
INNER JOIN DBO._Subjects S
ON V.TERM = S.[LEVEL]
WHERE CODE = @SUBJECT)
IF @Pattern is null Set @Pattern = '00000000'
Select @Pattern
Hope that helps.
Regards,
Syed Mehroz Alam
My Blog
My Articles
Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein
|
|
|
|
|
Hi,
Is it possible to append more conditions to a WHERE clause dependant on a condition? This is what i'm trying to do at the moment with no joy.
E.G.
...
WHERE
(@extOrderID IS NULL OR Orders.ExtOrderID = @extOrderID) AND
(@orderDateAfter IS NULL AND @orderDateBefore IS NULL OR Orders.TimeOrdered >= @orderDateAfter AND Orders.TimeOrdered <= @orderDateBefore) AND
(@requiredDispatchDateAfter IS NULL AND @requiredDispatchDateBefore IS NULL OR (DATEADD(day, (SELECT SLA FROM Product WHERE Product.ID = OrderItem.ProductID), Orders.TimeOrdered)) >= @requiredDispatchDateAfter AND (DATEADD(day, (SELECT SLA FROM Product WHERE Product.ID = OrderItem.ProductID), Orders.TimeOrdered)) <= @requiredDispatchDateBefore) AND
(@customerForename IS NULL OR Customer.Forename LIKE @customerForename) AND
(@customerSurname IS NULL OR Customer.Surname LIKE @customerSurname) AND
(@customerPostCode IS NULL OR Address.PostCode LIKE @customerPostCode) AND
CASE WHEN @orderStatus IS NOT NULL THEN
CASE WHEN @statusChecked = 'False' AND Status.StatusName != @orderStatus THEN 1
WHEN @statusChecked = 'True' AND Status.StatusName = @orderStatus THEN 1
ELSE 0
END
END <> 0
AND
CASE WHEN @isSearch = 1 THEN
Orders.IsActive = 1
END
It is the last CASE which is not working, any suggestions would be appreciated!
Phil
|
|
|
|
|
Are you meaning that when @isSearch = 1 then Order.IsActive must equal 1 to return the row?
If so, no you can't do that, but you could do this
AND (@isSearch = 0 or Orders.IsActive = 1)
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Are you meaning that when @isSearch = 1 then Order.IsActive must equal 1 to return the row?
Yes that is what I meant, can you think of possibly another way then of how I could dynamically create my where clause based on the parameters passed. I have found away to do this but it involves using an IF to see if @isSearch = 0 and then having the same query but with Order.IsActive = 1 on the end of one of them. Obviously I'd prefer to not do this as I'm just repeating code.
|
|
|
|
|
The clause in my previous post will do it.
Regards,
Rob Philpott.
|
|
|
|
|
The only reaslistic alternative is to use dynamic SQL (sql strings) but that is plain ugly.
Also chaining multiple conditionals can nail a query to the wall. What I often do is use the "required" conditions to get a subset into a temp table and then start deleting records from the temp table or use the conditional filtering on the temp table
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
in oracle we can call a function like this in stored procedure
create or replace procdeure getitems
(
item in varchar2
)
begin
item :=getitems(sysdate);
end;
but how the function is called in sql server 2005 in an sp
|
|
|
|
|
lakshmichawala wrote:
but how the function is called in sql server 2005 in an sp
It all depends what your function returns.
If your function returns a scalar value then you can use the function as
select dbo.getitem(itemid) from Items
or if your function returns a table then you can do some thing like this,
select item_code,item_desc from dbo.getitems(getdate())
hope that helps....
When you fail to plan, you are planning to fail.
|
|
|
|
|
hi
we can also assing like this na
set @item =dbo.getitems(getdate())
|
|
|
|
|
Hi evryone
Is it posible to install Oracle 10G on Windows XP ?
I try to install and the installation stuck in "Ocacle Database Configuration Assistant"
|
|
|
|
|
E_Gold wrote: Is it posible to install Oracle 10G on Windows XP ?
Runs fine on my XP system.
E_Gold wrote: I try to install and the installation stuck in "Ocacle Database Configuration Assistant"
No error message?
I are troll
|
|
|
|
|
I have also installed without any problem
i think you need to re-install windows xp.
|
|
|
|
|
Hi all,
I have implemented a functionality shown here[^] on codeproject.
This method generates xml from ntext and inserts it into table.
Now i want a trigger on this table which inserts in other table when each row is inserted.But the problem is that when the trigger fires, the inserted table contains all the rows that are inserted in the table (i guess since it was inserted all at once) and hence i m not able to insert it in other table bcas i have to perform some operation on the data also.
Is there a method so that the trigger fires for each row and not all at once????
When you fail to plan, you are planning to fail.
|
|
|
|
|
I have not used openxml so I am assuming a bulk insert is used and the trigger is by passed (I also never, ever use triggers). So why not grab the Details ID, insert the records, get the last ID inserted, call a proc for the detail between. Ugly and subject to other user interference.
OR
Don't use openxml - I am surprised the insert does not fire the insert trigger
Never underestimate the power of human stupidity
RAH
|
|
|
|