o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

SQL Delete statement needed -

I need a statement that will delete duplicate invoice numbers..

My order Table has 2 fields, Order_Invoice_No and Order_Back_Order_No, I have to delete any order that is a duplicate. Can someone give me a quick statement that will handle this?

Thanks in advance!

 

SQL Delete statement needed -
I need a statement that will delete duplicate invoice numbers.. My order Table has 2 fields, Order_Invoice_No and Order_Back_Order_No, I have to delete any order that is a duplicate. Can someone give me a quick statement that will handle this? Thanks in advance!


MySQL: DELETE FROM problems -
SQL Statement: DELETE FROM vbsNews_news ORDER BY postedOn LIMIT 1 Error: You have an error in your SQL syntax near 'ORDER BY postedOn LIMIT 1' at line 1 I double-checked the tablename and fieldname and they are both correct (capitalization and all). So what am I doing wrong? I a


complex delete SQL statement needed -
I need to delete multiple rows from a single table, whose index is derived from a one to many , one to many relationship from the first one. The tables are: tWebMessage ( webmessageid here ) tVoiceMessage tVoiceMessageDelviery tVoiceMessageDeliveryAttempt ( rows to delete )


What is the relational statement needed -
What is the relational statement needed? Given an input of 1 to 7,000, what is the mathmatical conversion needed to covert this to a range of 270,000,000 to 2,000,000,000? Thanks for any help!


wait for recordset delete -
Hi I have a delete procedure which removes a record from a large table (2000+ records). Immediately after this SQL delete statement, I am reloading the 'detail records' into a grid. The problem is that the delete prodecure takes too long and the record still appears when reloading


Deleting a table from database -
Hei dude, can u teach me how to delete a particular table from a database by stating the database name in use ans the table name to be delete. then just push the command button to execute the delete statement. so how to write the delete statement?? thanks


Delete from datatable -
Hey, I have a datatable with an autoincriment field that populates a datagrid. The datagrid has a delete button column in it that I am using to delete from the datatable/datagrid. I would like to run a delete SQL statement to delete out of the datatable using the autoincriment field a


Delete record from datagrid -
I am populating my datagrid using the olDbDataAdapter wizard. This works fine. I placed a hyperlink in one of the columns to delete records. Does anyone have an example of the code needed to delete datagrid records and do I need to set up a new database connection to delete? thanks,


sql delete problem -
I delete a table thru VBA with the following sql statement : DoCmd.RunSQL "DELETE FROM Evenements" But everytime I do so, it asks me if I really want to delete all the entries in the table. Is there a way to make the answer YES automatically. thanks for helping


Deleting Orphaned Records -
Hi, This is driving me nuts cuz I know how to query the data but I can't delete it. I want to delete the orphaned records from a child table and I've set up the query to select the data but I cannot figure out how to write the Delete statement for this. Here's the code: SELECT


delete record from datagrid -
I am populating my datagrid using the olDbDataAdapter wizard. This works fine. I placed a hyperlink in one of the columns to delete records. Does anyone have an example of the code needed to delete datagrid records and do I need to set up a new database connection to delete? thank


Delete trigger... -
hello, I have 1 table with a foreign key(a) and 1 with a primary key(b). when i delete a record in the table A then i want a trigger to go of and delete related records from tblB How is this possible or where can i find a good tutorial on MSSQL triggers? I d like to do something


Delete records in two tables (SQL) -
How do you delete rows in two tables in one sql statement? I have tried the following which does not work. 1) DELETE FROM aa FROM bb "Only deletes first table" 2) DELETE aa, bb "Incorrect syntax near ',' " I'm using sql 2000 Thxs


delete a folder -
How do you delete a folder? I thought it was easy, but the kill statement can only be used to delete files.


ADO / SQL statement -
Hi, If I want to get a record set , what the different by using the ADO statement or SQL statement? since both return the recordset I wanted. later, if I want to update / delete record in the recordset , should I use the SQL 'UPDATE' 'DELETE' or use ADO methods. I just can't dete


Retrieving Data -
I now have a small database application up and running using ADO and Datagrid. I can Enter, Delete, and display data. Now I need to retrieve data. I found it easy to delete a selected row, by selecting the row in the DataGrid and then with a click button execute: rsAccess.Delete. Now I


Deleting a single record in a db Table -
I have been using SQL statements and have read about the DELETE statement however, when I use this statement below it deletes all records in the table.. I just want the top record(which happens to be the oldest due to how its sorted) strSQL = "DELETE MAX(Score) FROM Table1 whe


Using file attributes in statements -
In my program, files get deleted. So far I have found that I am unable to delete HIDDEN and ARCHIVE files. So what I want to do is NOT delete these files, this way I don't get an error. I have looked up GetFileAttributes, and have become a bit familiar with it. I am just not sure how t


Get new record ID when inserting data -
I am writing automated test cases. In this specific case, I need to enter temporary data into a table, run the test code, and then cleanup by deleting the temporary data I inserted. What I do currently is storing the INSERT and DELETE statements in a XML file, and execute the INSER


