Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Friday, March 30, 2012

Problem running Proc from Job

I have a stored procedure that runs fine using the Query Analyzer:

exec sp_ProcessRecords

However, when I create a job to run the stored proc once an hour, the job fails, with the following message:

Executed as user: sa. String or binary data would be truncated. [SQLSTATE 22001] (Error 8152) The statement has been terminated. [SQLSTATE 01000] (Error 3621). The step failed.

I don't think it's a permission problem, since the job runs as sa.

I don't understand why it would work if I run it manually, but not when it runs as a job.

Any help would be greatly appreciated.Check your parameters that are being passed to the stored procedure. This means that some parameter that is being passed it too long for the datatype and will be truncated.|||Originally posted by rnealejr
Check your parameters that are being passed to the stored procedure. This means that some parameter that is being passed it too long for the datatype and will be truncated.

Unfortunately, the stored proc called from the job does not take any parameters.

The odd thing is that the stored proc will work fine if it is run manually from the Query Analyzer. The error only occurs when the proc is run from the job, using the exact syntax!

I'm at a loss...|||Can you post the stored proc code - or describe what it is doing ? If you are doing inserts/updates then the same problem can occur.sql

Problem running multiple SP's

Hello,
I have two SP that are similar to the one below. When trying to run both of
them through Query analyzer the first one will execute properly but the
second one will say that it executed but doesn't really update any fields.
The only difference between the two is the name of the table that gets
updated and the number of tests. If I run either one independently through
there own query windows they both work.
TIA for any help.
CREATE PROCEDURE [dbo].[sp_UpdateRF] AS
-- Update RF Grades
DECLARE @.TestName VARCHAR(30)
DECLARE @.TestGrade CHAR(10)
DECLARE @.Employee_ID char(7)
DECLARE curRF CURSOR FOR SELECT TestName, TestGrade, Import.Employee_ID
FROM Import, RF
WHERE Import.Employee_ID = RF.Employee_ID
AND SUBSTRING(TestName, 1, 1)= '5'
OPEN curRF
WHILE @.@.FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM curRF INTO @.TestName, @.TestGrade, @.Employee_ID
IF SUBSTRING(@.TestName, 3, 1) = '1'
BEGIN
UPDATE RF
SET RF.[1] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[1] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = '2'
BEGIN
UPDATE RF
SET RF.[2] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[2] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = '3'
BEGIN
UPDATE RF
SET RF.[3] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[3] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = '4'
BEGIN
UPDATE RF
SET RF.[4] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[4] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = '5'
BEGIN
UPDATE RF
SET RF.[5] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[5] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = '6'
BEGIN
UPDATE RF
SET RF.[6] = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
AND RF.[6] IS NULL
END
IF SUBSTRING(@.TestName, 3, 1) = 'F'
BEGIN
UPDATE RF
SET RF.F = @.TestGrade
WHERE @.Employee_ID = RF.Employee_ID
END
END
CLOSE curRF
DEALLOCATE curRF
GOOn Thu, 25 Aug 2005 15:14:47 -0700, XImhotep wrote:

>Hello,
>I have two SP that are similar to the one below. When trying to run both of
>them through Query analyzer the first one will execute properly but the
>second one will say that it executed but doesn't really update any fields.
>The only difference between the two is the name of the table that gets
>updated and the number of tests. If I run either one independently through
>there own query windows they both work.
>TIA for any help.
Hi XImhotep,
The problem is that you have some statements in the wrong order. You
should always have a FETCH _before_ testing @.@.FETCH_STATUS. If you don't
have a fetch before that, you'll end up testing the last fetch status of
the previously executed cursor.
The proper order of events is
DECLARE CURSOR
OPEN CURSOR
FETCH FIRST
WHILE @.@.FETCH_STATUS = 0
BEGIN
-- do something
FETCH NEXT
END
CLOSE CURSOR
DEALLOCATE CURSOR
However, most cursors are not needed at all. In 99% of the situations, a
set-based alternative will be faster, shorter, easier to read and hence
easier to maintain.
Your post doesn't reveal enough of your tables to make it worth an
attempt at rewriting it. However, if you post more information about
this, I'll be happy to have a look (and many others will too). See
www.aspfaq.com/5006 for an explanation of the information you should
provide if you s help.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||XImhotep wrote:
> Hello,
> I have two SP that are similar to the one below. When trying to run
> both of them through Query analyzer the first one will execute
> properly but the second one will say that it executed but doesn't
> <SNIP>
Try adding some debug code to the procedures and see if they are both
running the updates. Also, how are you executing the two procedures? Do
you have two EXEC statements in the same QA window that are being
executed as a batch?
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Thanks for the help. I missed the fetch statement at the bottom. Everyhting
is working now.
Thanks again.
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:08isg1lm0qc9s5f8001gd2relr27k9s568@.
4ax.com...
> On Thu, 25 Aug 2005 15:14:47 -0700, XImhotep wrote:
>
> Hi XImhotep,
> The problem is that you have some statements in the wrong order. You
> should always have a FETCH _before_ testing @.@.FETCH_STATUS. If you don't
> have a fetch before that, you'll end up testing the last fetch status of
> the previously executed cursor.
> The proper order of events is
> DECLARE CURSOR
> OPEN CURSOR
> FETCH FIRST
> WHILE @.@.FETCH_STATUS = 0
> BEGIN
> -- do something
> FETCH NEXT
> END
> CLOSE CURSOR
> DEALLOCATE CURSOR
> However, most cursors are not needed at all. In 99% of the situations, a
> set-based alternative will be faster, shorter, easier to read and hence
> easier to maintain.
> Your post doesn't reveal enough of your tables to make it worth an
> attempt at rewriting it. However, if you post more information about
> this, I'll be happy to have a look (and many others will too). See
> www.aspfaq.com/5006 for an explanation of the information you should
> provide if you s help.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)

Problem returning two values from stored procedures

Hi, i am trying to return two values from SQL 2000 using a single stored procedure. The stored working fine in Query Analyser and returns the two values and two grids in the results window.

My problem is that when i execute the stored procedure using ADO.Net the dataset only has one of the values. e.g TId : 2, where it should read 'TId' : 2, 'ConfigPath': 'C:\blah'

Please could anyone shed ligth on this problem?

here the code for the stored procedure:

CREATE PROCEDURE dbo.GetTillInfo
(
@.TillIdR varchar(50),
@.Password varchar(50)
)
AS

declare @.TillId int
declare @.configpath varchar(150)

IF Exists (SELECT Id FROM Tills WHERE TillRef=@.TillId and TillPassword=@.Password)
BEGIN

set @.TillIdR = (SELECT Id FROM Tills WHERE TillRef=@.TillId and TillPassword=@.Password)
select @.TillIdR as 'TId'

set @.configpath = (SELECT configpath from customer,tills where
tills.customerid = customer.id and tills.id = @.login)
select @.configpath as 'ConfigPath'
END
ELSE
BEGIN
set @.TillIdR = 0
select @.TillIdR as 'TId'
set @.configpath =''
select @.configpath as 'ConfigPath'
END
GOOff the top of my head, the two results may be returned but in two tables as you are performing two selects.

To get round this you could change your select query to return the two values like:-


IF ...
set @.TillIdR = (SELECT Id FROM Tills WHERE TillRef=@.TillId and TillPassword=@.Password)
set @.configpath = (SELECT configpath from customer,tills where
tills.customerid = customer.id and tills.id = @.login)

select @.TillIdR as 'TId', @.configpath as 'ConfigPath'
END
ELSE
BEGIN
set @.TillIdR = 0
set @.configpath =''
select @.TillIdR as 'TId', @.configpath as 'ConfigPath'
END
GO

This is off the top of my head at work - you may have to play with the stored proc.

Rob

Monday, March 26, 2012

Problem referencing a column in a Table Variable in a query.

Hello All

