Showing posts with label rows. Show all posts
Showing posts with label rows. Show all posts

Monday, March 19, 2012

Can't see data anymore!

I have had an issue when I try to return all rows or do a query on my data
tables. I get the error 8007007F unknown error
I have tried to instal the newest service releases sp3, and have had no
luck. I have upgraded my server to MS Server 2003.
If you have any ideas, I desparately need them!
Thanks
DerekTry re-install MDAC2.8.
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:A58B499A-6AD8-4AA7-9E7B-C8FCD27C0B4F@.microsoft.com...
> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek|||Install SP3a. The SQL Server version will be 8.00.760 (SP3).
"dkoz" wrote:
> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek|||Still no go. I have installed the sp3a, and have done just about everything
I can think of other then reinstalling the SQL server.
Quite frustrating!
"Richard_SQL" wrote:
> Install SP3a. The SQL Server version will be 8.00.760 (SP3).
>
> "dkoz" wrote:
> > I have had an issue when I try to return all rows or do a query on my data
> > tables. I get the error 8007007F unknown error
> > I have tried to instal the newest service releases sp3, and have had no
> > luck. I have upgraded my server to MS Server 2003.
> >
> > If you have any ideas, I desparately need them!
> > Thanks
> > Derek|||Did you try re-install MDAC2.8?
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:5DF77B1A-C076-46CF-B854-B830F5171B9D@.microsoft.com...
> Still no go. I have installed the sp3a, and have done just about
everything
> I can think of other then reinstalling the SQL server.
> Quite frustrating!
> "Richard_SQL" wrote:
> > Install SP3a. The SQL Server version will be 8.00.760 (SP3).
> >
> >
> >
> > "dkoz" wrote:
> >
> > > I have had an issue when I try to return all rows or do a query on my
data
> > > tables. I get the error 8007007F unknown error
> > > I have tried to instal the newest service releases sp3, and have had
no
> > > luck. I have upgraded my server to MS Server 2003.
> > >
> > > If you have any ideas, I desparately need them!
> > > Thanks
> > > Derek

Can't see data anymore!

I have had an issue when I try to return all rows or do a query on my data
tables. I get the error 8007007F unknown error
I have tried to instal the newest service releases sp3, and have had no
luck. I have upgraded my server to MS Server 2003.
If you have any ideas, I desparately need them!
Thanks
DerekTry re-install MDAC2.8.
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:A58B499A-6AD8-4AA7-9E7B-C8FCD27C0B4F@.microsoft.com...
> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek|||Install SP3a. The SQL Server version will be 8.00.760 (SP3).
"dkoz" wrote:

> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek|||Still no go. I have installed the sp3a, and have done just about everything
I can think of other then reinstalling the SQL server.
Quite frustrating!
"Richard_SQL" wrote:
[vbcol=seagreen]
> Install SP3a. The SQL Server version will be 8.00.760 (SP3).
>
> "dkoz" wrote:
>|||Did you try re-install MDAC2.8?
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:5DF77B1A-C076-46CF-B854-B830F5171B9D@.microsoft.com...
> Still no go. I have installed the sp3a, and have done just about
everything[vbcol=seagreen]
> I can think of other then reinstalling the SQL server.
> Quite frustrating!
> "Richard_SQL" wrote:
>
data[vbcol=seagreen]
no[vbcol=seagreen]

Can't see data anymore!

I have had an issue when I try to return all rows or do a query on my data
tables. I get the error 8007007F unknown error
I have tried to instal the newest service releases sp3, and have had no
luck. I have upgraded my server to MS Server 2003.
If you have any ideas, I desparately need them!
Thanks
Derek
Try re-install MDAC2.8.
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:A58B499A-6AD8-4AA7-9E7B-C8FCD27C0B4F@.microsoft.com...
> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek
|||Install SP3a. The SQL Server version will be 8.00.760 (SP3).
"dkoz" wrote:

> I have had an issue when I try to return all rows or do a query on my data
> tables. I get the error 8007007F unknown error
> I have tried to instal the newest service releases sp3, and have had no
> luck. I have upgraded my server to MS Server 2003.
> If you have any ideas, I desparately need them!
> Thanks
> Derek
|||Still no go. I have installed the sp3a, and have done just about everything
I can think of other then reinstalling the SQL server.
Quite frustrating!
"Richard_SQL" wrote:
[vbcol=seagreen]
> Install SP3a. The SQL Server version will be 8.00.760 (SP3).
>
> "dkoz" wrote:
|||Did you try re-install MDAC2.8?
Ayad
"dkoz" <dkoz@.discussions.microsoft.com> wrote in message
news:5DF77B1A-C076-46CF-B854-B830F5171B9D@.microsoft.com...
> Still no go. I have installed the sp3a, and have done just about
everything[vbcol=seagreen]
> I can think of other then reinstalling the SQL server.
> Quite frustrating!
> "Richard_SQL" wrote:
data[vbcol=seagreen]
no[vbcol=seagreen]

Sunday, March 11, 2012

can't return zero when no rows exist using aggregate function sum

