can't change owner to partition table
i got error when i run exec sp_changeobjectowner 'testtable','dbo' 'testtable' table - Unable to modify table. The object with name "testtable" already exists. ...
i got error when i run exec sp_changeobjectowner 'testtable','dbo' 'testtable' table - Unable to modify table. The object with name "testtable" already exists. ...
Is MS SQL other than SQL Server ? ...
When does the below sql function can cause an exception other than NO DATA FOUND? v_ExchangeRate is of type float.The datatype of rate column is NUMBER(14, 10) and this column can not contain NULL values. BEGIN SELECT rate INTO v_ExchangeRate FROM exchange_rate WHERE currency_code = CurrencyCode AND status = 'A'; The data type ...
I need to give to a Criteria a list of string receive another one, the sql that makes this is: select loginName from SimpleUsers where loginName in ('admin', 'oscar', 'stig') but I need it in NHinbernate criteria, can anyone please help me with this ? ...
in ms-access i am running a macro that runs several queries, during the execution of a query a message box appears "you are about to run an update.......... are you sure you want to run this query ? " how can i automatically select for all such cases so that macro runs without human intervention. ...
Hi, I'm new to the SQL language and PostgreSQL. I was getting familiar with the language and was following a PostgreSQL tutorial until I got stuck at a chapter about Window Functions (link text. I created the exact same table 'empsalary' as shown in the example: wtouw=# SELECT * FROM empsalary; depname | empno | salary -----------...
I'm using Microsoft's SQL Server 2000 and have a query that is essentially this (except that Z is a further subquery, not a table): select A.key1, A.key2, B.value1 from A left join (select * from Z where value1 > 0) B on A.key1 = B.key1 and A.key2 = B.key2 order by A.key1, B.key1 Column value1 is of type float. For some reas...
Hi Guys, Does anybody know of a way to do an IN BOOLEAN MODE FULLTEXT query which does not reject stopwords? I want the query to return results for everything - 'a', 'the'... ...
Hi I support some very large databases (approaching a terabyte). We currently have an in-house reporting solution, but are investigating the use of SSRS (SQL Reporting Services). However our users sometimes need to extract large volumes of data (many millions of records), which may take a few hours to retrieve. What is an advisable app...
I want Microsoft SQL server queries corresponding to the following Oracle queries //get schema of a table desc tablename; //get the names of all tables select * from tab; ...
Hi I have a field which is varbinary. It has already been populated. Now how do i convert varbinary to varchar so that I can use the data in the field for some other purpose. I use a MySQL version 5.10 ...
How to Work Around COM+ System Configuration Check Failure in SQL Server Setup? ...
if you have table BankAccount that has a column Amount and the value for this column for a specific row can be modified by multiple threads at the same time so it could happen so that the last one to set the value will win. how do you usually handle this kind of situations ? UPDATE: I heard that in MSSQL there is update lock UPDLOCK th...
I have problems writing a SP in MySQL. From what I can read on the net the following should work, but it does not. I use Mysql v. 5.1.35 CREATE DEFINER=`My_Username`@`%` PROCEDURE `ChangePassword`(IN SPusername VARCHAR(100), IN SPoldPassword VARCHAR(100), IN SPnewPassword VARCHAR(100)) BEGIN IF EXISTS(SELECT Password_Hash ...
I am trying to do the following update in Oracle 10gR2: update (select voyage_port_id, voyage_id, arrival_date, port_seq, row_number() over (partition by voyage_id order by arrival_date) as new_seq from voyage_port) t set t.port_seq = t.new_seq Voyage_port_id is the primary key, voyage_id is a foreign key. I'm trying to assig...
I have several tables (to be exact, 7) tables I cross join in one another. This part gives me some problems; Table "Actions" ----------------------------------------- | ID | Package ID | Action Type | Message | ----------------------------------------- | 40 | 100340 | 0 | OK | | 41 | 100340 | 12 | Erro...
I get a strange behaviour when I combine impersonation with database links in SQL Server 2005. First, I connect to a database server using simple SQL Server Authentication with Login 'John'. On this server, a server link remote_sqlserver is defined. I already have SELECT privileges for mydb in this server. When I simply query a table on ...
I have an access database which has some sql queries loaded into it. I have no experience with microsoft access and need to know how I can see the sql queries it contains. My guess is they are somewhere in r_[sql name]? What I mean specifically is to see the query itself, for example there is a form which generates an output based on va...
I'm new to LINQ so apologies if this is a simple answer. I'm trying to do a SQL join and have the following code based on examples I've seen on SO and elsewhere: var query = from e in db.Events join ec in db.EventCategories on e.ID equals ec.EventID join c in db.Categories on ec.CategoryCode equals c.CategoryCode join ep in ...
Hello All, I couldn't solve that mistery question in SQL SERVER. Here an example that I tried to do and it didn't work. DECLARE @Total int; SET @Total = (SELECT COUNT(*)-10 FROM MYTABLE) SELECT TOP @Total IdColumn FROM MYTABLE How can I use the following query SELECT COUNT(*)-10 FROM MYTABLE as an integer variable, somewhere el...