Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

any help in this case will be appreciated

Posted on 2008-10-22
2
Medium Priority
?
383 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 2000 total points
ID: 22785068
Why don't you TRUNCATE the table?
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

705 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