Hi,
I'm having a heck of a time trying to get SQL Server 2000 to return a
zero (0) if no rows are returned in a sum() statement. I know in
Oracle you wrap an NVL around the whole shebang, and in Googling it
seems as if SQL Server should work this way, too. But I cannot get it
to work, I just keep getting null.
I have tried:
what I thought would work:
SELECT ISNULL(SUM(ISNULL(PointValue, 0)), 0)
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()
GROUP BY [File #]
a case statement testing for null:
SELECT CASE
WHEN SUM(ISNULL(PointValue, 0)) IS NULL THEN 0
ELSE SUM(ISNULL(PointValue, 0))
END
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()
GROUP BY [File #]
wrapping the whole select statement in ISNULL as a subquery:
SELECT ISNULL((SELECT SUM(ISNULL(PointValue, 0))
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()), 0)
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()
and then to make sure what I was getting back was null and not empty
...something:
declare
@.n_sum numeric(6, 2)
SELECT @.n_sum = ISNULL(SUM(ISNULL(PointValue, 0)), 0)
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()
GROUP BY [File #]
print 'sum is: ' + convert(char(8), isnull(@.n_sum, 0))
sum is: 0.00
What the heck am I doing wrong? I tried setting ANSI_NULL off and on,
etc...but no go. I guess I could get around by using the variable and
then returning that to the VB (since this is a stored proc used to find
one value to return to the VB6 program), but that seems kind of messy.
I would appreciate any help!
TIA
PatCould you provide actual specs and desired results?
http://www.aspfaq.com/5006

> I'm having a heck of a time trying to get SQL Server 2000 to return a
> zero (0) if no rows are returned in a sum() statement.|||I need to say this - I inherited this code and database structure!!!!
CREATE TABLE [tbl_Attendance_Event] (
[EventCode] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[File #] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Event Type] [numeric](9, 0) NULL ,
[EventDescription] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[Excused] [bit] NULL ,
[EventDate] [smalldatetime] NULL ,
[EventDuration] [money] NULL ,
[PointValue] [money] NULL ,
[ConsecDayCount] [numeric](9, 0) NULL ,
[Consecutive_Days] [bit] NULL ,
[EventRemove] [bit] NULL ,
[EventRemoveDate] [datetime] NULL ,
CONSTRAINT [PK_tbl_Attendance_Event] PRIMARY KEY NONCLUSTERED
(
[EventCode]
) WITH FILLFACTOR = 90 ON [PRIMARY] ,
CONSTRAINT [FK_tbl_Attendance_Event_tbl_Event_Types
] FOREIGN KEY
(
[Event Type]
) REFERENCES [tbl_Event_Types] (
[EventID]
)
) ON [PRIMARY]
GO
CREATE TABLE [tbl_Event_Types] (
[EventID] [numeric](9, 0) IDENTITY (1, 1) NOT NULL ,
[EventDescription] [varchar] (75) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[EventPoints] [smallmoney] NULL ,
[ExcepID] [numeric](9, 0) NULL ,
[TardyLogic] [bit] NULL ,
[Minimum Minutes] [numeric](9, 0) NULL ,
[Maximum Minutes] [numeric](9, 0) NULL ,
[ExtendsYearWindow] [bit] NULL CONSTRAINT
[DF_tbl_Event_Types_ExtendsYearWindow] DEFAULT (0),
[RuinsPerfectMonthlyAttendace] [bit] NOT NULL CONSTRAINT
[DF_tbl_Event_Types_RuinsPerfectMonthlyA
ttendace] DEFAULT (0),
[LogEvent] [bit] NULL ,
[PayCodeEvent] [bit] NULL ,
[Paycode] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Consecutive_Days] [bit] NULL ,
[AddToDropOffPeriod] [bit] NULL ,
CONSTRAINT [PK_tbl_Event_Types] PRIMARY KEY CLUSTERED
(
[EventID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]
GO
There are currently no rows that match the query, but I want to get
back a zero if that is the case. In other words, no rows = 0 for my
purposes. This query is in a stored procedure that returns the number
of points an employee has, so if there are no points I'd like a zero,
to do further processing with that zero. I could mess with the VB code
to make it zero there if there's no rows in the recordset, but this is
something that I've done with Oracle and is very useful in lots of
cases. I've Googled and seen responses that the
isnull(sum(isnull(expression, value)), value) should work, so I'm
missing something here!
Thanks
Pat|||If you want to see the groups where no matching rows exist by the where
clause, then you have to use [ALL] in the group by clause.
-- this is to reproduce what is happening to you
select c1, isnull(sum(1), 0)
from (select 1) as t1(c1)
where (c1 = 2)
group by c1
-- this is what you want
select c1, isnull(sum(1), 0)
from (select 1) as t1(c1)
where (c1 = 2)
group by all c1
go
AMB
"miapjp@.gmail.com" wrote:

> Hi,
> I'm having a heck of a time trying to get SQL Server 2000 to return a
> zero (0) if no rows are returned in a sum() statement. I know in
> Oracle you wrap an NVL around the whole shebang, and in Googling it
> seems as if SQL Server should work this way, too. But I cannot get it
> to work, I just keep getting null.
> I have tried:
> what I thought would work:
>
> SELECT ISNULL(SUM(ISNULL(PointValue, 0)), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
> a case statement testing for null:
> SELECT CASE
> WHEN SUM(ISNULL(PointValue, 0)) IS NULL THEN 0
> ELSE SUM(ISNULL(PointValue, 0))
> END
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
>
> wrapping the whole select statement in ISNULL as a subquery:
> SELECT ISNULL((SELECT SUM(ISNULL(PointValue, 0))
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> and then to make sure what I was getting back was null and not empty
> ....something:
> declare
> @.n_sum numeric(6, 2)
> SELECT @.n_sum = ISNULL(SUM(ISNULL(PointValue, 0)), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
> print 'sum is: ' + convert(char(8), isnull(@.n_sum, 0))
> sum is: 0.00
> What the heck am I doing wrong? I tried setting ANSI_NULL off and on,
> etc...but no go. I guess I could get around by using the variable and
> then returning that to the VB (since this is a stored proc used to find
> one value to return to the VB6 program), but that seems kind of messy.
> I would appreciate any help!
> TIA
> Pat
>|||You are dealing with two separate questions.
1. What is the sum on each row when there are records
2. What are the number of records (only important if 0)
One possible solution:
SELECT into a temp table. If the temp table has no rows, insert a row with
0. SELECT back off the temp table for your return value.
Since you have a filter on [File #], another option is to select into a
value and then test @.@.RowCount and set the value to 0 if @.@.RowCount = 0.
SOmething like:
DECLARE @.ReturnValue decimal
SELECT @.ReturnValue = ISNULL(SUM(ISNULL(PointValue, 0)), 0)
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '2/24/2005' AND getdate()
GROUP BY [File #]
IF (@.@.ROWCOUNT = 0)
SET @.ReturnValue = 0
SELECT @.ReturnValue
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"miapjp@.gmail.com" wrote:

> Hi,
> I'm having a heck of a time trying to get SQL Server 2000 to return a
> zero (0) if no rows are returned in a sum() statement. I know in
> Oracle you wrap an NVL around the whole shebang, and in Googling it
> seems as if SQL Server should work this way, too. But I cannot get it
> to work, I just keep getting null.
> I have tried:
> what I thought would work:
>
> SELECT ISNULL(SUM(ISNULL(PointValue, 0)), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
> a case statement testing for null:
> SELECT CASE
> WHEN SUM(ISNULL(PointValue, 0)) IS NULL THEN 0
> ELSE SUM(ISNULL(PointValue, 0))
> END
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
>
> wrapping the whole select statement in ISNULL as a subquery:
> SELECT ISNULL((SELECT SUM(ISNULL(PointValue, 0))
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> and then to make sure what I was getting back was null and not empty
> ....something:
> declare
> @.n_sum numeric(6, 2)
> SELECT @.n_sum = ISNULL(SUM(ISNULL(PointValue, 0)), 0)
> FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
> tbl_event_types et ON ae.[event type] = et.eventID
> WHERE [File #] = '0001001047'
> AND EventDate BETWEEN '2/24/2005' AND getdate()
> GROUP BY [File #]
> print 'sum is: ' + convert(char(8), isnull(@.n_sum, 0))
> sum is: 0.00
> What the heck am I doing wrong? I tried setting ANSI_NULL off and on,
> etc...but no go. I guess I could get around by using the variable and
> then returning that to the VB (since this is a stored proc used to find
> one value to return to the VB6 program), but that seems kind of messy.
> I would appreciate any help!
> TIA
> Pat
>|||> There are currently no rows that match the query, but I want to get
> back a zero if that is the case.
Assuming that PointValue will always be positive if it *has* a value, you
can do this ugly stuff...
SELECT MAX(foo) FROM
(SELECT foo = COALESCE(SUM(PointValue),0)
FROM dbo.[tbl_Attendance_Event] ae INNER JOIN
tbl_event_types et ON ae.[event type] = et.eventID
WHERE [File #] = '0001001047'
AND EventDate BETWEEN '20050224' -- m/dd/yyyy is a terrible format
AND getdate()
UNION SELECT foo = 0) x|||>> ..get SQL Server 2000 to return a zero (0) if no rows are returned in a s
um() statement <<
SELECT COALESCE (SUM(i), 0) FROM EmptyTable;
However, what you are actually getting back is an empty set (ab nulo,
ex nulo) and the empty set is converted into a NULL. This is important
when you use EXISTS() predicates.|||>> There are currently no rows that match the query, but I want to get
back a zero if that is the case. In other words, no rows = 0 for my
purposes.
<<
then why don't you add a dummy row to every group:
select a, sum(b) from(
select a,b from some_table
union all
select distinct a, 0 from some_table) t|||Aha!
when I have the where clause limiting the sum, I don't need the group
by (right?). The original code also had the [file #] (again, not my
code, I don't make column names with spaces!!) in the select statement
even though it wasn't ever used - I don't know, I'm trying to make this
whole application work with bad code and bad underlying database
structure. In any case, I was trying to shoehorn in code to existing
code and not seeing the group by wasn't needed.
Thanks!!!!!

Saturday, February 25, 2012

can't open tables -> return all rows

Hello Everyone,
I am having trouble with opening any of the tables in any
of my databases in SQL Serve 7.
The error message i get is:
"Unexpectd Error happened during this operation.
[Query] - Query Designer encountered a querey error:
Unspecified error"
Please advise.
Thank you!
MitraHi Mitra. How've you been?
This problem seems to be from a corrupted DLL in EM. You might need to
reinstall it. Good luck to you.
Alex Ivascu
"mitra fatholahi" <mitra928@.hotmail.com> wrote in message
news:046a01c398ee$e384b770$a401280a@.phx.gbl...
> Hello Everyone,
> I am having trouble with opening any of the tables in any
> of my databases in SQL Serve 7.
> The error message i get is:
> "Unexpectd Error happened during this operation.
> [Query] - Query Designer encountered a querey error:
> Unspecified error"
> Please advise.
> Thank you!
> Mitra
>|||Hi Alex,
I can't believe that you replied to my question. It's so
nice to hear from someone i know.
Thanks so much for your comment. I am going to reboot my
system and see if that will help else i have to reinstall
like you had suggested.
Mitra
>--Original Message--
>Hi Mitra. How've you been?
>This problem seems to be from a corrupted DLL in EM. You
might need to
>reinstall it. Good luck to you.
>Alex Ivascu
>
>"mitra fatholahi" <mitra928@.hotmail.com> wrote in message
>news:046a01c398ee$e384b770$a401280a@.phx.gbl...
>> Hello Everyone,
>> I am having trouble with opening any of the tables in
any
>> of my databases in SQL Serve 7.
>> The error message i get is:
>> "Unexpectd Error happened during this operation.
>> [Query] - Query Designer encountered a querey error:
>> Unspecified error"
>> Please advise.
>> Thank you!
>> Mitra
>>
>
>.
>|||> I am having trouble with opening any of the tables in any
> of my databases in SQL Serve 7.
> The error message i get is:
> "Unexpectd Error happened during this operation.
> [Query] - Query Designer encountered a querey error:
> Unspecified error"
You might get more reliable results if you use Query Analyzer to view /
change data.

Friday, February 10, 2012

cant get the correct num of rows from Oracle. in 2 SQL servers ( sql 7.0 and SQL 2000)

I ve got an Oracle 9. server running on AIx.
and One SQL Server 2000 Sp 3on w2k
and SQL server 7 on Winnt 4.0
i did link this Oracle server on both SQL serevrs. When run an simple SQL
query i got different results.
Num of rows are always different In SQL server 7.0 i got 49430 rows( when i
check in oracle its correct)
In SQL SErver 2000 i got
49336 rows.
Any idea ?Possibly handling of NULLS can cause a difference. Can you post the two queries?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>I ve got an Oracle 9. server running on AIx.
> and One SQL Server 2000 Sp 3on w2k
> and SQL server 7 on Winnt 4.0
>
> i did link this Oracle server on both SQL serevrs. When run an simple SQL
> query i got different results.
> Num of rows are always different In SQL server 7.0 i got 49430 rows( when i
> check in oracle its correct)
> In SQL SErver 2000 i got
> 49336 rows.
> Any idea ?
>
>|||Ty tibor..
Query is the same
select count(*) from openquery(baanb,'select t$item from baan.ttiitm001501')
in SQL server 7.0 this query returns 49439
in SQL server 2000 it returns 49340
and not only in this query .. if number of rows returned from the openquery
statement get biggers number of lost rows get bigger too
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> Possibly handling of NULLS can cause a difference. Can you post the two
queries?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >I ve got an Oracle 9. server running on AIx.
> >
> > and One SQL Server 2000 Sp 3on w2k
> > and SQL server 7 on Winnt 4.0
> >
> >
> > i did link this Oracle server on both SQL serevrs. When run an simple
SQL
> > query i got different results.
> >
> > Num of rows are always different In SQL server 7.0 i got 49430 rows(
when i
> > check in oracle its correct)
> > In SQL SErver 2000 i
got
> > 49336 rows.
> >
> > Any idea ?
> >
> >
> >
> >
>|||Is there a tool like Profiler available for Oracle? If so, can you trace the query submitted to
Oracle and see if they are the same? What if you execute the same query directly on the Oracle
Server? What number of rows is the correct number?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> Ty tibor..
> Query is the same
> select count(*) from openquery(baanb,'select t$item from baan.ttiitm001501')
> in SQL server 7.0 this query returns 49439
> in SQL server 2000 it returns 49340
>
> and not only in this query .. if number of rows returned from the openquery
> statement get biggers number of lost rows get bigger too
>
>
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
>> Possibly handling of NULLS can cause a difference. Can you post the two
> queries?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>> >I ve got an Oracle 9. server running on AIx.
>> >
>> > and One SQL Server 2000 Sp 3on w2k
>> > and SQL server 7 on Winnt 4.0
>> >
>> >
>> > i did link this Oracle server on both SQL serevrs. When run an simple
> SQL
>> > query i got different results.
>> >
>> > Num of rows are always different In SQL server 7.0 i got 49430 rows(
> when i
>> > check in oracle its correct)
>> > In SQL SErver 2000 i
> got
>> > 49336 rows.
>> >
>> > Any idea ?
>> >
>> >
>> >
>> >
>>
>|||This Query is just an Example..
When i run this query in Oracle number of rows is the same as SQL server 7.0
it returns 49439 ..
Both MDAC versions are 2.8
Both Oracle ODBC Drivers r same 9.2.0.5
i did try all attributes.. and check hundreds of pages from MSDN or OTN but
no solution yet ..
when i try to get records from Oracle there is always 99 rows difference.
between SQL 2000 and SQL 7.0
Not according to rowsize, or table or other things...
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> Is there a tool like Profiler available for Oracle? If so, can you trace
the query submitted to
> Oracle and see if they are the same? What if you execute the same query
directly on the Oracle
> Server? What number of rows is the correct number?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> > Ty tibor..
> >
> > Query is the same
> >
> > select count(*) from openquery(baanb,'select t$item from
baan.ttiitm001501')
> >
> > in SQL server 7.0 this query returns 49439
> >
> > in SQL server 2000 it returns 49340
> >
> >
> > and not only in this query .. if number of rows returned from the
openquery
> > statement get biggers number of lost rows get bigger too
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> >> Possibly handling of NULLS can cause a difference. Can you post the two
> > queries?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >> >I ve got an Oracle 9. server running on AIx.
> >> >
> >> > and One SQL Server 2000 Sp 3on w2k
> >> > and SQL server 7 on Winnt 4.0
> >> >
> >> >
> >> > i did link this Oracle server on both SQL serevrs. When run an simple
> > SQL
> >> > query i got different results.
> >> >
> >> > Num of rows are always different In SQL server 7.0 i got 49430 rows(
> > when i
> >> > check in oracle its correct)
> >> > In SQL SErver 2000
i
> > got
> >> > 49336 rows.
> >> >
> >> > Any idea ?
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
>|||The reason I asked to post the query was to see whether there is anything in the query that can
explain the difference. As I said in the original post, one such possibility id difference regarding
handling of NULLs.
Also, did you try to catch the SQL statement submitted form SQL Server to Oracle to see if they are
the same from 7.0 and 2000?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> This Query is just an Example..
> When i run this query in Oracle number of rows is the same as SQL server 7.0
> it returns 49439 ..
> Both MDAC versions are 2.8
> Both Oracle ODBC Drivers r same 9.2.0.5
> i did try all attributes.. and check hundreds of pages from MSDN or OTN but
> no solution yet ..
> when i try to get records from Oracle there is always 99 rows difference.
> between SQL 2000 and SQL 7.0
> Not according to rowsize, or table or other things...
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
>> Is there a tool like Profiler available for Oracle? If so, can you trace
> the query submitted to
>> Oracle and see if they are the same? What if you execute the same query
> directly on the Oracle
>> Server? What number of rows is the correct number?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
>> > Ty tibor..
>> >
>> > Query is the same
>> >
>> > select count(*) from openquery(baanb,'select t$item from
> baan.ttiitm001501')
>> >
>> > in SQL server 7.0 this query returns 49439
>> >
>> > in SQL server 2000 it returns 49340
>> >
>> >
>> > and not only in this query .. if number of rows returned from the
> openquery
>> > statement get biggers number of lost rows get bigger too
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
>> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
>> >> Possibly handling of NULLS can cause a difference. Can you post the two
>> > queries?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>> >> >I ve got an Oracle 9. server running on AIx.
>> >> >
>> >> > and One SQL Server 2000 Sp 3on w2k
>> >> > and SQL server 7 on Winnt 4.0
>> >> >
>> >> >
>> >> > i did link this Oracle server on both SQL serevrs. When run an simple
>> > SQL
>> >> > query i got different results.
>> >> >
>> >> > Num of rows are always different In SQL server 7.0 i got 49430 rows(
>> > when i
>> >> > check in oracle its correct)
>> >> > In SQL SErver 2000
> i
>> > got
>> >> > 49336 rows.
>> >> >
>> >> > Any idea ?
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>|||Hi Tibor..
I did Trace it on Oracle..
In trace Oracle Send number of 49439 rows for all queries, but SQL 200 and
SQL 7.0 get rows different.
And Also i did try it with an Test Oracle Server..
Its the same..
SQL 2000 get 99 rows less then SQL 7.0
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
> The reason I asked to post the query was to see whether there is anything
in the query that can
> explain the difference. As I said in the original post, one such
possibility id difference regarding
> handling of NULLs.
> Also, did you try to catch the SQL statement submitted form SQL Server to
Oracle to see if they are
> the same from 7.0 and 2000?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> > This Query is just an Example..
> >
> > When i run this query in Oracle number of rows is the same as SQL server
7.0
> > it returns 49439 ..
> >
> > Both MDAC versions are 2.8
> > Both Oracle ODBC Drivers r same 9.2.0.5
> >
> > i did try all attributes.. and check hundreds of pages from MSDN or OTN
but
> > no solution yet ..
> >
> > when i try to get records from Oracle there is always 99 rows
difference.
> > between SQL 2000 and SQL 7.0
> >
> > Not according to rowsize, or table or other things...
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> >> Is there a tool like Profiler available for Oracle? If so, can you
trace
> > the query submitted to
> >> Oracle and see if they are the same? What if you execute the same query
> > directly on the Oracle
> >> Server? What number of rows is the correct number?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> >> > Ty tibor..
> >> >
> >> > Query is the same
> >> >
> >> > select count(*) from openquery(baanb,'select t$item from
> > baan.ttiitm001501')
> >> >
> >> > in SQL server 7.0 this query returns 49439
> >> >
> >> > in SQL server 2000 it returns 49340
> >> >
> >> >
> >> > and not only in this query .. if number of rows returned from the
> > openquery
> >> > statement get biggers number of lost rows get bigger too
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> >> >> Possibly handling of NULLS can cause a difference. Can you post the
two
> >> > queries?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >> >> >I ve got an Oracle 9. server running on AIx.
> >> >> >
> >> >> > and One SQL Server 2000 Sp 3on w2k
> >> >> > and SQL server 7 on Winnt 4.0
> >> >> >
> >> >> >
> >> >> > i did link this Oracle server on both SQL serevrs. When run an
simple
> >> > SQL
> >> >> > query i got different results.
> >> >> >
> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
rows(
> >> > when i
> >> >> > check in oracle its correct)
> >> >> > In SQL SErver
2000
> > i
> >> > got
> >> >> > 49336 rows.
> >> >> >
> >> >> > Any idea ?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>|||Hi Melih,
I've seen this once and i my case it turns out to be a missing primary key
( which was my fault, I accidentely deleted it ). Any Indexes involved ?
Regards,
Meinhard
"Melih SARICA" <melihsarica@.hotmail.com> schrieb im Newsbeitrag
news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> Hi Tibor..
> I did Trace it on Oracle..
> In trace Oracle Send number of 49439 rows for all queries, but SQL 200 and
> SQL 7.0 get rows different.
> And Also i did try it with an Test Oracle Server..
> Its the same..
> SQL 2000 get 99 rows less then SQL 7.0
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
>> The reason I asked to post the query was to see whether there is anything
> in the query that can
>> explain the difference. As I said in the original post, one such
> possibility id difference regarding
>> handling of NULLs.
>> Also, did you try to catch the SQL statement submitted form SQL Server to
> Oracle to see if they are
>> the same from 7.0 and 2000?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
>> > This Query is just an Example..
>> >
>> > When i run this query in Oracle number of rows is the same as SQL
>> > server
> 7.0
>> > it returns 49439 ..
>> >
>> > Both MDAC versions are 2.8
>> > Both Oracle ODBC Drivers r same 9.2.0.5
>> >
>> > i did try all attributes.. and check hundreds of pages from MSDN or
>> > OTN
> but
>> > no solution yet ..
>> >
>> > when i try to get records from Oracle there is always 99 rows
> difference.
>> > between SQL 2000 and SQL 7.0
>> >
>> > Not according to rowsize, or table or other things...
>> >
>> >
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
>> > wrote
> in
>> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
>> >> Is there a tool like Profiler available for Oracle? If so, can you
> trace
>> > the query submitted to
>> >> Oracle and see if they are the same? What if you execute the same
>> >> query
>> > directly on the Oracle
>> >> Server? What number of rows is the correct number?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
>> >> > Ty tibor..
>> >> >
>> >> > Query is the same
>> >> >
>> >> > select count(*) from openquery(baanb,'select t$item from
>> > baan.ttiitm001501')
>> >> >
>> >> > in SQL server 7.0 this query returns 49439
>> >> >
>> >> > in SQL server 2000 it returns 49340
>> >> >
>> >> >
>> >> > and not only in this query .. if number of rows returned from the
>> > openquery
>> >> > statement get biggers number of lost rows get bigger too
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
>> > in
>> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
>> >> >> Possibly handling of NULLS can cause a difference. Can you post the
> two
>> >> > queries?
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>> >> >> >I ve got an Oracle 9. server running on AIx.
>> >> >> >
>> >> >> > and One SQL Server 2000 Sp 3on w2k
>> >> >> > and SQL server 7 on Winnt 4.0
>> >> >> >
>> >> >> >
>> >> >> > i did link this Oracle server on both SQL serevrs. When run an
> simple
>> >> > SQL
>> >> >> > query i got different results.
>> >> >> >
>> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
> rows(
>> >> > when i
>> >> >> > check in oracle its correct)
>> >> >> > In SQL SErver
> 2000
>> > i
>> >> > got
>> >> >> > 49336 rows.
>> >> >> >
>> >> >> > Any idea ?
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>|||I was referring to tracing the SQL query, not the result.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> Hi Tibor..
> I did Trace it on Oracle..
> In trace Oracle Send number of 49439 rows for all queries, but SQL 200 and
> SQL 7.0 get rows different.
> And Also i did try it with an Test Oracle Server..
> Its the same..
> SQL 2000 get 99 rows less then SQL 7.0
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
>> The reason I asked to post the query was to see whether there is anything
> in the query that can
>> explain the difference. As I said in the original post, one such
> possibility id difference regarding
>> handling of NULLs.
>> Also, did you try to catch the SQL statement submitted form SQL Server to
> Oracle to see if they are
>> the same from 7.0 and 2000?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
>> > This Query is just an Example..
>> >
>> > When i run this query in Oracle number of rows is the same as SQL server
> 7.0
>> > it returns 49439 ..
>> >
>> > Both MDAC versions are 2.8
>> > Both Oracle ODBC Drivers r same 9.2.0.5
>> >
>> > i did try all attributes.. and check hundreds of pages from MSDN or OTN
> but
>> > no solution yet ..
>> >
>> > when i try to get records from Oracle there is always 99 rows
> difference.
>> > between SQL 2000 and SQL 7.0
>> >
>> > Not according to rowsize, or table or other things...
>> >
>> >
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
>> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
>> >> Is there a tool like Profiler available for Oracle? If so, can you
> trace
>> > the query submitted to
>> >> Oracle and see if they are the same? What if you execute the same query
>> > directly on the Oracle
>> >> Server? What number of rows is the correct number?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
>> >> > Ty tibor..
>> >> >
>> >> > Query is the same
>> >> >
>> >> > select count(*) from openquery(baanb,'select t$item from
>> > baan.ttiitm001501')
>> >> >
>> >> > in SQL server 7.0 this query returns 49439
>> >> >
>> >> > in SQL server 2000 it returns 49340
>> >> >
>> >> >
>> >> > and not only in this query .. if number of rows returned from the
>> > openquery
>> >> > statement get biggers number of lost rows get bigger too
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
>> > in
>> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
>> >> >> Possibly handling of NULLS can cause a difference. Can you post the
> two
>> >> > queries?
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>> >> >> >I ve got an Oracle 9. server running on AIx.
>> >> >> >
>> >> >> > and One SQL Server 2000 Sp 3on w2k
>> >> >> > and SQL server 7 on Winnt 4.0
>> >> >> >
>> >> >> >
>> >> >> > i did link this Oracle server on both SQL serevrs. When run an
> simple
>> >> > SQL
>> >> >> > query i got different results.
>> >> >> >
>> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
> rows(
>> >> > when i
>> >> >> > check in oracle its correct)
>> >> >> > In SQL SErver
> 2000
>> > i
>> >> > got
>> >> >> > 49336 rows.
>> >> >> >
>> >> >> > Any idea ?
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>|||its not about a specific table. I got this result in every Query.
SQL 2000 get 99 rows less then the rowcount of the table
"Meinhard Schnoor-Matriciani" <codehack@.freenet.de> wrote in message
news:2tknamF207lttU1@.uni-berlin.de...
> Hi Melih,
> I've seen this once and i my case it turns out to be a missing primary key
> ( which was my fault, I accidentely deleted it ). Any Indexes involved ?
> Regards,
> Meinhard
> "Melih SARICA" <melihsarica@.hotmail.com> schrieb im Newsbeitrag
> news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> > Hi Tibor..
> >
> > I did Trace it on Oracle..
> >
> > In trace Oracle Send number of 49439 rows for all queries, but SQL 200
and
> > SQL 7.0 get rows different.
> >
> > And Also i did try it with an Test Oracle Server..
> >
> > Its the same..
> >
> > SQL 2000 get 99 rows less then SQL 7.0
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> > in
> > message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
> >> The reason I asked to post the query was to see whether there is
anything
> > in the query that can
> >> explain the difference. As I said in the original post, one such
> > possibility id difference regarding
> >> handling of NULLs.
> >>
> >> Also, did you try to catch the SQL statement submitted form SQL Server
to
> > Oracle to see if they are
> >> the same from 7.0 and 2000?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> >> > This Query is just an Example..
> >> >
> >> > When i run this query in Oracle number of rows is the same as SQL
> >> > server
> > 7.0
> >> > it returns 49439 ..
> >> >
> >> > Both MDAC versions are 2.8
> >> > Both Oracle ODBC Drivers r same 9.2.0.5
> >> >
> >> > i did try all attributes.. and check hundreds of pages from MSDN or
> >> > OTN
> > but
> >> > no solution yet ..
> >> >
> >> > when i try to get records from Oracle there is always 99 rows
> > difference.
> >> > between SQL 2000 and SQL 7.0
> >> >
> >> > Not according to rowsize, or table or other things...
> >> >
> >> >
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> >> > wrote
> > in
> >> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> >> >> Is there a tool like Profiler available for Oracle? If so, can you
> > trace
> >> > the query submitted to
> >> >> Oracle and see if they are the same? What if you execute the same
> >> >> query
> >> > directly on the Oracle
> >> >> Server? What number of rows is the correct number?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> >> >> > Ty tibor..
> >> >> >
> >> >> > Query is the same
> >> >> >
> >> >> > select count(*) from openquery(baanb,'select t$item from
> >> > baan.ttiitm001501')
> >> >> >
> >> >> > in SQL server 7.0 this query returns 49439
> >> >> >
> >> >> > in SQL server 2000 it returns 49340
> >> >> >
> >> >> >
> >> >> > and not only in this query .. if number of rows returned from the
> >> > openquery
> >> >> > statement get biggers number of lost rows get bigger too
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> >> > in
> >> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> >> >> >> Possibly handling of NULLS can cause a difference. Can you post
the
> > two
> >> >> > queries?
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >> >> >> >I ve got an Oracle 9. server running on AIx.
> >> >> >> >
> >> >> >> > and One SQL Server 2000 Sp 3on w2k
> >> >> >> > and SQL server 7 on Winnt 4.0
> >> >> >> >
> >> >> >> >
> >> >> >> > i did link this Oracle server on both SQL serevrs. When run an
> > simple
> >> >> > SQL
> >> >> >> > query i got different results.
> >> >> >> >
> >> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
> > rows(
> >> >> > when i
> >> >> >> > check in oracle its correct)
> >> >> >> > In SQL
SErver
> > 2000
> >> > i
> >> >> > got
> >> >> >> > 49336 rows.
> >> >> >> >
> >> >> >> > Any idea ?
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>|||when i run trace including all events and objects on SQL2000.. there is
nothing seems wrong to me..
if u want i can give u the trace output.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23idNF5etEHA.1012@.TK2MSFTNGP10.phx.gbl...
> I was referring to tracing the SQL query, not the result.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> > Hi Tibor..
> >
> > I did Trace it on Oracle..
> >
> > In trace Oracle Send number of 49439 rows for all queries, but SQL 200
and
> > SQL 7.0 get rows different.
> >
> > And Also i did try it with an Test Oracle Server..
> >
> > Its the same..
> >
> > SQL 2000 get 99 rows less then SQL 7.0
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
> >> The reason I asked to post the query was to see whether there is
anything
> > in the query that can
> >> explain the difference. As I said in the original post, one such
> > possibility id difference regarding
> >> handling of NULLs.
> >>
> >> Also, did you try to catch the SQL statement submitted form SQL Server
to
> > Oracle to see if they are
> >> the same from 7.0 and 2000?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> >> > This Query is just an Example..
> >> >
> >> > When i run this query in Oracle number of rows is the same as SQL
server
> > 7.0
> >> > it returns 49439 ..
> >> >
> >> > Both MDAC versions are 2.8
> >> > Both Oracle ODBC Drivers r same 9.2.0.5
> >> >
> >> > i did try all attributes.. and check hundreds of pages from MSDN or
OTN
> > but
> >> > no solution yet ..
> >> >
> >> > when i try to get records from Oracle there is always 99 rows
> > difference.
> >> > between SQL 2000 and SQL 7.0
> >> >
> >> > Not according to rowsize, or table or other things...
> >> >
> >> >
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> >> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> >> >> Is there a tool like Profiler available for Oracle? If so, can you
> > trace
> >> > the query submitted to
> >> >> Oracle and see if they are the same? What if you execute the same
query
> >> > directly on the Oracle
> >> >> Server? What number of rows is the correct number?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> >> >> > Ty tibor..
> >> >> >
> >> >> > Query is the same
> >> >> >
> >> >> > select count(*) from openquery(baanb,'select t$item from
> >> > baan.ttiitm001501')
> >> >> >
> >> >> > in SQL server 7.0 this query returns 49439
> >> >> >
> >> >> > in SQL server 2000 it returns 49340
> >> >> >
> >> >> >
> >> >> > and not only in this query .. if number of rows returned from the
> >> > openquery
> >> >> > statement get biggers number of lost rows get bigger too
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> >> > in
> >> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> >> >> >> Possibly handling of NULLS can cause a difference. Can you post
the
> > two
> >> >> > queries?
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >> >> >> >I ve got an Oracle 9. server running on AIx.
> >> >> >> >
> >> >> >> > and One SQL Server 2000 Sp 3on w2k
> >> >> >> > and SQL server 7 on Winnt 4.0
> >> >> >> >
> >> >> >> >
> >> >> >> > i did link this Oracle server on both SQL serevrs. When run an
> > simple
> >> >> > SQL
> >> >> >> > query i got different results.
> >> >> >> >
> >> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
> > rows(
> >> >> > when i
> >> >> >> > check in oracle its correct)
> >> >> >> > In SQL
SErver
> > 2000
> >> > i
> >> >> > got
> >> >> >> > 49336 rows.
> >> >> >> >
> >> >> >> > Any idea ?
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>|||I was referring to a trace on the Oracle database, to see what SQL code the Oracle database
receives...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:%23LDd4vmtEHA.820@.TK2MSFTNGP12.phx.gbl...
> when i run trace including all events and objects on SQL2000.. there is
> nothing seems wrong to me..
> if u want i can give u the trace output.
>
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:%23idNF5etEHA.1012@.TK2MSFTNGP10.phx.gbl...
>> I was referring to tracing the SQL query, not the result.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
>> > Hi Tibor..
>> >
>> > I did Trace it on Oracle..
>> >
>> > In trace Oracle Send number of 49439 rows for all queries, but SQL 200
> and
>> > SQL 7.0 get rows different.
>> >
>> > And Also i did try it with an Test Oracle Server..
>> >
>> > Its the same..
>> >
>> > SQL 2000 get 99 rows less then SQL 7.0
>> >
>> >
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
>> > message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
>> >> The reason I asked to post the query was to see whether there is
> anything
>> > in the query that can
>> >> explain the difference. As I said in the original post, one such
>> > possibility id difference regarding
>> >> handling of NULLs.
>> >>
>> >> Also, did you try to catch the SQL statement submitted form SQL Server
> to
>> > Oracle to see if they are
>> >> the same from 7.0 and 2000?
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
>> >> > This Query is just an Example..
>> >> >
>> >> > When i run this query in Oracle number of rows is the same as SQL
> server
>> > 7.0
>> >> > it returns 49439 ..
>> >> >
>> >> > Both MDAC versions are 2.8
>> >> > Both Oracle ODBC Drivers r same 9.2.0.5
>> >> >
>> >> > i did try all attributes.. and check hundreds of pages from MSDN or
> OTN
>> > but
>> >> > no solution yet ..
>> >> >
>> >> > when i try to get records from Oracle there is always 99 rows
>> > difference.
>> >> > between SQL 2000 and SQL 7.0
>> >> >
>> >> > Not according to rowsize, or table or other things...
>> >> >
>> >> >
>> >> >
>> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
>> > in
>> >> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
>> >> >> Is there a tool like Profiler available for Oracle? If so, can you
>> > trace
>> >> > the query submitted to
>> >> >> Oracle and see if they are the same? What if you execute the same
> query
>> >> > directly on the Oracle
>> >> >> Server? What number of rows is the correct number?
>> >> >>
>> >> >> --
>> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> http://www.solidqualitylearning.com/
>> >> >>
>> >> >>
>> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
>> >> >> > Ty tibor..
>> >> >> >
>> >> >> > Query is the same
>> >> >> >
>> >> >> > select count(*) from openquery(baanb,'select t$item from
>> >> > baan.ttiitm001501')
>> >> >> >
>> >> >> > in SQL server 7.0 this query returns 49439
>> >> >> >
>> >> >> > in SQL server 2000 it returns 49340
>> >> >> >
>> >> >> >
>> >> >> > and not only in this query .. if number of rows returned from the
>> >> > openquery
>> >> >> > statement get biggers number of lost rows get bigger too
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
>> > wrote
>> >> > in
>> >> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
>> >> >> >> Possibly handling of NULLS can cause a difference. Can you post
> the
>> > two
>> >> >> > queries?
>> >> >> >>
>> >> >> >> --
>> >> >> >> Tibor Karaszi, SQL Server MVP
>> >> >> >> http://www.karaszi.com/sqlserver/default.asp
>> >> >> >> http://www.solidqualitylearning.com/
>> >> >> >>
>> >> >> >>
>> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
>> >> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
>> >> >> >> >I ve got an Oracle 9. server running on AIx.
>> >> >> >> >
>> >> >> >> > and One SQL Server 2000 Sp 3on w2k
>> >> >> >> > and SQL server 7 on Winnt 4.0
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > i did link this Oracle server on both SQL serevrs. When run an
>> > simple
>> >> >> > SQL
>> >> >> >> > query i got different results.
>> >> >> >> >
>> >> >> >> > Num of rows are always different In SQL server 7.0 i got 49430
>> > rows(
>> >> >> > when i
>> >> >> >> > check in oracle its correct)
>> >> >> >> > In SQL
> SErver
>> > 2000
>> >> > i
>> >> >> > got
>> >> >> >> > 49336 rows.
>> >> >> >> >
>> >> >> >> > Any idea ?
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>|||I did both..
Oracle exeutes the same statement and Returns the same number of rows both
SQL 7 and SQL 2000.
Problem is with the SQL server .. SQL server do something with the Rowset
and gets always 99 rows less then the original row count..
Melih SARICA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23IY7OKstEHA.2680@.TK2MSFTNGP15.phx.gbl...
> I was referring to a trace on the Oracle database, to see what SQL code
the Oracle database
> receives...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> news:%23LDd4vmtEHA.820@.TK2MSFTNGP12.phx.gbl...
> > when i run trace including all events and objects on SQL2000.. there is
> > nothing seems wrong to me..
> >
> > if u want i can give u the trace output.
> >
> >
> >
> >
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:%23idNF5etEHA.1012@.TK2MSFTNGP10.phx.gbl...
> >> I was referring to tracing the SQL query, not the result.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> >> > Hi Tibor..
> >> >
> >> > I did Trace it on Oracle..
> >> >
> >> > In trace Oracle Send number of 49439 rows for all queries, but SQL
200
> > and
> >> > SQL 7.0 get rows different.
> >> >
> >> > And Also i did try it with an Test Oracle Server..
> >> >
> >> > Its the same..
> >> >
> >> > SQL 2000 get 99 rows less then SQL 7.0
> >> >
> >> >
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> >> > message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
> >> >> The reason I asked to post the query was to see whether there is
> > anything
> >> > in the query that can
> >> >> explain the difference. As I said in the original post, one such
> >> > possibility id difference regarding
> >> >> handling of NULLs.
> >> >>
> >> >> Also, did you try to catch the SQL statement submitted form SQL
Server
> > to
> >> > Oracle to see if they are
> >> >> the same from 7.0 and 2000?
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> >> >> > This Query is just an Example..
> >> >> >
> >> >> > When i run this query in Oracle number of rows is the same as SQL
> > server
> >> > 7.0
> >> >> > it returns 49439 ..
> >> >> >
> >> >> > Both MDAC versions are 2.8
> >> >> > Both Oracle ODBC Drivers r same 9.2.0.5
> >> >> >
> >> >> > i did try all attributes.. and check hundreds of pages from MSDN
or
> > OTN
> >> > but
> >> >> > no solution yet ..
> >> >> >
> >> >> > when i try to get records from Oracle there is always 99 rows
> >> > difference.
> >> >> > between SQL 2000 and SQL 7.0
> >> >> >
> >> >> > Not according to rowsize, or table or other things...
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> >> > in
> >> >> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> >> >> >> Is there a tool like Profiler available for Oracle? If so, can
you
> >> > trace
> >> >> > the query submitted to
> >> >> >> Oracle and see if they are the same? What if you execute the same
> > query
> >> >> > directly on the Oracle
> >> >> >> Server? What number of rows is the correct number?
> >> >> >>
> >> >> >> --
> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> http://www.solidqualitylearning.com/
> >> >> >>
> >> >> >>
> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> >> >> >> > Ty tibor..
> >> >> >> >
> >> >> >> > Query is the same
> >> >> >> >
> >> >> >> > select count(*) from openquery(baanb,'select t$item from
> >> >> > baan.ttiitm001501')
> >> >> >> >
> >> >> >> > in SQL server 7.0 this query returns 49439
> >> >> >> >
> >> >> >> > in SQL server 2000 it returns 49340
> >> >> >> >
> >> >> >> >
> >> >> >> > and not only in this query .. if number of rows returned from
the
> >> >> > openquery
> >> >> >> > statement get biggers number of lost rows get bigger too
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > "Tibor Karaszi"
<tibor_please.no.email_karaszi@.hotmail.nomail.com>
> >> > wrote
> >> >> > in
> >> >> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> >> >> >> >> Possibly handling of NULLS can cause a difference. Can you
post
> > the
> >> > two
> >> >> >> > queries?
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Tibor Karaszi, SQL Server MVP
> >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> >> >> http://www.solidqualitylearning.com/
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> >> >> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> >> >> >> >> >I ve got an Oracle 9. server running on AIx.
> >> >> >> >> >
> >> >> >> >> > and One SQL Server 2000 Sp 3on w2k
> >> >> >> >> > and SQL server 7 on Winnt 4.0
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > i did link this Oracle server on both SQL serevrs. When run
an
> >> > simple
> >> >> >> > SQL
> >> >> >> >> > query i got different results.
> >> >> >> >> >
> >> >> >> >> > Num of rows are always different In SQL server 7.0 i got
49430
> >> > rows(
> >> >> >> > when i
> >> >> >> >> > check in oracle its correct)
> >> >> >> >> > In SQL
> > SErver
> >> > 2000
> >> >> > i
> >> >> >> > got
> >> >> >> >> > 49336 rows.
> >> >> >> >> >
> >> >> >> >> > Any idea ?
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>|||I'm out of ideas, I'm afraid. The only thing I can thing of is some SET setting that changed NULL
handling. Consider opening a case with MS...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Melih SARICA" <melihsarica@.hotmail.com> wrote in message
news:eoxztWztEHA.3252@.TK2MSFTNGP10.phx.gbl...
> I did both..
> Oracle exeutes the same statement and Returns the same number of rows both
> SQL 7 and SQL 2000.
> Problem is with the SQL server .. SQL server do something with the Rowset
> and gets always 99 rows less then the original row count..
>
> Melih SARICA
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:%23IY7OKstEHA.2680@.TK2MSFTNGP15.phx.gbl...
> > I was referring to a trace on the Oracle database, to see what SQL code
> the Oracle database
> > receives...
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> > news:%23LDd4vmtEHA.820@.TK2MSFTNGP12.phx.gbl...
> > > when i run trace including all events and objects on SQL2000.. there is
> > > nothing seems wrong to me..
> > >
> > > if u want i can give u the trace output.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> > > message news:%23idNF5etEHA.1012@.TK2MSFTNGP10.phx.gbl...
> > >> I was referring to tracing the SQL query, not the result.
> > >>
> > >> --
> > >> Tibor Karaszi, SQL Server MVP
> > >> http://www.karaszi.com/sqlserver/default.asp
> > >> http://www.solidqualitylearning.com/
> > >>
> > >>
> > >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> > >> news:elS%23DKetEHA.2072@.tk2msftngp13.phx.gbl...
> > >> > Hi Tibor..
> > >> >
> > >> > I did Trace it on Oracle..
> > >> >
> > >> > In trace Oracle Send number of 49439 rows for all queries, but SQL
> 200
> > > and
> > >> > SQL 7.0 get rows different.
> > >> >
> > >> > And Also i did try it with an Test Oracle Server..
> > >> >
> > >> > Its the same..
> > >> >
> > >> > SQL 2000 get 99 rows less then SQL 7.0
> > >> >
> > >> >
> > >> >
> > >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
> > > in
> > >> > message news:e0kGfVdtEHA.2072@.tk2msftngp13.phx.gbl...
> > >> >> The reason I asked to post the query was to see whether there is
> > > anything
> > >> > in the query that can
> > >> >> explain the difference. As I said in the original post, one such
> > >> > possibility id difference regarding
> > >> >> handling of NULLs.
> > >> >>
> > >> >> Also, did you try to catch the SQL statement submitted form SQL
> Server
> > > to
> > >> > Oracle to see if they are
> > >> >> the same from 7.0 and 2000?
> > >> >>
> > >> >> --
> > >> >> Tibor Karaszi, SQL Server MVP
> > >> >> http://www.karaszi.com/sqlserver/default.asp
> > >> >> http://www.solidqualitylearning.com/
> > >> >>
> > >> >>
> > >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> > >> >> news:usBSPMdtEHA.4040@.TK2MSFTNGP09.phx.gbl...
> > >> >> > This Query is just an Example..
> > >> >> >
> > >> >> > When i run this query in Oracle number of rows is the same as SQL
> > > server
> > >> > 7.0
> > >> >> > it returns 49439 ..
> > >> >> >
> > >> >> > Both MDAC versions are 2.8
> > >> >> > Both Oracle ODBC Drivers r same 9.2.0.5
> > >> >> >
> > >> >> > i did try all attributes.. and check hundreds of pages from MSDN
> or
> > > OTN
> > >> > but
> > >> >> > no solution yet ..
> > >> >> >
> > >> >> > when i try to get records from Oracle there is always 99 rows
> > >> > difference.
> > >> >> > between SQL 2000 and SQL 7.0
> > >> >> >
> > >> >> > Not according to rowsize, or table or other things...
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > > wrote
> > >> > in
> > >> >> > message news:u%23c3xDdtEHA.1720@.TK2MSFTNGP14.phx.gbl...
> > >> >> >> Is there a tool like Profiler available for Oracle? If so, can
> you
> > >> > trace
> > >> >> > the query submitted to
> > >> >> >> Oracle and see if they are the same? What if you execute the same
> > > query
> > >> >> > directly on the Oracle
> > >> >> >> Server? What number of rows is the correct number?
> > >> >> >>
> > >> >> >> --
> > >> >> >> Tibor Karaszi, SQL Server MVP
> > >> >> >> http://www.karaszi.com/sqlserver/default.asp
> > >> >> >> http://www.solidqualitylearning.com/
> > >> >> >>
> > >> >> >>
> > >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> > >> >> >> news:%23pKPi9ctEHA.2520@.tk2msftngp13.phx.gbl...
> > >> >> >> > Ty tibor..
> > >> >> >> >
> > >> >> >> > Query is the same
> > >> >> >> >
> > >> >> >> > select count(*) from openquery(baanb,'select t$item from
> > >> >> > baan.ttiitm001501')
> > >> >> >> >
> > >> >> >> > in SQL server 7.0 this query returns 49439
> > >> >> >> >
> > >> >> >> > in SQL server 2000 it returns 49340
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > and not only in this query .. if number of rows returned from
> the
> > >> >> > openquery
> > >> >> >> > statement get biggers number of lost rows get bigger too
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > "Tibor Karaszi"
> <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > >> > wrote
> > >> >> > in
> > >> >> >> > message news:Oi34g5ctEHA.636@.TK2MSFTNGP09.phx.gbl...
> > >> >> >> >> Possibly handling of NULLS can cause a difference. Can you
> post
> > > the
> > >> > two
> > >> >> >> > queries?
> > >> >> >> >>
> > >> >> >> >> --
> > >> >> >> >> Tibor Karaszi, SQL Server MVP
> > >> >> >> >> http://www.karaszi.com/sqlserver/default.asp
> > >> >> >> >> http://www.solidqualitylearning.com/
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >> >> "Melih SARICA" <melihsarica@.hotmail.com> wrote in message
> > >> >> >> >> news:%23szluxctEHA.3156@.TK2MSFTNGP12.phx.gbl...
> > >> >> >> >> >I ve got an Oracle 9. server running on AIx.
> > >> >> >> >> >
> > >> >> >> >> > and One SQL Server 2000 Sp 3on w2k
> > >> >> >> >> > and SQL server 7 on Winnt 4.0
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> > i did link this Oracle server on both SQL serevrs. When run
> an
> > >> > simple
> > >> >> >> > SQL
> > >> >> >> >> > query i got different results.
> > >> >> >> >> >
> > >> >> >> >> > Num of rows are always different In SQL server 7.0 i got
> 49430
> > >> > rows(
> > >> >> >> > when i
> > >> >> >> >> > check in oracle its correct)
> > >> >> >> >> > In SQL
> > > SErver
> > >> > 2000
> > >> >> > i
> > >> >> >> > got
> > >> >> >> >> > 49336 rows.
> > >> >> >> >> >
> > >> >> >> >> > Any idea ?
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >> >
> > >> >> >> >
> > >> >> >>
> > >> >> >>
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>