In SQL 7.0 SP3 , I am receiving this message...
Server: Msg 170, Level 15, State 1, Line 17
Line 17: Incorrect syntax near ')'.
When I try to execute this code from SQL Query Analyzer...
DECLARE @.DPPNumberCursor INT
DECLARE DPPNumberCursor Cursor for Select PPAP_ID
from ppap
where ppap_cancel <> "1" and
ppap_close <> "1" and
projectonhold <> "1"
OPEN DPPNumberCursor
Fetch Next From DPPNumberCursor
INTO @.dppnumbercursor
While @.@.Fetch_Status = 0
Begin
INSERT INTO APQPSubformTable (apqpsub_id)
Values (@.dppnumbercursor)
Bsically, I want to insert the number held in @.dppnumbercursor in the APQPSub_id field.
Any help would be appreciated.How about END at the end?|||...and DEALLOCATE/CLOSE would be very appropriate ;)|||OK, I'm an idiot...can you tell I'm a newbie? Thanks for not tearing me up too bad :-)
Thanks to both for your help....|||You're welcome...from both of us ;)|||Nobody is going to mention the double quotes?
Or the fact that s/he doesn't need a cursor at all?
INSERT INTO APQPSubformTable(apqpsub_id)
SELECT PPAP_ID
FROM ppap
WHERE ppap_cancel <> '1'
AND ppap_close <> '1'
AND projectonhold <> '1'|||I was thinking about it, but then decided not to...when he/she thanked "both" of us ;)|||It's been one of those days:-)
Just for my own edification, what about the double quotes?
The reason I used the cursor was because I needed to add two records into the APQPSubformtable for each open project in the ppap table. Here is the completed working code...
DECLARE @.DPPNumberCursor INT
DECLARE DPPNumberCursor Cursor for Select PPAP_ID
from ppap
where ppap_cancel <> "1" and
ppap_close <> "1" and
projectonhold <> "1"
OPEN DPPNumberCursor
Fetch Next From DPPNumberCursor
INTO @.dppnumbercursor
While @.@.Fetch_Status = 0
Begin
INSERT INTO APQPSubformTable (apqpsub_id,[Key_element#],key_element, resp_area, [Fkey_element#], GYR_status)
Values (@.dppnumbercursor,"31","Start Of Production (SOP) [F4]","OP","0","G")
INSERT INTO APQPSubformTable (apqpsub_id,[Key_element#],key_element, resp_area, [Fkey_element#], GYR_status)
Values (@.dppnumbercursor,"32","Stable Production (Review) [F5]","OP","0","G")
FETCH NEXT from DPPNumberCursor
INTO @.DPPNumberCursor
End
Close DPPNumberCursor|||Double-quotes are harmless as long as you know what your connection settings are when you compile your procedure/function/trigger/view (should be SET QUOTED_IDENTIFIER OFF).|||Just for my own edification, what about the double quotes?
It is a better practice to use single quotes to delimit strings. Double quotes can serve two purposes: delimit a string and delimit an identifyer (ie table name or column name). There is a QUOTED_IDENTIFYER property the determines which. Set to ON, everything within double quotes is supposed to be considered an Identifyer.
I've read in BOL that SLQ Server is 'not very rigorous' in enforcing this rule, depending on the length of the string in question. Small strings such as the ones you are using seem to work OK, but you'd be better off delimiting the strings correctly than relying on SQL Analyzer to interpret what it is you really mean.|||Don't Play with Settings...
INSERT INTO APQPSubformTable (apqpsub_id,[Key_element#],key_element, resp_area, [Fkey_element#], GYR_status)
SELECT @.dppnumbercursor,'31','Start Of Production (SOP) [F4]','OP','0','G'
UNION ALL
SELECT @.dppnumbercursor,'32','Stable Production (Review) [F5]','OP','0','G'
Showing posts with label msg. Show all posts
Showing posts with label msg. Show all posts
Monday, March 19, 2012
Wednesday, March 7, 2012
Insert query problem
I am getting this message
"Msg 128, Level 15, State 1, Line 2
The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
context. Only constants, expressions, or variables allowed here. Column name
s
are not permitted."
when i execute below query in store procedure which dynamic sql query and i
guess because @.strA and strB are string data might cuase problem as in vb.ne
t
i put single quote around it like values(' " & strA & " ',' "& strB " ')"
vb.net code... but i dont know that thing in sql server 2005 as it use singl
e
quote any body has any idea thanks
declare strA nvarchar(20), strB nvarchar(60)
@.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(' + @.strA + ','
+ @.strB + ')'how do you want the query string to look like?
is
'A0000000000 B00C3124901 C00200603071'
the value you are inserting
in that case
do this
'''A0000000000 B00C3124901 C00200603071'''
its 3 single quotes.
it would be better if you can try this out in query analyzer and find the
problem.
and why are you using dynamic SQL.
Can you paste the actual insert script that you are trying to build?
"amjad" wrote:
> I am getting this message
> "Msg 128, Level 15, State 1, Line 2
> The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
> context. Only constants, expressions, or variables allowed here. Column na
mes
> are not permitted."
> when i execute below query in store procedure which dynamic sql query and
i
> guess because @.strA and strB are string data might cuase problem as in vb.
net
> i put single quote around it like values(' " & strA & " ',' "& strB " ')"
> vb.net code... but i dont know that thing in sql server 2005 as it use sin
gle
> quote any body has any idea thanks
> declare strA nvarchar(20), strB nvarchar(60)
> @.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(' + @.strA + ','
> + @.strB + ')'|||amjad (amjad@.discussions.microsoft.com) writes:
> I am getting this message
> "Msg 128, Level 15, State 1, Line 2
> The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
> context. Only constants, expressions, or variables allowed here. Column
> names are not permitted."
> when i execute below query in store procedure which dynamic sql query
> and i guess because @.strA and strB are string data might cuase problem
> as in vb.net i put single quote around it like values(' " & strA & " ','
> "& strB " ')" vb.net code... but i dont know that thing in sql server
> 2005 as it use single quote any body has any idea thanks
> declare strA nvarchar(20), strB nvarchar(60)
> @.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B)
> VALUES(' + @.strA + ',' + @.strB + ')'
There is no quoting delimiters in the generated SQL command.
But you should not generate SQL in this way. First of all, it's a little
difficult to see why you would need to use dynamic SQL at all in a stored
procedure for a simple INSERT command. What's wrong with:
INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(@.strA, @.strB)
If there is more to it that you don't show, so dynamic SQL indeed is
necessary, you should use sp_executesql instead. This saves you from
the syntactic hassle you are running into now.
I have a longer article where I discuss dynamic SQL in general, and also
extensively cover sp_executesql. You find it on
http://www.sommarskog.se/dynamic_sql.html.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||thanks three quote solved the problem as i am doing some string manipulation
and validation on that data and put invalide data into temp table where i am
doing dynamic sql to insert one by one record. one thing more is their any
mod function in sql server like excel or vb thanks
"Omnibuzz" wrote:
> how do you want the query string to look like?
> is
> 'A0000000000 B00C3124901 C00200603071'
> the value you are inserting
> in that case
> do this
> '''A0000000000 B00C3124901 C00200603071'''
> its 3 single quotes.
> it would be better if you can try this out in query analyzer and find the
> problem.
> and why are you using dynamic SQL.
> Can you paste the actual insert script that you are trying to build?
> --
>
>
> "amjad" wrote:
>|||No sweat :)
--
"amjad" wrote:
> thanks three quote solved the problem as i am doing some string manipulati
on
> and validation on that data and put invalide data into temp table where i
am
> doing dynamic sql to insert one by one record. one thing more is their any
> mod function in sql server like excel or vb thanks
> "Omnibuzz" wrote:
>
"Msg 128, Level 15, State 1, Line 2
The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
context. Only constants, expressions, or variables allowed here. Column name
s
are not permitted."
when i execute below query in store procedure which dynamic sql query and i
guess because @.strA and strB are string data might cuase problem as in vb.ne
t
i put single quote around it like values(' " & strA & " ',' "& strB " ')"
vb.net code... but i dont know that thing in sql server 2005 as it use singl
e
quote any body has any idea thanks
declare strA nvarchar(20), strB nvarchar(60)
@.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(' + @.strA + ','
+ @.strB + ')'how do you want the query string to look like?
is
'A0000000000 B00C3124901 C00200603071'
the value you are inserting
in that case
do this
'''A0000000000 B00C3124901 C00200603071'''
its 3 single quotes.
it would be better if you can try this out in query analyzer and find the
problem.
and why are you using dynamic SQL.
Can you paste the actual insert script that you are trying to build?
"amjad" wrote:
> I am getting this message
> "Msg 128, Level 15, State 1, Line 2
> The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
> context. Only constants, expressions, or variables allowed here. Column na
mes
> are not permitted."
> when i execute below query in store procedure which dynamic sql query and
i
> guess because @.strA and strB are string data might cuase problem as in vb.
net
> i put single quote around it like values(' " & strA & " ',' "& strB " ')"
> vb.net code... but i dont know that thing in sql server 2005 as it use sin
gle
> quote any body has any idea thanks
> declare strA nvarchar(20), strB nvarchar(60)
> @.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(' + @.strA + ','
> + @.strB + ')'|||amjad (amjad@.discussions.microsoft.com) writes:
> I am getting this message
> "Msg 128, Level 15, State 1, Line 2
> The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
> context. Only constants, expressions, or variables allowed here. Column
> names are not permitted."
> when i execute below query in store procedure which dynamic sql query
> and i guess because @.strA and strB are string data might cuase problem
> as in vb.net i put single quote around it like values(' " & strA & " ','
> "& strB " ')" vb.net code... but i dont know that thing in sql server
> 2005 as it use single quote any body has any idea thanks
> declare strA nvarchar(20), strB nvarchar(60)
> @.sql='INSERT INTO [Dev Work].[dbo].[tbltemp](A,B)
> VALUES(' + @.strA + ',' + @.strB + ')'
There is no quoting delimiters in the generated SQL command.
But you should not generate SQL in this way. First of all, it's a little
difficult to see why you would need to use dynamic SQL at all in a stored
procedure for a simple INSERT command. What's wrong with:
INSERT INTO [Dev Work].[dbo].[tbltemp](A,B) VALUES(@.strA, @.strB)
If there is more to it that you don't show, so dynamic SQL indeed is
necessary, you should use sp_executesql instead. This saves you from
the syntactic hassle you are running into now.
I have a longer article where I discuss dynamic SQL in general, and also
extensively cover sp_executesql. You find it on
http://www.sommarskog.se/dynamic_sql.html.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||thanks three quote solved the problem as i am doing some string manipulation
and validation on that data and put invalide data into temp table where i am
doing dynamic sql to insert one by one record. one thing more is their any
mod function in sql server like excel or vb thanks
"Omnibuzz" wrote:
> how do you want the query string to look like?
> is
> 'A0000000000 B00C3124901 C00200603071'
> the value you are inserting
> in that case
> do this
> '''A0000000000 B00C3124901 C00200603071'''
> its 3 single quotes.
> it would be better if you can try this out in query analyzer and find the
> problem.
> and why are you using dynamic SQL.
> Can you paste the actual insert script that you are trying to build?
> --
>
>
> "amjad" wrote:
>|||No sweat :)
--
"amjad" wrote:
> thanks three quote solved the problem as i am doing some string manipulati
on
> and validation on that data and put invalide data into temp table where i
am
> doing dynamic sql to insert one by one record. one thing more is their any
> mod function in sql server like excel or vb thanks
> "Omnibuzz" wrote:
>
Sunday, February 19, 2012
Insert operation fell
Hi,
I had an application trying to insert a row into a table
and fell with the following error msg which I have copied
bellow.
I joined sysobjects and sysindexes on the id column which
is ID of the table to which the index belongs and filtered
by the table name and find that there are 15 rows in
sysindexes for the table (indid from 1 to 15). This comes
in line with the outcome of sp_helpindex. I also verified
that the given id does not belong to other object in the
db.
I fell to understand why the insert operation was trying
to update indid 21 that does not exist and should not exist
--CHECKTABLE on sysindexes found nothing to correct.
Error: 602, Severity: 21, State: 13
Could not find row in sysindexes for database ID 7, object
ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
DBSRVR - FAILED in Execute S1000 602
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
find row in sysindexes for database ID 7, object ID
1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
Thanks,
YanivTry to rebuild all table indexes - think this would help
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message
news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.|||It seems you have some corruption (inconsistency) in the database:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
> Thanks,
> Yaniv|||Thanks Alex, I would expect so but it is imoportant for me
to understand the cause to this behavior.
>--Original Message--
>Try to rebuild all table indexes - think this would help
>"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
>> Hi,
>> I had an application trying to insert a row into a table
>> and fell with the following error msg which I have
copied
>> bellow.
>> I joined sysobjects and sysindexes on the id column
which
>> is ID of the table to which the index belongs and
filtered
>> by the table name and find that there are 15 rows in
>> sysindexes for the table (indid from 1 to 15). This
comes
>> in line with the outcome of sp_helpindex. I also
verified
>> that the given id does not belong to other object in the
>> db.
>> I fell to understand why the insert operation was trying
>> to update indid 21 that does not exist and should not
exist
>> --CHECKTABLE on sysindexes found nothing to correct.
>>
>> Error: 602, Severity: 21, State: 13
>> Could not find row in sysindexes for database ID 7,
object
>> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> sysindexes.
>> DBSRVR - FAILED in Execute S1000 602
>> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
>> find row in sysindexes for database ID 7, object ID
>> 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
>
>.
>|||I think it's some hardware error when writing index trees to disk... even
best of the best may have faults, and not the men only but this creatures of
iron too. The only other cause is rare MSSQL software error - contact vendor
with details, maybe they'll find appropriate record in knowledge base
<anonymous@.discussions.microsoft.com> wrote in message
news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
> Thanks Alex, I would expect so but it is imoportant for me
> to understand the cause to this behavior.
>
>
> >--Original Message--
> >
> >Try to rebuild all table indexes - think this would help
> >
> >"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> >> Hi,
> >>
> >> I had an application trying to insert a row into a table
> >> and fell with the following error msg which I have
> copied
> >> bellow.
> >>
> >> I joined sysobjects and sysindexes on the id column
> which
> >> is ID of the table to which the index belongs and
> filtered
> >> by the table name and find that there are 15 rows in
> >> sysindexes for the table (indid from 1 to 15). This
> comes
> >> in line with the outcome of sp_helpindex. I also
> verified
> >> that the given id does not belong to other object in the
> >> db.
> >>
> >> I fell to understand why the insert operation was trying
> >> to update indid 21 that does not exist and should not
> exist
> >>
> >> --CHECKTABLE on sysindexes found nothing to correct.
> >>
> >>
> >> Error: 602, Severity: 21, State: 13
> >> Could not find row in sysindexes for database ID 7,
> object
> >> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> >> sysindexes.
> >>
> >> DBSRVR - FAILED in Execute S1000 602
> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> >> find row in sysindexes for database ID 7, object ID
> >> 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> >
> >
> >.
> >|||Thanks agaian.
>--Original Message--
>I think it's some hardware error when writing index trees
to disk... even
>best of the best may have faults, and not the men only
but this creatures of
>iron too. The only other cause is rare MSSQL software
error - contact vendor
>with details, maybe they'll find appropriate record in
knowledge base
><anonymous@.discussions.microsoft.com> wrote in message
>news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
>> Thanks Alex, I would expect so but it is imoportant for
me
>> to understand the cause to this behavior.
>>
>>
>> >--Original Message--
>> >
>> >Try to rebuild all table indexes - think this would
help
>> >
>> >"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
>> >> Hi,
>> >>
>> >> I had an application trying to insert a row into a
table
>> >> and fell with the following error msg which I have
>> copied
>> >> bellow.
>> >>
>> >> I joined sysobjects and sysindexes on the id column
>> which
>> >> is ID of the table to which the index belongs and
>> filtered
>> >> by the table name and find that there are 15 rows in
>> >> sysindexes for the table (indid from 1 to 15). This
>> comes
>> >> in line with the outcome of sp_helpindex. I also
>> verified
>> >> that the given id does not belong to other object in
the
>> >> db.
>> >>
>> >> I fell to understand why the insert operation was
trying
>> >> to update indid 21 that does not exist and should not
>> exist
>> >>
>> >> --CHECKTABLE on sysindexes found nothing to correct.
>> >>
>> >>
>> >> Error: 602, Severity: 21, State: 13
>> >> Could not find row in sysindexes for database ID 7,
>> object
>> >> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> >> sysindexes.
>> >>
>> >> DBSRVR - FAILED in Execute S1000 602
>> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could
not
>> >> find row in sysindexes for database ID 7, object ID
>> >> 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> sysindexes.
>> >
>> >
>> >.
>> >
>
>.
>
I had an application trying to insert a row into a table
and fell with the following error msg which I have copied
bellow.
I joined sysobjects and sysindexes on the id column which
is ID of the table to which the index belongs and filtered
by the table name and find that there are 15 rows in
sysindexes for the table (indid from 1 to 15). This comes
in line with the outcome of sp_helpindex. I also verified
that the given id does not belong to other object in the
db.
I fell to understand why the insert operation was trying
to update indid 21 that does not exist and should not exist
--CHECKTABLE on sysindexes found nothing to correct.
Error: 602, Severity: 21, State: 13
Could not find row in sysindexes for database ID 7, object
ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
DBSRVR - FAILED in Execute S1000 602
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
find row in sysindexes for database ID 7, object ID
1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
Thanks,
YanivTry to rebuild all table indexes - think this would help
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message
news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.|||It seems you have some corruption (inconsistency) in the database:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
> Thanks,
> Yaniv|||Thanks Alex, I would expect so but it is imoportant for me
to understand the cause to this behavior.
>--Original Message--
>Try to rebuild all table indexes - think this would help
>"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
message
>news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
>> Hi,
>> I had an application trying to insert a row into a table
>> and fell with the following error msg which I have
copied
>> bellow.
>> I joined sysobjects and sysindexes on the id column
which
>> is ID of the table to which the index belongs and
filtered
>> by the table name and find that there are 15 rows in
>> sysindexes for the table (indid from 1 to 15). This
comes
>> in line with the outcome of sp_helpindex. I also
verified
>> that the given id does not belong to other object in the
>> db.
>> I fell to understand why the insert operation was trying
>> to update indid 21 that does not exist and should not
exist
>> --CHECKTABLE on sysindexes found nothing to correct.
>>
>> Error: 602, Severity: 21, State: 13
>> Could not find row in sysindexes for database ID 7,
object
>> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> sysindexes.
>> DBSRVR - FAILED in Execute S1000 602
>> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
>> find row in sysindexes for database ID 7, object ID
>> 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
>
>.
>|||I think it's some hardware error when writing index trees to disk... even
best of the best may have faults, and not the men only but this creatures of
iron too. The only other cause is rare MSSQL software error - contact vendor
with details, maybe they'll find appropriate record in knowledge base
<anonymous@.discussions.microsoft.com> wrote in message
news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
> Thanks Alex, I would expect so but it is imoportant for me
> to understand the cause to this behavior.
>
>
> >--Original Message--
> >
> >Try to rebuild all table indexes - think this would help
> >
> >"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> >> Hi,
> >>
> >> I had an application trying to insert a row into a table
> >> and fell with the following error msg which I have
> copied
> >> bellow.
> >>
> >> I joined sysobjects and sysindexes on the id column
> which
> >> is ID of the table to which the index belongs and
> filtered
> >> by the table name and find that there are 15 rows in
> >> sysindexes for the table (indid from 1 to 15). This
> comes
> >> in line with the outcome of sp_helpindex. I also
> verified
> >> that the given id does not belong to other object in the
> >> db.
> >>
> >> I fell to understand why the insert operation was trying
> >> to update indid 21 that does not exist and should not
> exist
> >>
> >> --CHECKTABLE on sysindexes found nothing to correct.
> >>
> >>
> >> Error: 602, Severity: 21, State: 13
> >> Could not find row in sysindexes for database ID 7,
> object
> >> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> >> sysindexes.
> >>
> >> DBSRVR - FAILED in Execute S1000 602
> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> >> find row in sysindexes for database ID 7, object ID
> >> 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> >
> >
> >.
> >|||Thanks agaian.
>--Original Message--
>I think it's some hardware error when writing index trees
to disk... even
>best of the best may have faults, and not the men only
but this creatures of
>iron too. The only other cause is rare MSSQL software
error - contact vendor
>with details, maybe they'll find appropriate record in
knowledge base
><anonymous@.discussions.microsoft.com> wrote in message
>news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
>> Thanks Alex, I would expect so but it is imoportant for
me
>> to understand the cause to this behavior.
>>
>>
>> >--Original Message--
>> >
>> >Try to rebuild all table indexes - think this would
help
>> >
>> >"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
>> >> Hi,
>> >>
>> >> I had an application trying to insert a row into a
table
>> >> and fell with the following error msg which I have
>> copied
>> >> bellow.
>> >>
>> >> I joined sysobjects and sysindexes on the id column
>> which
>> >> is ID of the table to which the index belongs and
>> filtered
>> >> by the table name and find that there are 15 rows in
>> >> sysindexes for the table (indid from 1 to 15). This
>> comes
>> >> in line with the outcome of sp_helpindex. I also
>> verified
>> >> that the given id does not belong to other object in
the
>> >> db.
>> >>
>> >> I fell to understand why the insert operation was
trying
>> >> to update indid 21 that does not exist and should not
>> exist
>> >>
>> >> --CHECKTABLE on sysindexes found nothing to correct.
>> >>
>> >>
>> >> Error: 602, Severity: 21, State: 13
>> >> Could not find row in sysindexes for database ID 7,
>> object
>> >> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> >> sysindexes.
>> >>
>> >> DBSRVR - FAILED in Execute S1000 602
>> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could
not
>> >> find row in sysindexes for database ID 7, object ID
>> >> 1798349521, index ID 21. Run DBCC CHECKTABLE on
>> sysindexes.
>> >
>> >
>> >.
>> >
>
>.
>
Insert operation fell
Hi,
I had an application trying to insert a row into a table
and fell with the following error msg which I have copied
bellow.
I joined sysobjects and sysindexes on the id column which
is ID of the table to which the index belongs and filtered
by the table name and find that there are 15 rows in
sysindexes for the table (indid from 1 to 15). This comes
in line with the outcome of sp_helpindex. I also verified
that the given id does not belong to other object in the
db.
I fell to understand why the insert operation was trying
to update indid 21 that does not exist and should not exist
--CHECKTABLE on sysindexes found nothing to correct.
Error: 602, Severity: 21, State: 13
Could not find row in sysindexes for database ID 7, object
ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
DBSRVR - FAILED in Execute S1000 602
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
find row in sysindexes for database ID 7, object ID
1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
Thanks,
Yaniv
Try to rebuild all table indexes - think this would help
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message
news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
|||It seems you have some corruption (inconsistency) in the database:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
> Thanks,
> Yaniv
|||Thanks Alex, I would expect so but it is imoportant for me
to understand the cause to this behavior.
>--Original Message--
>Try to rebuild all table indexes - think this would help
>"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
copied[vbcol=seagreen]
which[vbcol=seagreen]
filtered[vbcol=seagreen]
comes[vbcol=seagreen]
verified[vbcol=seagreen]
exist[vbcol=seagreen]
object[vbcol=seagreen]
sysindexes.
>
>.
>
|||I think it's some hardware error when writing index trees to disk... even
best of the best may have faults, and not the men only but this creatures of
iron too. The only other cause is rare MSSQL software error - contact vendor
with details, maybe they'll find appropriate record in knowledge base
<anonymous@.discussions.microsoft.com> wrote in message
news:b50d01c4375d$105468b0$a001280a@.phx.gbl...[vbcol=seagreen]
> Thanks Alex, I would expect so but it is imoportant for me
> to understand the cause to this behavior.
>
>
> message
> copied
> which
> filtered
> comes
> verified
> exist
> object
> sysindexes.
|||Thanks agaian.
>--Original Message--
>I think it's some hardware error when writing index trees
to disk... even
>best of the best may have faults, and not the men only
but this creatures of
>iron too. The only other cause is rare MSSQL software
error - contact vendor
>with details, maybe they'll find appropriate record in
knowledge base[vbcol=seagreen]
><anonymous@.discussions.microsoft.com> wrote in message
>news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
me[vbcol=seagreen]
help[vbcol=seagreen]
table[vbcol=seagreen]
the[vbcol=seagreen]
trying[vbcol=seagreen]
not
>
>.
>
I had an application trying to insert a row into a table
and fell with the following error msg which I have copied
bellow.
I joined sysobjects and sysindexes on the id column which
is ID of the table to which the index belongs and filtered
by the table name and find that there are 15 rows in
sysindexes for the table (indid from 1 to 15). This comes
in line with the outcome of sp_helpindex. I also verified
that the given id does not belong to other object in the
db.
I fell to understand why the insert operation was trying
to update indid 21 that does not exist and should not exist
--CHECKTABLE on sysindexes found nothing to correct.
Error: 602, Severity: 21, State: 13
Could not find row in sysindexes for database ID 7, object
ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
sysindexes.
DBSRVR - FAILED in Execute S1000 602
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not
find row in sysindexes for database ID 7, object ID
1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
Thanks,
Yaniv
Try to rebuild all table indexes - think this would help
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message
news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
|||It seems you have some corruption (inconsistency) in the database:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Yaniv" <anonymous@.discussions.microsoft.com> wrote in message news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
> Hi,
> I had an application trying to insert a row into a table
> and fell with the following error msg which I have copied
> bellow.
> I joined sysobjects and sysindexes on the id column which
> is ID of the table to which the index belongs and filtered
> by the table name and find that there are 15 rows in
> sysindexes for the table (indid from 1 to 15). This comes
> in line with the outcome of sp_helpindex. I also verified
> that the given id does not belong to other object in the
> db.
> I fell to understand why the insert operation was trying
> to update indid 21 that does not exist and should not exist
> --CHECKTABLE on sysindexes found nothing to correct.
>
> Error: 602, Severity: 21, State: 13
> Could not find row in sysindexes for database ID 7, object
> ID 1798349521, index ID 21. Run DBCC CHECKTABLE on
> sysindexes.
> DBSRVR - FAILED in Execute S1000 602
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not
> find row in sysindexes for database ID 7, object ID
> 1798349521, index ID 21. Run DBCC CHECKTABLE on sysindexes.
> Thanks,
> Yaniv
|||Thanks Alex, I would expect so but it is imoportant for me
to understand the cause to this behavior.
>--Original Message--
>Try to rebuild all table indexes - think this would help
>"Yaniv" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:b37f01c43738$eb688b90$a501280a@.phx.gbl...
copied[vbcol=seagreen]
which[vbcol=seagreen]
filtered[vbcol=seagreen]
comes[vbcol=seagreen]
verified[vbcol=seagreen]
exist[vbcol=seagreen]
object[vbcol=seagreen]
sysindexes.
>
>.
>
|||I think it's some hardware error when writing index trees to disk... even
best of the best may have faults, and not the men only but this creatures of
iron too. The only other cause is rare MSSQL software error - contact vendor
with details, maybe they'll find appropriate record in knowledge base
<anonymous@.discussions.microsoft.com> wrote in message
news:b50d01c4375d$105468b0$a001280a@.phx.gbl...[vbcol=seagreen]
> Thanks Alex, I would expect so but it is imoportant for me
> to understand the cause to this behavior.
>
>
> message
> copied
> which
> filtered
> comes
> verified
> exist
> object
> sysindexes.
|||Thanks agaian.
>--Original Message--
>I think it's some hardware error when writing index trees
to disk... even
>best of the best may have faults, and not the men only
but this creatures of
>iron too. The only other cause is rare MSSQL software
error - contact vendor
>with details, maybe they'll find appropriate record in
knowledge base[vbcol=seagreen]
><anonymous@.discussions.microsoft.com> wrote in message
>news:b50d01c4375d$105468b0$a001280a@.phx.gbl...
me[vbcol=seagreen]
help[vbcol=seagreen]
table[vbcol=seagreen]
the[vbcol=seagreen]
trying[vbcol=seagreen]
not
>
>.
>
Subscribe to:
Posts (Atom)