Cannot use the ROLLBACK statement within an INSERT-EXEC statement
I am using two stored procedures. the first sp returns some int value
I am using this in the second sp with INSERT EXEC
But when i am executing the second sp , I am getting the above error
Please help
...
I am using PostgreSQL database. I have the data like below.
id name1 name2 modified_date
- - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40 Balfe | Pat | 2010-10-01 17:48:44.804823
41 Battigan | David | ...
I have a database generated page which shows lots of links.
This page consists of 3 colums. In the first column, it gets the links from the database. In the second column it generated + links, and in the last column, it generated a - link
So basically, each row generated consists of a url link, a + link and a - link.
When the user ...
Recently I faced an interview and I was asked the above question.
I was dumb when I think about it.
Interviewer said:
All people are saying views have lots
of advantages but I find no
disadvantages, why so?
EDIT
Based on the answers of all experts, I think I can summarize it:
When table is dropped or modified, view become...
Is there any way to do something like this:
var keywords = SearchUtilities.FindKeyWords(q);
var j = (from p in _dataContext.Jobs
orderby p.JobKeywords.Select(jobKeyword => jobKeyword.Keyword)
.Intersect(keywords).Count())
.Take(10).AsEnumerable();
The main idea here is to order search results by the co...
Hi,
I have to write a Stored Procedure to delete record from a table.
I have a memory table "tableids" where I store all the ids to delete from another table, say "addresses".
CREATE TABLE `tempids` (
`id` INT(11) NULL DEFAULT NULL
)
COLLATE='latin1_swedish_ci'
ENGINE=MEMORY
ROW_FORMAT=DEFAULT
I could do this:
DELETE FROM addr...
Hi,
How to use CREATE LOGIN statement on SQL Server 2005?
I was trying nearly everything, with commas, without them, with strings, without them etc.
CREATE LOGIN @loginame WITH PASSWORD = 'pass', DEFAULT_DATABASE='dbname' DEFAULT_LANGUAGE='us_english', CHECK_POLICY= OFF;
I always get below error:
Incorrect syntax near the keyword '...
I've got a rather tricky problem that I've been trying to solve for the past few days. I am currently solving it with the Oracle SQL Model clause and could probably have written a function but I'm looking for a nice simple solution using analytic functions or something but can't figure anything out.
For a given policy (ddpsid), I want t...
I am using a DomainService with .NET4, EF4. It is working from my local SQL Server, when I change the connection string to the remote SQL server which has the same schema and data in it, shallow queries run normally.
When a query which contains .Include("child_table_name") in the ObjectQuery and [IncludeAttribute] on the entity property...
I have two tables:
A:
[ date,
step,
status,
... ]
B:
[ date,
step,
name,
... ]
I want to get result in form of
[date, step, name]
based on status parameter. I can easly get data from table A using following query:
Select date, step From A Where status='1'
and the result would be like:
1. 2010-09-12; 5
2. 2010-09-13; 3...
How to make transaction using IB Expert? I need a manual or something like
begin transaction
create table someTable(a int,b int)
insert into someTable values(1,2)
insert into someTable values(3,4)
commit transaction
but working in Firebird to see the syntax.
...
In a SQL Server database I've two tables: Job and JobKeyword. Each Job has JobKeywords. I'm trying to learn how to use Full Text Search.
How can I get a list of all jobs in the databases, ordered by shared keywords between the search query and the jobs?
...
Hi,
I want to change the type of a column in MS SQL Server 2005, but before i change the type of that column i want to check if that column is of the type i want to change. How can i do that in SQL?
Thanxs,
Bas Hendriks.
Based on the anwser i wrote the following query that did the trick:
IF NOT EXISTS (SELECT *
FR...
I have a view created from many tables with multiple fields.
When I issue a WHERE filter on the View, are the table's indexes in use?
...
The following query does not work, and produces an error:
A transport-level error has occurred when receiving results from the server
SELECT
*
FROM
table1 a,
table2 b,
table3 c
WHERE
a.location = b.location AND
b.location = c.location AND
a.id = c.id AND
a.entry = ''34690''
Although this ...
Hi
Am trying to get linq to call a stored procedure. I know this is usually rather simple, but in this case i am using my own Custom Entity Classes and I am at a dead end.
the link below will show you how I have my OM setup
example
does any one know how you can call a stored procedure from your own Custom Entity Class?
EDIT:
Forg...
Can anybody please tell me how to write query to update top 1 record in table ?
Thanks
...
Ok SQL and Oracle gurus I have a somewhat complicated query that I'm trying to build.
Here is my current query:
select distinct person_info.person_name
table2.value,
table3.value,
table4.value,
table5.value
from person_info
left join table2 on table2.person_name=person_info.person_name
left join table3 on ta...
I have 12 queries to run, but can not run at the same time. I would like to start the first query, then as soon as it completes the next query begins, when it completes the third query starts and so on. Want this to be automatic. Each query writes a txt file. Thanks
...
I have a column called <locations>, I want to find all matching values (ex: Canada) and replace with a different value (ex: Mexico).
How do I go about that?
Thanks.
...