Solved

any help in this case will be appreciated

Posted on 2008-10-22
2
357 Views
Last Modified: 2013-12-13
i am trying to delete everything that is there in the temp table and there are around 4724012 rows of data each time i run the page.
i know this much data will be coming each time but my major concern will arise as the no of rows will keep on increasing on daily basis but when i try and delete it in an SQL-Window query it executes perfectly but when i try the same with php code it shows an error message that query failed.

Any help in this case will be appreciated
$qdel = "delete from dbo.temp DBCC CHECKIDENT('dbo.temp', reseed, 0)";
$rdel = mssql_query($qdel);

Open in new window

src.txt
0
Comment
Question by:jhawarmayank
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Expert Comment

by:bmatumbura
ID: 22783616
Try this:
$qdel = "delete from dbo.temp; DBCC CHECKIDENT('dbo.temp', reseed, 0)";
$rdel = mssql_query($qdel);

Open in new window

0
 
LVL 18

Accepted Solution

by:
jmoss111 earned 500 total points
ID: 22785068
Why don't you TRUNCATE the table?
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using a SUBQUERY for the set variable 10 30
invoke-sqlcmd help 5 34
What does "Between" mean? 6 48
SQL Simple Query Taking a Very Long Time 11 38
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
Viewers will learn how the fundamental information of how to create a table.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question