Solved

any help in this case will be appreciated

Posted on 2008-10-22
2
329 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
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now