I have the following problem running an sp with a table variable (sql server 2000) - the error which occurs at the end of the query is: "must declare the variable @.THeader" . @.THeader is the name of the variable table and the error occurs with such references as @.THeader.ApplyAmt, @.THeader.TransactionHeaderID, etc.

declare @.THeader TABLE (
TransactionHeaderID [int] NOT NULL ,
PatientID [int] NOT NULL ,
TransactionAllocationAmount [money] NOT NULL ,
ApplyAmt [money] NULL ) - create table variable

insert into @.THeader select TransactionHeaderID,PatientID,TransactionAllocationAmount,ApplyAmt from mtblTransactionHeader where PatientID = 9 - fill the table variable

UPDATE @.THeader
set TransactionAllocationAmount =
(SELECT isnull(Sum(mtblTransactionAllocation.Amount),0)
FROM mtblTransactionAllocation where mtblTransactionAllocation.DRID = TransactionHeaderID or
mtblTransactionAllocation.CRID = TransactionHeaderID) from @.THeader, mtblTransactionAllocation - do the updates on the table variable

Update @.THeader
set ApplyAmt = (SELECT mtblTransactionAllocation.Amount
FROM mtblTransactionAllocation where mtblTransactionAllocation.DRID = TransactionHeaderID and
mtblTransactionAllocation.CRID = 187 and PatientID = 9) from @.THeader, mtblTransactionAllocation - do the updates on the table variable

- below is where the problems occur. It occurs with statements referencing columns in the table variable, i.e. @.THeader.ApplyAmt

UPDATE mtblTransactionHeader
SET mtblTransactionHeader.TransactionAllocationAmount = @.THeader.TransactionAllocationAmount,
mtblTransactionHeader.ApplyAmt = @.THeader.ApplyAmt
FROM @.THeader, mtblTransactionHeader
WHERE @.THeader.TransactionHeaderID = mtblTransactionHeader.TransactionHeaderID - put the values back into original table

Thanks in advance

smHaig

Try adding an alias to @.THeader

UPDATE mtblTransactionHeader
SET mtblTransactionHeader.TransactionAllocationAmount = t.TransactionAllocationAmount,
mtblTransactionHeader.ApplyAmt = t.ApplyAmt
FROM @.THeader t, mtblTransactionHeader
WHERE t.TransactionHeaderID = mtblTransactionHeader.TransactionHeaderID -- put the values back into original table

Friday, March 23, 2012

problem queryplan xml template query

Hi,
I use a xsd schema to load XML with a complex structure from a database for
using it in an ASP webpage. Somehow the database uses quite a long time to
make a query plan for the template. The second time the template is used the
database responses quickly, also for other data (using other selection
criteria).
The queryplan is lost when there are no calls for some time, or when a small
change is made to de database stucture, so the next time the ASP page is
called users receive a timeout error.
I have checked all the relevant indexes from the tables that are used for
creating the XML.
Is there any way to influence the speed/persistance of the queryplan that is
created for a xml template query?
Any help will be appreceated,
Albert JanI don't think there is. What is happening is that the first time the query
is compiled and then cached. If you don't run it for a while, the query plan
will be purged from the cache and the query will be recompiled. The only way
to "persist" the plan is to write the FOR XML EXPLICIT mode query inside a
stored proc and call the stored proc. You can use the SQL Profiler to see
what the query is that is being generated.
Best regards
Michael
"Albert Jan" <awonnink@.hotmail.com> wrote in message
news:O$EwS3POFHA.4028@.tk2msftngp13.phx.gbl...
> Hi,
> I use a xsd schema to load XML with a complex structure from a database
> for
> using it in an ASP webpage. Somehow the database uses quite a long time to
> make a query plan for the template. The second time the template is used
> the
> database responses quickly, also for other data (using other selection
> criteria).
> The queryplan is lost when there are no calls for some time, or when a
> small
> change is made to de database stucture, so the next time the ASP page is
> called users receive a timeout error.
> I have checked all the relevant indexes from the tables that are used for
> creating the XML.
> Is there any way to influence the speed/persistance of the queryplan that
> is
> created for a xml template query?
> Any help will be appreceated,
> Albert Jan
>|||Hi Michael,
I had hoped I woudn't have to redesign the solution, because I like the
technique using the template query. But maybe I'll just have to.
Thank you for your answer.
Albert Jan
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:emXkJcUOFHA.3808@.TK2MSFTNGP14.phx.gbl...
> I don't think there is. What is happening is that the first time the query
> is compiled and then cached. If you don't run it for a while, the query
plan
> will be purged from the cache and the query will be recompiled. The only
way
> to "persist" the plan is to write the FOR XML EXPLICIT mode query inside a
> stored proc and call the stored proc. You can use the SQL Profiler to see
> what the query is that is being generated.
> Best regards
> Michael
> "Albert Jan" <awonnink@.hotmail.com> wrote in message
> news:O$EwS3POFHA.4028@.tk2msftngp13.phx.gbl...
to
for
that
>
>

problem queryplan xml template query

Hi,
I use a xsd schema to load XML with a complex structure from a database for
using it in an ASP webpage. Somehow the database uses quite a long time to
make a query plan for the template. The second time the template is used the
database responses quickly, also for other data (using other selection
criteria).
The queryplan is lost when there are no calls for some time, or when a small
change is made to de database stucture, so the next time the ASP page is
called users receive a timeout error.
I have checked all the relevant indexes from the tables that are used for
creating the XML.
Is there any way to influence the speed/persistance of the queryplan that is
created for a xml template query?
Any help will be appreceated,
Albert Jan
I don't think there is. What is happening is that the first time the query
is compiled and then cached. If you don't run it for a while, the query plan
will be purged from the cache and the query will be recompiled. The only way
to "persist" the plan is to write the FOR XML EXPLICIT mode query inside a
stored proc and call the stored proc. You can use the SQL Profiler to see
what the query is that is being generated.
Best regards
Michael
"Albert Jan" <awonnink@.hotmail.com> wrote in message
news:O$EwS3POFHA.4028@.tk2msftngp13.phx.gbl...
> Hi,
> I use a xsd schema to load XML with a complex structure from a database
> for
> using it in an ASP webpage. Somehow the database uses quite a long time to
> make a query plan for the template. The second time the template is used
> the
> database responses quickly, also for other data (using other selection
> criteria).
> The queryplan is lost when there are no calls for some time, or when a
> small
> change is made to de database stucture, so the next time the ASP page is
> called users receive a timeout error.
> I have checked all the relevant indexes from the tables that are used for
> creating the XML.
> Is there any way to influence the speed/persistance of the queryplan that
> is
> created for a xml template query?
> Any help will be appreceated,
> Albert Jan
>
|||Hi Michael,
I had hoped I woudn't have to redesign the solution, because I like the
technique using the template query. But maybe I'll just have to.
Thank you for your answer.
Albert Jan
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:emXkJcUOFHA.3808@.TK2MSFTNGP14.phx.gbl...
> I don't think there is. What is happening is that the first time the query
> is compiled and then cached. If you don't run it for a while, the query
plan
> will be purged from the cache and the query will be recompiled. The only
way[vbcol=seagreen]
> to "persist" the plan is to write the FOR XML EXPLICIT mode query inside a
> stored proc and call the stored proc. You can use the SQL Profiler to see
> what the query is that is being generated.
> Best regards
> Michael
> "Albert Jan" <awonnink@.hotmail.com> wrote in message
> news:O$EwS3POFHA.4028@.tk2msftngp13.phx.gbl...
to[vbcol=seagreen]
for[vbcol=seagreen]
that
>
>
sql

Problem querying SysObjects and SysIndexes

