Showing posts with label solutions. Show all posts
Showing posts with label solutions. Show all posts

Tuesday, March 20, 2012

A transport-level error has occurred when sending the request to the server

I've tried to search on the web for a solution for this error but i didn't find any working solutions for this problem. We have 2 servers. The first one is the server we use to develop our ASP.NET 2 application. On this server we don't have this error. On the other server (use by our client) we have this error sometime and i don't know why. Both servers have the same configuration and both application have the same web.config file.

I've tried to add a try-catch and retry the query when the error occured. This seems to be working but we don't want to have to change all our connections and since we don't have this problem on the other server we want to find the source of the problem.

Any idea ?

Thanks !

The most frequent cause of this error is restarting SQL Server. Another known cause is altering a database, e.g. from READ_ONLY to READ_WRITE, or taking a database offline/online.

Do any of these apply to your case?

Sunday, March 11, 2012

a sql issue....any solutions?

If i want to select antim_id from following table using query
Q1...which has all the missile_id values returned by another query Q2
.
For eg. if Q2 returns 100,300,400
my Q1 should return 3000...How to do it.? Will using ALL will help?
DEFUSE_CAPABILITY
+--+--+
| antim_id | missile_id |
+--+--+
| 1000 | 100 |
| 1000 | 200 |
| 2000 | 100 |
| 2000 | 200 |
| 2000 | 300 |
| 3000 | 100 |
| 3000 | 200 |
| 3000 | 300 |
| 3000 | 400 |
| 3000 | 500 |
+--+--+
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Programming...54.h
tml
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz
.com/eform.php?p=769680SELECT D.antim_id
FROM defuse_capability AS D
JOIN (SELECT missile_id FROM Q2) AS Q2
ON D.missile_id = Q2.missile_id
GROUP BY D.antim_id
HAVING COUNT(*)=
(SELECT COUNT(*)
FROM Q2)
David Portas
SQL Server MVP
--|||That's relational division:
http://www.examnotes.net/gurus/articles/113.asp
Jacco Schalkwijk
SQL Server MVP
"bishu" <UseLinkToEmail@.dbForumz.com> wrote in message
news:4_769680_998784ccb95151a62f2e182992
e143ac@.dbforumz.com...
> If i want to select antim_id from following table using query
> Q1...which has all the missile_id values returned by another query Q2
> .
> For eg. if Q2 returns 100,300,400
> my Q1 should return 3000...How to do it.? Will using ALL will help?
> DEFUSE_CAPABILITY
> +--+--+
> | antim_id | missile_id |
> +--+--+
> | 1000 | 100 |
> | 1000 | 200 |
> | 2000 | 100 |
> | 2000 | 200 |
> | 2000 | 300 |
> | 3000 | 100 |
> | 3000 | 200 |
> | 3000 | 300 |
> | 3000 | 400 |
> | 3000 | 500 |
> +--+--+
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL:
> http://www.dbforumz.com/Programming...pict223454.html
> Visit Topic URL to contact author (reg. req'd). Report abuse:
> http://www.dbforumz.com/eform.php?p=769680|||"David Portas" wrote:
> SELECT D.antim_id
> FROM defuse_capability AS D
> JOIN (SELECT missile_id FROM Q2) AS Q2
> ON D.missile_id = Q2.missile_id
> GROUP BY D.antim_id
> HAVING COUNT(*)=
> (SELECT COUNT(*)
> FROM Q2)
> --
> David Portas
> SQL Server MVP
> --
Same problem i am simplifying...
David can you translate your sql query so that i can understand
better.
In the emp table if i want to select emp_id which has all the
account_id in accounts what is the select statement i need to write.
for eg : if account_id {100,300,400} then my output should be 3000
if account_id {100,200} - op is 1000,2000,3000
if account_id {100,300} - op is 2000,3000
table:emp
+--+--+
| empid_id | account |
+--+--+
| 1000 | 100 |
| 1000 | 200 |
| 2000 | 100 |
| 2000 | 200 |
| 2000 | 300 |
| 3000 | 100 |
| 3000 | 200 |
| 3000 | 300 |
| 3000 | 400 |
| 3000 | 500 |
+--+--+
table : account
+--+
| account_id |
+--+
| 100 |
| 300 |
| 400 |
+--+
can u just let me know the solution..
thanks a lot
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Programming...54.h
tml
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz
.com/eform.php?p=769869|||In my original query just replace defuse_capability with Emp and Q2
with Account.
David Portas
SQL Server MVP
--

Monday, February 13, 2012

a little SQL problem

I have what is probably a simple problem and I guess I'm just looking
for whatever solutions you all can suggest...
I have this query:
Select columnA , sum(columnB) as VAL from myTable where
columnA in ('01,'02') group by columnA
which may return:
columnA VAL
-- --
01 100.00
02 200.00
Just using SQL, I'd like to return a table that looks like:
columnA VAL
-- --
01 300.00
and I don't want to use the query:
Select '01', sum(columnB) as VAL from myTable where
columnA in ('01','02')
Any suggestions? Your help is much appreciated.
Marcbrownjenkn@.aol.com wrote:
> I have what is probably a simple problem and I guess I'm just looking
> for whatever solutions you all can suggest...
> I have this query:
> Select columnA , sum(columnB) as VAL from myTable where
> columnA in ('01,'02') group by columnA
> which may return:
> columnA VAL
> -- --
> 01 100.00
> 02 200.00
> Just using SQL, I'd like to return a table that looks like:
> columnA VAL
> -- --
> 01 300.00
>
> and I don't want to use the query:
> Select '01', sum(columnB) as VAL from myTable where
> columnA in ('01','02')
> Any suggestions? Your help is much appreciated.
> Marc
Maybe like this:
SELECT MIN(columnA) AS columnA, SUM(columnB) AS val
FROM myTable
WHERE columnA IN ('01','02');
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--