Solved

any help in this case will be appreciated

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

632 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