When executing a basic query against (see below) the system object
table in a SQL 2000 database it displays the following error.
SELECT 1 FROM SYSOBJECTS
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'SYSOBJECTS'.
The table does exist and the query is being run as an account with SQL
Admin privileges. This also occurs when trying to query the SysIndexes
table. Other databases on the server are able to query these tables.
What is causing this problem on this one database and how can it be
resolved?Some ideas.
1)Try SELECT 1 FROM sysobjects
2)Try SELECT 1 FROM dbo.sysobjects
--
Jack Vamvas
___________________________________
Need an IT job? http://www.ITjobfeed.com/SQL
"Robin9876" <robin9876@.hotmail.com> wrote in message
news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> When executing a basic query against (see below) the system object
> table in a SQL 2000 database it displays the following error.
> SELECT 1 FROM SYSOBJECTS
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'SYSOBJECTS'.
> The table does exist and the query is being run as an account with SQL
> Admin privileges. This also occurs when trying to query the SysIndexes
> table. Other databases on the server are able to query these tables.
> What is causing this problem on this one database and how can it be
> resolved?
>|||> What is causing this problem on this one database and how can it be
> resolved?
Object name case sensitivity is determined by the database collation. I
suspect the following query will return a case-sensitive collation:
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation')
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Robin9876" <robin9876@.hotmail.com> wrote in message
news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> When executing a basic query against (see below) the system object
> table in a SQL 2000 database it displays the following error.
> SELECT 1 FROM SYSOBJECTS
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'SYSOBJECTS'.
> The table does exist and the query is being run as an account with SQL
> Admin privileges. This also occurs when trying to query the SysIndexes
> table. Other databases on the server are able to query these tables.
> What is causing this problem on this one database and how can it be
> resolved?
>|||Since posting I had resolved it.
I already thought of the suggestions that Jack posted, it was what Dan
has suggested a particular 3rd party database had been setup as case
sensitive.
On 21 Sep, 12:22, "Dan Guzman" <guzma...@.nospam-online.sbcglobal.net>
wrote:
> > What is causing this problem on this one database and how can it be
> > resolved?
> Object name case sensitivity is determined by the database collation. I
> suspect the following query will return a case-sensitive collation:
> SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation')
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Robin9876" <robin9...@.hotmail.com> wrote in message
> news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> > When executing a basic query against (see below) the system object
> > table in a SQL 2000 database it displays the following error.
> > SELECT 1 FROM SYSOBJECTS
> > Server: Msg 208, Level 16, State 1, Line 1
> > Invalid object name 'SYSOBJECTS'.
> > The table does exist and the query is being run as an account with SQL
> > Admin privileges. This also occurs when trying to query the SysIndexes
> > table. Other databases on the server are able to query these tables.
> > What is causing this problem on this one database and how can it be
> > resolved?

Problem querying linked server

I have a problem querying a linked server (Oracle) from my SQL server 2000. I am able to query it normally but when I try to do it through a stored procedure i get the following message

Msg 7399, Sev 16: OLE DB provider 'MSDAORA' reported an error. Authentication failed. [SQLSTATE 42000]
Msg 7312, Sev 16: [SQLSTATE 01000]
Msg 7300, Sev 16: OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80040e4d: Authentication failed.]. [SQLSTATE 01000]Can anybody help me ??

Originally posted by Enigma
I have a problem querying a linked server (Oracle) from my SQL server 2000. I am able to query it normally but when I try to do it through a stored procedure i get the following message

Msg 7399, Sev 16: OLE DB provider 'MSDAORA' reported an error. Authentication failed. [SQLSTATE 42000]
Msg 7312, Sev 16: [SQLSTATE 01000]
Msg 7300, Sev 16: OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80040e4d: Authentication failed.]. [SQLSTATE 01000]|||Looks like you may have a problem with your access rights on either one of the servers......|||Well,

I am able to query the server when I am in the sql query analyzer.
I.E.
SELECT * INTO ABCD FROM TESTSVR..USER.ABCD

This works perfectly and i get the result

When I try to run this as a stored procedure

CREATE procedure sp_TransferData @.server varchar(100),@.userid varchar(30)
as
declare
@.tablename varchar (30),
@.fieldnametemp varchar(100),
@.query varchar (2500)
declare tablenames cursor for
select distinct table_name from TABLES