ALTER TABLE in MS Access -
Hi, how do I alter table in MS Access? I have tried a lot of different sql statement but there is some error about the constraint. ALTER TABLE table2 ADD FOREIGN KEY (id) REFERENCES table1(id) ON UPDATE CASCADE ON DELETE CASCADE but if I remove the last 2 statement ON UP


delete record -
I'm trying to delete a record that has a child record. Heres the delete statement I'm using but it's not working. DELETE DB.TABLE1 A, DB.TABLE2 B WHERE A.BID_ID = '7777' AND B.BID_ID = '7777' help? eye


Deleting a Directory (or a HD!) so that data is PERMANENTLY lost -
How do i delete a directory, or a Hard Drive so that the data cannot be retrieved? I know how to delete them, but an Un-Delete program can easisly "undelete" them. All I need is code. Not too much explaining is needed.


[02/03] Deleting a Row from database -
i'm using VS.NET 2003 n SQL 2000 my proj needs to be on a 3 tier (1st time unfortunely) does any1 have any sample of any delete function? i'm trying to get mine to work tis way -user select the id of the item to be deleted via a drop down list -user click on the delete button a


deleting user -
I just cannot get my logic to work correctly. I am tryin to delete a user who has send a private message to another user in the forum. However, the receiver hasn't deleted that user's pm causing the admin (me) cannot delete that user. It throws an error to me like this: Code: T


evaluating values in variables -
I am working on a table driven app. I have placed all of my Select and insert statements in an sql 7 DB table. Things seemed to be going great until I needed to do an insert using an insert statement stored in the table. I query the DB to get the insert statement, place the statemen


Nesing SQL staements -
Hi Everyone, Does anyone know how to nest multiple sql statements inside of one command statement? I am trying to delete a field from multiple tables in an MS Access database using one sql statement. Either Access does not allow this to be done or I am doing something wrong. I wo


Problems deleting from gridview -
Ok im trying to delete rows from a gridview using the delete command column. I have the statement "DELETE From testtable WHERE pkid = @pkid" in my sqldatasource. In the gridview I have @pkid defined as a datakey name and one of the columns is bound to @pkid, the column


SQL Delete will not Work (RESOLVED) -
I'm trying to delete the currently selected record in a dataGrid. Label41.Text is Bound to the DataSet that is created via the OleDbDataAdapter. The Label contains the ID From the "Employee" Table. It seems like it should be something very simple. I even tried to test the


Quick Question Concerning Comment Code -
Hi, I've seen a lot of source code posted (and downloaded a lot) that has many comments that are full lines of code. I originally thought they were just there 'cause the person was too lazy to delete them, they were just old code, and never needed again. But a program I got today said


What Delete file statement puts the deleted file in the recycle bin -
I need to know if there is a delete file statement that moves the file to the recycle bin so that it can be retrieved if deleted by mistake?


Delete specific records from a table. -
How do I delete specific records from a table using an SQL statement? e.g. Delete * From QuoteDets WHERE QuoteNo = " & cboQuoteNo.Text


Fastest way to delete all rows in MS Access -
I've heard that using TRUNCATE to delete all the rows of a table is faster than using DELETE because TRUNCATE doesn't do logging (but therefore can't be rolled back) while DELETE does do logging (and can be rolled back). I don't care about rolling back, metadata, or anything like that


SQL Delete -
I am trying to do a sql delete statement - what do i need to do to get this t work? delete from tblresponse where (select lquestionid,suserid,count(*) from tblresponse group by lquestionid,suserid having count(*)>1) --and suserid = '62') i get the followig error: Server: Ms


Excel Application Sheet Deletion *RESOLVED* -
Hi all, I'm calling excel from VB and trying to post data into it. I've been sucessfule in that. however, I need to delete all empty sheets in excel. and only one sheet viz., into which i've to post the data should be remaining in the work book. I've incorporated the code to delet


SQL in a Dataset help needed -> Refreshed -
I am drawing a blank here.. I have this SQL statement that will return a large result set.. But the problem is that there are a lot of duplicates.. How would I change this statement to only return on of each.. Something like a unique clause.. SELECT MODEL FROM IC.SC WHERE (M IS NOT


Delete Table And Copy Table -
Hi.... I've 15 Tables in my Test.mdb so how to delete all the tables using drop statement and how to copy another tables from another database to my Test.mdb using SQL Statement. waiting for response...


Deleting a ADO Recordset -
What is the easiest way to do this? With DAO, I'd just use the Execute command followed by an SQL statement that would delete whatever I told it to delete from the table. Is there a simular command in ADO? What's the best way to achive my goal? Thanks...


delete row -
Hello Please can anyone help me with the sql statement for how to delete a row from a table in an MS access database. Sam


Truncate Vs Delete -
Is there any wway to roll back the data after executing Truncate statement...? Why can't we Delete the records instead of Truncating. What are the advantages over the other...? Thanks in Advance


Delete from Data Env. -
Hey there!!! is there a way to track how many rows were affected by a delete statement with a Data Environement so I can record it? thanks