open tablenames
FETCH NEXT FROM tablenames into @.tablename
WHILE @.@.FETCH_STATUS = 0
begin
declare @.fieldname varchar(2000)
select @.fieldname = ''
declare fieldname cursor for
select field_name from tables where table_name = @.tablename
open fieldname
FETCH NEXT FROM fieldname into @.fieldnametemp
WHILE @.@.FETCH_STATUS = 0
begin
select @.fieldname = @.fieldnametemp + ',' + @.fieldname
fetch next from fieldname into @.fieldnametemp
end
CLOSE fieldname
DEALLOCATE fieldname
select @.fieldname = left(@.fieldname,len(@.fieldname)-1)
select @.query = 'select '+ @.fieldname + ' into ' + @.tablename + ' from ' + @.server + '..' + @.userid + '.' + @.tablename + ''')'
select @.query

execute (@.query)
print 'Table Processed'

fetch next from tablenames into @.tablename
end

CLOSE tablenames
DEALLOCATE tablenames

the error crops up ... can somebody suggest a way around

problem querying a TEXT field

I have a query that works, until I try to also grab one of the fields that
is set to a 'text' datatype. I can grab any field, and it works fine, but
once I try to grab the data from the 'text' field, I get the following
error:
[Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image
data types cannot be compared or sorted, except when using IS NULL or LIKE
operator.
If I add an ISNULL to this field, I still get the same error. I'm not
explicitely sorting by thie field either. I haven't found a specific
solution via google other than 'change your TEXT field to VARCHAR(7000)'
which doesn't seem like a proper solution.
-DarrelImpossible to say without seeing the query.
ML|||Are you using a DISTINCT or GROUP BY or something else that might require a
sort? Can you post the query?
HTH
Jerry
"darrel" <notreal@.hotmail.com> wrote in message
news:O8PYwpEyFHA.700@.TK2MSFTNGP11.phx.gbl...
>I have a query that works, until I try to also grab one of the fields that
> is set to a 'text' datatype. I can grab any field, and it works fine, but
> once I try to grab the data from the 'text' field, I get the following
> error:
> [Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image
> data types cannot be compared or sorted, except when using IS NULL or LIKE
> operator.
> If I add an ISNULL to this field, I still get the same error. I'm not
> explicitely sorting by thie field either. I haven't found a specific
> solution via google other than 'change your TEXT field to VARCHAR(7000)'
> which doesn't seem like a proper solution.
> -Darrel
>
>sql

problem query returning float with comma

I to all

i am bilding a web page, using asp and sql server

I have a few querys in the asp script. my problem is that the values from the query results to tables with float fiels, apear with a comma
and want a dot

like area= 23,5 and I would like to have area= 23.5

in the query analyser there is no problem its all dots
i have my web aplication running in 3 diferent machines and in 2 of them i dont have this problem. the query results to float fiels apear with a dot

in the 3 machines the database is the same , the odbc conection is similar. i have win xp professional in 2 machines and win 2000 server in other. the machine with this problem has xp pro

something i miss in the IIS...

i am lost

some hint would be very nice

thanks for your time and replayThere could be lots of possible ways to get this behavior. Without knowing a lot about your systems I just have to guess.

My first thought would be that two of the clients have installed English-US and the offending client has installed English-UK versions of either MDAC or IIS.

-PatP

Wednesday, March 21, 2012

Problem performing a join on a function in a SQL query

Hello,

Can someone explain why this code contains the following error:

Msg 4104, Level 16, State 1, Line 2

The multi-part identifier "TheTable.StartValue" could not be bound.

CREATE FUNCTION MyFunction(@.StartValue int)

RETURNS @.MyTable TABLE

(

NextValue int NOT NULL

)

AS

BEGIN

INSERT INTO @.MyTable(NextValue)

VALUES (@.StartValue + 1)

INSERT INTO @.MyTable(NextValue)

VALUES (@.StartValue + 2)

RETURN

END

GO

CREATE TABLE TheTable

(

StartValue int NOT NULL

)

GO

INSERT INTO TheTable(StartValue)

VALUES (10)

INSERT INTO TheTable(StartValue)

VALUES (20)

GO

SELECT *

FROM TheTable CROSS JOIN

MyFunction(TheTable.StartValue)

You can′t do that per row. The logic is quite simple that you presented here, what about doing

SELECT StartValue, StartValue+1,StartValue+2
From SomeTable

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

In SQL Server 2000, this is not possible. However, in 2005, you can use the CROSS APPLY join operator:

SELECT *
FROM TheTable
CROSS APPLY MyFunction(TheTable.StartValue)

Interesting function. If you don't mind, could you share the purpose?

|||

Hi,

you cannot use Table's Column as a parameter to the function. Only variables or Static Literals can be passed as an argument to the function

|||

Thanks for your reply.

I wrote that function as an example of what I was trying to do. I have a vertical bar delimited column (eg. this|is|my|column). I used a CLR function to get all the values. I then run a aggregate of these values based on another field in another table. So the output should be something like this.

this: 2
is: 4
my: 0
column: 1

I can't do a straight aggregate because the "my" values above would be omitted.

|||

Thanks for your reply.

I wrote that function as an example of what I was trying to do. I have a vertical bar delimited column (eg. this|is|my|column). I used a CLR function to get all the values. I then run a aggregate of these values based on another field in another table. So the output should be something like this.

this: 2
is: 4
my: 0
column: 1

I can't do a straight aggregate because the "my" values above would be omitted.

Problem passing columns as parameter!

Dear friens,

I need to pass a column as a parameter in my query. I did this:

ALTER PROCEDURE [dbo].[GD_SP_GET_UsersByDIR_COD]

@.Direccao nvarchar(11),

@.prmFieldName nvarchar(25),

@.prmFieldValue nvarchar(25)

AS

BEGIN

IF @.prmFieldValue='*' OR @.prmFieldValue=''

BEGIN

SELECT TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

ORDER BY Nome

END

ELSE

BEGIN

DECLARE @.SQL varchar(7000)

SET @.Direccao='CGD-DAS'

SET @.prmFieldName='UserID'

SET @.prmFieldValue='C095122'

SET @.SQL = 'SELECT

TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

AND '+ @.prmFieldName +' =' + @.prmFieldValue + ' '

EXEC @.SQL

END

END

THE COMAND EXECUTE SUCESSFULLY IN QUERY ANALISER, BUT IN ASP.NET 2.0 CLIENT RETURNS THE FOLLOWING ERROR:

Server Error in '/WS_GestaoDesktop' Application.


The name 'SELECT
TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,
dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,
dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,
dbo.HARDWARE.NS_ID
FROM dbo.ModeloPC INNER JOIN
dbo.SERVICO INNER JOIN
dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN
dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.H' is not a valid identifier.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: The name 'SELECT
TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,
dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,
dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,
dbo.HARDWARE.NS_ID
FROM dbo.ModeloPC INNER JOIN
dbo.SERVICO INNER JOIN
dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN
dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.H' is not a valid identifier.

Source Error:

Line 3269: }

Line 3270: dsHardware.dtGD_SP_GET_UsersByDIR_CODDataTable dataTable = new dsHardware.dtGD_SP_GET_UsersByDIR_CODDataTable();

Line 3271: this.Adapter.Fill(dataTable);

Line 3272: return dataTable;

Line 3273: }

The problem is based here:

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

if you want to pass a static value use

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = ''' + @.Direccao + ''')

if you want to pass a identifier use

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = ' + @.Direccao + ')

HTh, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Dear Friend,I changed as you told, but the error still there! :-(

CREATE PROCEDURE [dbo].[GD_SP_GET_UsersByDIR_COD]

@.Direccao nvarchar(11),

@.prmFieldName nvarchar(25),

@.prmFieldValue nvarchar(25)

AS

BEGIN

IF @.prmFieldValue='*' OR @.prmFieldValue=''

BEGIN

SELECT TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

ORDER BY Nome

END

ELSE

BEGIN

DECLARE @.SQL varchar(7000)

SET @.Direccao='CGD-DAS'

SET @.prmFieldName='UserID'

SET @.prmFieldValue='C095122'

SET @.SQL = 'SELECT

TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName, dbo.HARDWARE.New_Computername,

dbo.ModeloPC.MOD_ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome,

dbo.HARDWARE.Migrada, dbo.HARDWARE.MigraViaChange, dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD ='+ @.Direccao +')

AND '+ @.prmFieldName +' =' + @.prmFieldValue + ' '

EXEC @.SQL

END

END

ERROR:

Msg 203, Level 16, State 2, Procedure GD_SP_GET_UsersByDIR_COD, Line 49

The name 'SELECT

TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.H' is not a valid identifier.

|||

change the following things..

CREATE PROCEDURE [dbo].[GD_SP_GET_UsersByDIR_COD]

@.Direccao nvarchar(11),

@.prmFieldName nvarchar(25),

@.prmFieldValue nvarchar(25)

AS

BEGIN

IF @.prmFieldValue='*' OR @.prmFieldValue=''

BEGIN

SELECT TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

ORDER BY Nome

END

ELSE

BEGIN

DECLARE @.SQL varchar(7000)

SET @.Direccao='CGD-DAS'

SET @.prmFieldName='UserID'

SET @.prmFieldValue='C095122'

SET @.SQL = 'SELECT

TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName, dbo.HARDWARE.New_Computername,

dbo.ModeloPC.MOD_ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome,

dbo.HARDWARE.Migrada, dbo.HARDWARE.MigraViaChange, dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD ='''+ @.Direccao +''')

AND '+ @.prmFieldName +' =''' + @.prmFieldValue + ''' '

EXEC @.SQL

END

END

|||

Manid,

I changed as you told, but the error still there! :-(

Regards.

|||I guess you are either trying to change another procedure than you are executing or you will have to provide the whole snippet of code via mail or something to make it reproducable.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Dear Jens,

I created a more simple query, based in the same problem:

CREATE PROCEDURE TEMP

AS

DECLARE @.SQL varchar(8000)

DECLARE @.prmFieldName varchar(20)

DECLARE @.prmFieldValue varchar(20)

SET @.prmFieldName='UserID'

SET @.prmFieldValue='C095122'

SET @.SQL = 'SELECT New_Computername

FROM HARDWARE

WHERE '+ @.prmFieldName +' =''' + @.prmFieldValue + ''' '

EXEC @.SQL

The logical is the some of other queries, but in this one I can't executed it, because returns the following error:

Msg 2812, Level 16, State 62, Procedure TEMP, Line 15

Could not find stored procedure 'SELECT New_Computername

FROM HARDWARE

WHERE UserID ='C095122' '.

(1 row(s) affected)

If you can put this query with column parameter workink good, my problem probably is resolved for the other queries.

Thanks!

|||Sorry and blame on me for not seeing this, you will have to wriite the exec as follows:

EXEC(@.SQL)

HTH, jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Dear friends,

I created a new simple query to try to resolve the problem of passing a column as parameter, using sp_executesql, but still return error. :-(

ALTER PROCEDURE TEMP

@.prmFieldName nvarchar(25),

@.prmFieldValue nvarchar(25)

AS

DECLARE @.SQL varchar(8000)

SET @.prmFieldName='UserID'

SET @.prmFieldValue='C095122'

SET @.SQL = N'SELECT New_Computername

FROM HARDWARE

WHERE '+ @.prmFieldName +' =''' + @.prmFieldValue + ''' '

EXECUTE sp_executesql @.SQL;

ERROR:

Msg 214, Level 16, State 2, Procedure sp_executesql, Line 1

Procedure expects parameter '@.statement' of type 'ntext/nchar/nvarchar'.

|||

Dear Friends,

I found the solution for my problem.

I must use EXECTUTE sp_executesql @.SQL in spite of EXEC @.SQL, and I must use nvarchar(4000) in spite of varchar(8000).

The final Result:

ALTER PROCEDURE [dbo].[GD_SP_GET_UsersByDIR_COD]

@.Direccao nvarchar(11),

@.prmFieldName nvarchar(30),

@.prmFieldValue nvarchar(25)

AS

BEGIN

IF @.prmFieldValue='*' OR @.prmFieldValue=''

BEGIN

SELECT TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD = @.Direccao)

ORDER BY Nome

END

ELSE

BEGIN

DECLARE @.SQL nvarchar(4000)

SET @.SQL = N'SELECT

TOP (100) PERCENT dbo.ADServico_User.UserID, dbo.ADUser.UserName AS Nome, dbo.HARDWARE.New_Computername AS Computername,

dbo.ModeloPC.MOD_ModeloPC AS ModeloPC, dbo.Monitor.MON_Monitor AS Monitor, dbo.Status.StatusNome AS Status,

dbo.HARDWARE.Migrada AS Interven??o, dbo.HARDWARE.MigraViaChange AS [Migrada via Change], dbo.HARDWARE.StatusID,

dbo.HARDWARE.NS_ID

FROM dbo.ModeloPC INNER JOIN

dbo.SERVICO INNER JOIN

dbo.ADServico_User ON dbo.SERVICO.S_GrupoServico = dbo.ADServico_User.GrupoServico INNER JOIN

dbo.HARDWARE ON dbo.ADServico_User.UserID = dbo.HARDWARE.UserID INNER JOIN

dbo.Status ON dbo.HARDWARE.StatusID = dbo.Status.ID ON dbo.ModeloPC.MODELO_ID = dbo.HARDWARE.MODELO_ID INNER JOIN

dbo.Monitor ON dbo.HARDWARE.MONITOR_ID = dbo.Monitor.MONITOR_ID INNER JOIN

dbo.DIRECCAO ON dbo.SERVICO.S_NomeDir = dbo.DIRECCAO.DIR_COD LEFT OUTER JOIN

dbo.ADUser ON dbo.HARDWARE.UserID = dbo.ADUser.UserID

WHERE (dbo.HARDWARE.StatusID <> 6) AND (dbo.DIRECCAO.DIR_COD ='''+ @.Direccao +''')

AND '+ @.prmFieldName +' =''' + @.prmFieldValue + ''' '

EXECUTE sp_executesql @.SQL

END

END

THANKS FOR ALL YOUR IMPORTANT SUPPORT!!!

Tuesday, March 20, 2012

Problem on query operation

Hello, I have my table Produits :

CREATE TABLE [dbo].[Produit] (
[Produit_ID] [int]IDENTITY (1, 1)NOT NULL ,
[Reference] [nvarchar] (50) COLLATE French_CI_ASNULL ,
[Designation] [nvarchar] (50) COLLATE French_CI_ASNULL ,
[Quantite] [int]NULL ,
[PrixU] [sql_variant]NULL ,
[MontantHT] [sql_variant]NULL ,
[TVA] [sql_variant]NULL ,
[Facture_ID] [int]NOT NULL
)
GO
here is stored procedure

 CREATE PROC spBaseTVA_Bis( @.Facture_IDint )AS SELECTSUM(MontantHT)AS montantHT, TVAFROM ProduitGROUP BY TVA, Facture_IDHAVING ( Facture_ID = @.Facture_ID)GOMy stored procedure  fill data in a datagrid with to column  TauxTVA and TVA  like this :

TauxTVA TVA

But I would like to add a theard column as (the value of the fisrt colum) * ( the value of the second colum )

I would like to desplay data like this :

TauxTVA TVA Prod
X Y X*Y

How can I modify my stored procedure to perform this ?

Regards

Hello,

This one will work with your table definition.

SELECTSUM(convert(int,MontantHT))AS montantHT,convert(int,TVA)as TVA,SUM(convert(int,MontantHT))*convert(int,TVA)as newColFROM

Produit

WHERE

( Facture_ID= @.Facture_ID)

GROUP

BY TVA, Facture_ID

However, I don't think the data types you defined here are approprite. In stead of sql_variant, you can redefine them to something in your case, such as int, float... for your calculations later on.

|||

Thank you !

This work very well;

But it possible to perform this :

TauxTVA TVA Prod
X Y X*Y

Z T Z*T

And in another column X +Z AND X*Y + Z*T


|||

You can use the previous result as a derived table and run a sum on top of it like this:

SELECT

SUM(a.montantHT)as Sum_montantHT,SUM(a. newCol)as new_SumFROM(SELECTSUM(convert(int,MontantHT))AS montantHT,convert(int,TVA)as TVA,SUM(convert(int,MontantHT))*convert(int,TVA)as newColFROM

Produit

WHERE

(

Facture_ID= 1)

GROUP

BY

TVA, Facture_ID)AS a

Problem on parallelism

after running query at first time working all processes

but later 2-3 sec. working only one

SQL 2005

Hewlett Packard DL580 (16 processes)

What is ideas?

Hi Vladmir,

Could you please expand on what you are trying to do and what you are experiencing?

thanks

Jag

|||It's possible that you're seeing the initial disk reads for the query being done in parallel, and then the remainder of the execution carrying on in a single thread, but that's about the best guess I can give from the current information. Not all queries will be executed in multiple parallel threads - there are certain criteria and requirements used by the query optimizer to decide on a degree of parallelism.|||

Thanks for replies!

I have a bank's system (Diasoft 5NT)

It works with SQL Server 2005 (64 bit version). If I run stored procedure in QA - OK! All processes work.

It executing on multiple EC (executing context)

But if I run in programm (Diasoft 5NT) - after few second work only one thread.

P.S. Connect to database over BDE (Borland Database Engine).

|||

davidbrit2 wrote:

It's possible that you're seeing the initial disk reads for the query being done in parallel, and then the remainder of the execution carrying on in a single thread, but that's about the best guess I can give from the current information. Not all queries will be executed in multiple parallel threads - there are certain criteria and requirements used by the query optimizer to decide on a degree of parallelism.

Yes! I think.

But the same query in one case are executing in multiple parallel threads , in other case in single.

|||

Thanks for all!

This problem have been resolved when I turn on "Auto Create Statistic" and "Auto Update Statistic"!

This option had been turned off because we planning run update statistic at night time.

problem of UNION query

I maked a following query and excuted it.
SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
FROM
(
(
SELECT SUBJ0.shop AS shop, 0 AS dcrate, sum(SUBJ0.sellcnt) AS sellcnt
FROM
(
SELECT
[shop]shop,
[brnd]brnd,
[item]item,
[seq]seq,
[color]color,
[size]size,
[sellqty]sellqty,
[sellamt]sellamt,
[sellcnt]sellcnt,
[sellterm]sellterm,
[tempseq]tempseq
FROM
"HULUCKS.dbo.x_sellinfo" T1
) SUBJ0
GROUP BY SUBJ0.shop
)
UNION ALL
(
SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
FROM
( SELECT
[shop]shop,
[shopnm]shopnm,
[shop_type]shop_type,
[dcrate]dcrate,
[posgb]posgb,
[manachul]manachul
FROM
"HULUCKS.dbo.x_shop" T1
) SUBJ1
GROUP BY SUBJ1.shop
)
) UT
GROUP BY UT.shop
But occur following error.
"Invalid subject name 'HULUCKS.dbo.x_shop'"
Why occur this error?
Help me......Can you find out if this query works fine?
SELECT
[shop]shop,
[shopnm]shopnm,
[shop_type]shop_type,
[dcrate]dcrate,
[posgb]posgb,
[manachul]manachul
FROM
"HULUCKS.dbo.x_shop" T1|||Thank you for reading my question.
Yes.
This subquery is work fine.
There are no problem.
"Omnibuzz" wrote:

> Can you find out if this query works fine?
> SELECT
> [shop]shop,
> [shopnm]shopnm,
> [shop_type]shop_type,
> [dcrate]dcrate,
> [posgb]posgb,
> [manachul]manachul
> FROM
> "HULUCKS.dbo.x_shop" T1
>|||try this then, I don't know why you complicated the query.
This should give the same result (if I am not wrong)
SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
FROM
(
SELECT SUBJ0.shop AS shop, 0 AS dcrate, SUBJ0.sellcnt AS sellcnt
FROM
"HULUCKS.dbo.x_sellinfo" SUBJ0
UNION ALL
SELECT SUBJ1.shop AS shop, SUBJ1.dcrate AS dcrate, 0 AS sellcnt
FROM
"HULUCKS.dbo.x_shop" SUBJ1
) UT
GROUP BY UT.shop|||Thank you for quickly response.
I need of next case too.
SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
FROM
(
(
SELECT SUBJ0.shop AS shop, 0 AS dcrate, sum(SUBJ0.sellcnt) AS sellcnt
FROM
(
SELECT
[shop]shop,
[brnd]brnd,
[item]item,
[seq]seq,
[color]color,
[size]size,
[sellqty]sellqty,
[sellamt]sellamt,
[sellcnt]sellcnt,
[sellterm]sellterm,
[tempseq]tempseq
FROM
"HULUCKS.dbo.x_sellinfo" T1
) SUBJ0
GROUP BY SUBJ0.shop
)
UNION ALL
(
SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
FROM
( SELECT
T2.[shop_type]shop_type,
T1.[shop]shop,
T1.[sellqty]sellqty,
T1.[dcrate]dcrate,
T1.[sellamt]sellamt
FROM
"HULUCKS.dbo.x_sellinfo" T1
INNER JOIN "HULUCKS.dbo.x_shop" T2 ON T2.[shop]shop = T1.[shop]shop
) SUBJ1
GROUP BY SUBJ1.shop
)
) UT
GROUP BY UT.shop
In this case also raise same error.
But no error at the next time.
SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
FROM
(
(
SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
FROM
( SELECT
T2.[shop_type]shop_type,
T1.[shop]shop,
T1.[sellqty]sellqty,
T1.[dcrate]dcrate,
T1.[sellamt]sellamt
FROM
"HULUCKS.dbo.x_sellinfo" T1
INNER JOIN "HULUCKS.dbo.x_shop" T2 ON T2.[shop]shop = T1.[shop]shop
) SUBJ1
GROUP BY SUBJ1.shop
)
) UT
GROUP BY UT.shop
Thank's!!
"Omnibuzz" wrote:

> try this then, I don't know why you complicated the query.
> This should give the same result (if I am not wrong)
> SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
> FROM
> (
> SELECT SUBJ0.shop AS shop, 0 AS dcrate, SUBJ0.sellcnt AS sellcnt
> FROM
> "HULUCKS.dbo.x_sellinfo" SUBJ0
> UNION ALL
> SELECT SUBJ1.shop AS shop, SUBJ1.dcrate AS dcrate, 0 AS sellcnt
> FROM
> "HULUCKS.dbo.x_shop" SUBJ1
> ) UT
> GROUP BY UT.shop
>|||did the query I posted work'
"kym" wrote:
> Thank you for quickly response.
> I need of next case too.
> SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
> FROM
> (
> (
> SELECT SUBJ0.shop AS shop, 0 AS dcrate, sum(SUBJ0.sellcnt) AS sellcnt
> FROM
> (
> SELECT
> [shop]shop,
> [brnd]brnd,
> [item]item,
> [seq]seq,
> [color]color,
> [size]size,
> [sellqty]sellqty,
> [sellamt]sellamt,
> [sellcnt]sellcnt,
> [sellterm]sellterm,
> [tempseq]tempseq
> FROM
> "HULUCKS.dbo.x_sellinfo" T1
> ) SUBJ0
> GROUP BY SUBJ0.shop
> )
> UNION ALL
> (
> SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
> FROM
> ( SELECT
> T2.[shop_type]shop_type,
> T1.[shop]shop,
> T1.[sellqty]sellqty,
> T1.[dcrate]dcrate,
> T1.[sellamt]sellamt
> FROM
> "HULUCKS.dbo.x_sellinfo" T1
> INNER JOIN "HULUCKS.dbo.x_shop" T2 ON T2.[shop]shop = T1.[shop]shop
> ) SUBJ1
> GROUP BY SUBJ1.shop
> )
> ) UT
> GROUP BY UT.shop
> In this case also raise same error.
> But no error at the next time.
> SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
> FROM
> (
> (
> SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
> FROM
> ( SELECT
> T2.[shop_type]shop_type,
> T1.[shop]shop,
> T1.[sellqty]sellqty,
> T1.[dcrate]dcrate,
> T1.[sellamt]sellamt
> FROM
> "HULUCKS.dbo.x_sellinfo" T1
> INNER JOIN "HULUCKS.dbo.x_shop" T2 ON T2.[shop]shop = T1.[shop]shop
> ) SUBJ1
> GROUP BY SUBJ1.shop
> )
> ) UT
> GROUP BY UT.shop
> Thank's!!
> "Omnibuzz" wrote:
>|||Don't work the query you posted.
Same error occur.
"Omnibuzz" wrote:
> did the query I posted work'
> "kym" wrote:
>|||I think that this problem start from bug of "MS SQLServer 2000".
To my thinking, it can solve by patch SP of MS SQLServer 2000.
Is this right?
"Omnibuzz" wrote:
> did the query I posted work'
> "kym" wrote:
>|||I have never heard of this error "Invalid subject name" in SQL Server.
The only place I have heard is in SSL Connections.
Is that the error that it gives?
It seems to be correct syntactically and the table seems to exist.
Maybe one of the MVPs might have a better insight on the service packs|||Kym,
[HULUCKS.dbo.x_shop] is a very strange table name. My guess
is that you have a table named x_shop in a database called HULUCKS,
but that you don't have a table named [HULUCKS.dbo.x_shop].
This would mean, however, that the query omnibuzz asked you to
run does not work. Are you sure you ran it exactly, including the
" characters?
Steve Kass
Drew University
Try removing the " characters around the table name.
kym wrote:

>I maked a following query and excuted it.
>SELECT UT.shop, sum(UT.dcrate) , sum(UT.sellcnt)
>FROM
>(
> (
> SELECT SUBJ0.shop AS shop, 0 AS dcrate, sum(SUBJ0.sellcnt) AS sellcnt
> FROM
> (
> SELECT
> [shop]shop,
> [brnd]brnd,
> [item]item,
> [seq]seq,
> [color]color,
> [size]size,
> [sellqty]sellqty,
> [sellamt]sellamt,
> [sellcnt]sellcnt,
> [sellterm]sellterm,
> [tempseq]tempseq
> FROM
> "HULUCKS.dbo.x_sellinfo" T1
> ) SUBJ0
> GROUP BY SUBJ0.shop
> )
> UNION ALL
> (
> SELECT SUBJ1.shop AS shop, sum(SUBJ1.dcrate) AS dcrate, 0 AS sellcnt
> FROM
> ( SELECT
> [shop]shop,
> [shopnm]shopnm,
> [shop_type]shop_type,
> [dcrate]dcrate,
> [posgb]posgb,
> [manachul]manachul
> FROM
> "HULUCKS.dbo.x_shop" T1
> ) SUBJ1
> GROUP BY SUBJ1.shop
> )
> ) UT
>GROUP BY UT.shop
>But occur following error.
>"Invalid subject name 'HULUCKS.dbo.x_shop'"
>Why occur this error?
>Help me......
>

Problem of TimeOut

Hi,
After restoration of my database, I need to rebuil my views.
The query I use needs 7 mn to build it and it cannot be fulfilled.
I've set the querytimeout parameter to 0 (unlimited) and I've allocated
physcical memory to the server.
What else can I do?
Thanks
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.orgWhat is the error you are getting?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
Hi,
After restoration of my database, I need to rebuil my views.
The query I use needs 7 mn to build it and it cannot be fulfilled.
I've set the querytimeout parameter to 0 (unlimited) and I've allocated
physcical memory to the server.
What else can I do?
Thanks
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org|||[Microsoft][SqlServerODBCDriver]Timeout expired
I have already set the timeout of the driver to the maximum value.
Thank you for your help I really need it
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
quote:

> What is the error you are getting?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> Hi,
> After restoration of my database, I need to rebuil my views.
> The query I use needs 7 mn to build it and it cannot be fulfilled.
> I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> physcical memory to the server.
> What else can I do?
> Thanks
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
>
|||Are you using ADO? If so, you will have to set the CommandTimeout property
of your Connection or Command object.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
[Microsoft][SqlServerODBCDriver]Timeout expired
I have already set the timeout of the driver to the maximum value.
Thank you for your help I really need it
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
quote:

> What is the error you are getting?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> Hi,
> After restoration of my database, I need to rebuil my views.
> The query I use needs 7 mn to build it and it cannot be fulfilled.
> I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> physcical memory to the server.
> What else can I do?
> Thanks
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
>
|||The query is directly done on the server
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
quote:

> Are you using ADO? If so, you will have to set the CommandTimeout property
> of your Connection or Command object.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> [Microsoft][SqlServerODBCDriver]Timeout expired
> I have already set the timeout of the driver to the maximum value.
> Thank you for your help I really need it
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
>
>
|||Using Query Analyzer?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
The query is directly done on the server
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
quote:

> Are you using ADO? If so, you will have to set the CommandTimeout property
> of your Connection or Command object.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> [Microsoft][SqlServerODBCDriver]Timeout expired
> I have already set the timeout of the driver to the maximum value.
> Thank you for your help I really need it
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
>
>
|||With Query Analyzer it works...
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
quote:

> Using Query Analyzer?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> The query is directly done on the server
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
property[QUOTE]
message[QUOTE]
> de
allocated[QUOTE]
>
>
|||So, from which application did it not work? :-)
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
With Query Analyzer it works...
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
quote:

> Using Query Analyzer?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> The query is directly done on the server
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
property[QUOTE]
message[QUOTE]
> de
allocated[QUOTE]
>
>
|||When I click "Return all rows" in Sql Enterprise manager
Yannick Lejeune
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message de
news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
quote:

> So, from which application did it not work? :-)
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
> With Query Analyzer it works...
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
message[QUOTE]
> de
> property
> message
> allocated
>
>
|||I found :
http://support.microsoft.com/defaul...&NoWebContent=1
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> a crit dans le message de news:
%23WdPE$g2DHA.2208@.TK2MSFTNGP12.phx.gbl...
quote:

> When I click "Return all rows" in Sql Enterprise manager
> --
> Yannick Lejeune
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a crit dans le message

de
quote:

> news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
message[QUOTE]
> de
> message
>

Monday, March 12, 2012

Problem of TimeOut

Hi,
After restoration of my database, I need to rebuil my views.
The query I use needs 7 mn to build it and it cannot be fulfilled.
I've set the querytimeout parameter to 0 (unlimited) and I've allocated
physcical memory to the server.
What else can I do?
Thanks
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.orgWhat is the error you are getting?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
Hi,
After restoration of my database, I need to rebuil my views.
The query I use needs 7 mn to build it and it cannot be fulfilled.
I've set the querytimeout parameter to 0 (unlimited) and I've allocated
physcical memory to the server.
What else can I do?
Thanks
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org|||[Microsoft][SqlServerODBCDriver]Timeout expired
I have already set the timeout of the driver to the maximum value.
Thank you for your help I really need it :)
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> What is the error you are getting?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> Hi,
> After restoration of my database, I need to rebuil my views.
> The query I use needs 7 mn to build it and it cannot be fulfilled.
> I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> physcical memory to the server.
> What else can I do?
> Thanks
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
>|||Are you using ADO? If so, you will have to set the CommandTimeout property
of your Connection or Command object.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
[Microsoft][SqlServerODBCDriver]Timeout expired
I have already set the timeout of the driver to the maximum value.
Thank you for your help I really need it :)
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> What is the error you are getting?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> Hi,
> After restoration of my database, I need to rebuil my views.
> The query I use needs 7 mn to build it and it cannot be fulfilled.
> I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> physcical memory to the server.
> What else can I do?
> Thanks
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
>|||The query is directly done on the server :(
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> Are you using ADO? If so, you will have to set the CommandTimeout property
> of your Connection or Command object.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> [Microsoft][SqlServerODBCDriver]Timeout expired
> I have already set the timeout of the driver to the maximum value.
> Thank you for your help I really need it :)
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > What is the error you are getting?
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > After restoration of my database, I need to rebuil my views.
> > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> > physcical memory to the server.
> >
> > What else can I do?
> >
> > Thanks
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> >
> >
>
>|||Using Query Analyzer?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
The query is directly done on the server :(
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> Are you using ADO? If so, you will have to set the CommandTimeout property
> of your Connection or Command object.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> [Microsoft][SqlServerODBCDriver]Timeout expired
> I have already set the timeout of the driver to the maximum value.
> Thank you for your help I really need it :)
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > What is the error you are getting?
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > After restoration of my database, I need to rebuil my views.
> > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > I've set the querytimeout parameter to 0 (unlimited) and I've allocated
> > physcical memory to the server.
> >
> > What else can I do?
> >
> > Thanks
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> >
> >
>
>|||With Query Analyzer it works...
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> Using Query Analyzer?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> The query is directly done on the server :(
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > Are you using ADO? If so, you will have to set the CommandTimeout
property
> > of your Connection or Command object.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > [Microsoft][SqlServerODBCDriver]Timeout expired
> >
> > I have already set the timeout of the driver to the maximum value.
> >
> > Thank you for your help I really need it :)
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > What is the error you are getting?
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > > After restoration of my database, I need to rebuil my views.
> > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > I've set the querytimeout parameter to 0 (unlimited) and I've
allocated
> > > physcical memory to the server.
> > >
> > > What else can I do?
> > >
> > > Thanks
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > >
> > >
> >
> >
> >
>
>|||So, from which application did it not work? :-)
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
With Query Analyzer it works...
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> Using Query Analyzer?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> The query is directly done on the server :(
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > Are you using ADO? If so, you will have to set the CommandTimeout
property
> > of your Connection or Command object.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > [Microsoft][SqlServerODBCDriver]Timeout expired
> >
> > I have already set the timeout of the driver to the maximum value.
> >
> > Thank you for your help I really need it :)
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > What is the error you are getting?
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > > After restoration of my database, I need to rebuil my views.
> > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > I've set the querytimeout parameter to 0 (unlimited) and I've
allocated
> > > physcical memory to the server.
> > >
> > > What else can I do?
> > >
> > > Thanks
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > >
> > >
> >
> >
> >
>
>|||When I click "Return all rows" in Sql Enterprise manager
--
Yannick Lejeune
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
> So, from which application did it not work? :-)
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
> With Query Analyzer it works...
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> > Using Query Analyzer?
> >
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> > The query is directly done on the server :(
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > > Are you using ADO? If so, you will have to set the CommandTimeout
> property
> > > of your Connection or Command object.
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > > [Microsoft][SqlServerODBCDriver]Timeout expired
> > >
> > > I have already set the timeout of the driver to the maximum value.
> > >
> > > Thank you for your help I really need it :)
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> message
> > de
> > > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > > What is the error you are getting?
> > > > --
> > > > HTH,
> > > > Vyas, MVP (SQL Server)
> > > > http://vyaskn.tripod.com/
> > > > Is .NET important for a database professional?
> > > > http://vyaskn.tripod.com/poll.htm
> > > >
> > > >
> > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > > Hi,
> > > >
> > > > After restoration of my database, I need to rebuil my views.
> > > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > > I've set the querytimeout parameter to 0 (unlimited) and I've
> allocated
> > > > physcical memory to the server.
> > > >
> > > > What else can I do?
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Yannick LEJEUNE - MVP C#
> > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > c/o EPITA (French Computer Engineering School)
> > > > http://www.3ie.org
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>|||I found :
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q247/0/70.ASP&NoWebContent=1
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> a écrit dans le message de news:
%23WdPE$g2DHA.2208@.TK2MSFTNGP12.phx.gbl...
> When I click "Return all rows" in Sql Enterprise manager
> --
> Yannick Lejeune
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
> > So, from which application did it not work? :-)
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
> > With Query Analyzer it works...
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> > > Using Query Analyzer?
> > >
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> > > The query is directly done on the server :(
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> message
> > de
> > > news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > > > Are you using ADO? If so, you will have to set the CommandTimeout
> > property
> > > > of your Connection or Command object.
> > > > --
> > > > HTH,
> > > > Vyas, MVP (SQL Server)
> > > > http://vyaskn.tripod.com/
> > > > Is .NET important for a database professional?
> > > > http://vyaskn.tripod.com/poll.htm
> > > >
> > > >
> > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > > > [Microsoft][SqlServerODBCDriver]Timeout expired
> > > >
> > > > I have already set the timeout of the driver to the maximum value.
> > > >
> > > > Thank you for your help I really need it :)
> > > >
> > > > --
> > > > Yannick LEJEUNE - MVP C#
> > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > c/o EPITA (French Computer Engineering School)
> > > > http://www.3ie.org
> > > >
> > > >
> > > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> > message
> > > de
> > > > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > > > What is the error you are getting?
> > > > > --
> > > > > HTH,
> > > > > Vyas, MVP (SQL Server)
> > > > > http://vyaskn.tripod.com/
> > > > > Is .NET important for a database professional?
> > > > > http://vyaskn.tripod.com/poll.htm
> > > > >
> > > > >
> > > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > > > Hi,
> > > > >
> > > > > After restoration of my database, I need to rebuil my views.
> > > > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > > > I've set the querytimeout parameter to 0 (unlimited) and I've
> > allocated
> > > > > physcical memory to the server.
> > > > >
> > > > > What else can I do?
> > > > >
> > > > > Thanks
> > > > >
> > > > > --
> > > > > Yannick LEJEUNE - MVP C#
> > > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > > c/o EPITA (French Computer Engineering School)
> > > > > http://www.3ie.org
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> >
>|||Gotcha! See if this helps:
http://vyaskn.tripod.com/sql_server_tools_faq.htm#q7
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:#WdPE$g2DHA.2208@.TK2MSFTNGP12.phx.gbl...
When I click "Return all rows" in Sql Enterprise manager
--
Yannick Lejeune
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message de
news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
> So, from which application did it not work? :-)
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
> With Query Analyzer it works...
> --
> Yannick LEJEUNE - MVP C#
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> > Using Query Analyzer?
> >
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> > The query is directly done on the server :(
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > > Are you using ADO? If so, you will have to set the CommandTimeout
> property
> > > of your Connection or Command object.
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > > [Microsoft][SqlServerODBCDriver]Timeout expired
> > >
> > > I have already set the timeout of the driver to the maximum value.
> > >
> > > Thank you for your help I really need it :)
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> message
> > de
> > > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > > What is the error you are getting?
> > > > --
> > > > HTH,
> > > > Vyas, MVP (SQL Server)
> > > > http://vyaskn.tripod.com/
> > > > Is .NET important for a database professional?
> > > > http://vyaskn.tripod.com/poll.htm
> > > >
> > > >
> > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > > Hi,
> > > >
> > > > After restoration of my database, I need to rebuil my views.
> > > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > > I've set the querytimeout parameter to 0 (unlimited) and I've
> allocated
> > > > physcical memory to the server.
> > > >
> > > > What else can I do?
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Yannick LEJEUNE - MVP C#
> > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > c/o EPITA (French Computer Engineering School)
> > > > http://www.3ie.org
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>|||That article is a little doubtful, I'll have to double check it. Did you try
my site?
http://vyaskn.tripod.com/sql_server_tools_faq.htm#q7
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
news:ebuwwAh2DHA.1908@.TK2MSFTNGP10.phx.gbl...
I found :
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:
80/support/kb/articles/q247/0/70.ASP&NoWebContent=1
--
Yannick LEJEUNE - MVP C#
Directeur Institut d'Innovation informatique pour l'Entreprise
c/o EPITA (French Computer Engineering School)
http://www.3ie.org
"Yannick LEJEUNE [MVP]" <yannick@.3ie.org> a écrit dans le message de news:
%23WdPE$g2DHA.2208@.TK2MSFTNGP12.phx.gbl...
> When I click "Return all rows" in Sql Enterprise manager
> --
> Yannick Lejeune
> Directeur Institut d'Innovation informatique pour l'Entreprise
> c/o EPITA (French Computer Engineering School)
> http://www.3ie.org
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le message
de
> news: O51ioug2DHA.2180@.TK2MSFTNGP12.phx.gbl...
> > So, from which application did it not work? :-)
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> >
> >
> > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > news:#hiQ8lg2DHA.2000@.TK2MSFTNGP11.phx.gbl...
> > With Query Analyzer it works...
> >
> > --
> > Yannick LEJEUNE - MVP C#
> > Directeur Institut d'Innovation informatique pour l'Entreprise
> > c/o EPITA (French Computer Engineering School)
> > http://www.3ie.org
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
message
> de
> > news: ei5t41f2DHA.2032@.TK2MSFTNGP09.phx.gbl...
> > > Using Query Analyzer?
> > >
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > http://vyaskn.tripod.com/
> > > Is .NET important for a database professional?
> > > http://vyaskn.tripod.com/poll.htm
> > >
> > >
> > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > news:u8OQzxf2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> > > The query is directly done on the server :(
> > >
> > > --
> > > Yannick LEJEUNE - MVP C#
> > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > c/o EPITA (French Computer Engineering School)
> > > http://www.3ie.org
> > >
> > >
> > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> message
> > de
> > > news: eaZsVof2DHA.536@.tk2msftngp13.phx.gbl...
> > > > Are you using ADO? If so, you will have to set the CommandTimeout
> > property
> > > > of your Connection or Command object.
> > > > --
> > > > HTH,
> > > > Vyas, MVP (SQL Server)
> > > > http://vyaskn.tripod.com/
> > > > Is .NET important for a database professional?
> > > > http://vyaskn.tripod.com/poll.htm
> > > >
> > > >
> > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > news:%23jzFikf2DHA.2428@.tk2msftngp13.phx.gbl...
> > > > [Microsoft][SqlServerODBCDriver]Timeout expired
> > > >
> > > > I have already set the timeout of the driver to the maximum value.
> > > >
> > > > Thank you for your help I really need it :)
> > > >
> > > > --
> > > > Yannick LEJEUNE - MVP C#
> > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > c/o EPITA (French Computer Engineering School)
> > > > http://www.3ie.org
> > > >
> > > >
> > > > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> a écrit dans le
> > message
> > > de
> > > > news: uZPM7gf2DHA.3140@.tk2msftngp13.phx.gbl...
> > > > > What is the error you are getting?
> > > > > --
> > > > > HTH,
> > > > > Vyas, MVP (SQL Server)
> > > > > http://vyaskn.tripod.com/
> > > > > Is .NET important for a database professional?
> > > > > http://vyaskn.tripod.com/poll.htm
> > > > >
> > > > >
> > > > > "Yannick LEJEUNE [MVP]" <yannick@.3ie.org> wrote in message
> > > > > news:ea61RPf2DHA.1272@.TK2MSFTNGP12.phx.gbl...
> > > > > Hi,
> > > > >
> > > > > After restoration of my database, I need to rebuil my views.
> > > > > The query I use needs 7 mn to build it and it cannot be fulfilled.
> > > > > I've set the querytimeout parameter to 0 (unlimited) and I've
> > allocated
> > > > > physcical memory to the server.
> > > > >
> > > > > What else can I do?
> > > > >
> > > > > Thanks
> > > > >
> > > > > --
> > > > > Yannick LEJEUNE - MVP C#
> > > > > Directeur Institut d'Innovation informatique pour l'Entreprise
> > > > > c/o EPITA (French Computer Engineering School)
> > > > > http://www.3ie.org
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> >
>