Select to Delete conversion

I have to convert the below select statement to Delete, can someone help me on this.
SELECT * FROM  [Profile] TAB1 
INNER JOIN 
(SELECT [Col1] AS [ID],[Col2] AS [FileID]
FROM [SupData]
WHERE UPPER([DSet]) = N'TEST'
)TAB2
ON TAB1.[ID]=TAB2.[ID]
AND TAB1.[FileID] = TAB2.[FileID]
The Above select is giving me 2 records, I want write a script to delete them. the ID and FileID combination will always be unique
Neil

Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. 
And you need to read and download the PDF for: 
https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
>> I have to convert the below SELECT statement to Delete, can someone help me on this. <<
What does that mean? You do not even know that rows are not records. That there is no generic “id” in RDBMS, that files have names not id's, etc. But you did not bother to post any DDL for us. 
>> I want write a script [sic: a statement is not a script] to delete them. The generic_id [sic] and file_name combination will always be unique <<
Which table? You have two in the SELECT. 
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL

Similar Messages

  • How do you select multiple messages/conversations on SMS/MMS to forward or save to memory card on Samsung Stratosphere?

    How do you select multiple messages/conversations on SMS/MMS to forward or save to memory card on Samsung Stratosphere? 
    My screen is cracked and I need to replace my phone and I don't see a way of selecting multiple messages or even conversations one at a time to forward them to email or to save them to a memory card.  I can delete thread but can't forward it or move it.  Is there a setting somewhere that will move the storage location for messages to the memory card instead of internal?
    If not, any suggestions on backup apps?  I have heard of Txtract to back up SMS and MMS messages, and Titanium Backup to back up everything (SMS, MMS, apps, app data...).  Anyone have any experience with those, or other suggestions?
    Thanks!
    Rich

    <Duplicate topic.  This thread will be locked.  Please see Help transferring data (SMS, MMS, Apps, App data) to new phone? for any replies.>

  • Cant select and delete text messages

    Since the latest ios7 update i can no longer select and delete text messages.  I have to delete the entire conversation.  Anyone else having this problem? Is there a fix?

    Tap and hold on a text within a conversation. Tap "More" in the pop up menu. Select the messages you want to delete by tapping in the little circles at the left of the messages. Tap the trash can in the lower left of the screen.
    Best of luck.

  • Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Did you find an answer to your question?
    Would it also apply to Mountain Lion's Messages?
    Thanks

  • Data Error in the Query/Report after selective data deletion for infocube

    Hi Experts,
    Please advise what i was missing and what went wrong...
    I got a Query (Forecast) on a Multicube...which is based on 2 Infocubes with Aggregates...
    As i identified some data discrepency..yesteraday i performed selective data deleation on one of the Infocube
    and executed report yesteraday and the results in the query are correct...
    When today i executed the same report i am getting different results..
    When i compared the results of the report with that of data in cube they are not matching
    The report is not displaying the data in cube..for some rows it is displaying the data in the cube but for some rows it is just displaying same as the above row
    there is no data loaded into info cube after selective deleation
    Do i need to perform request compression and fill the aggregated after selective deleation
    Please advise what went wrong

    Hi Venkat,
    No i haven't done anything on aggregates before or after selective delete
    As there is not data load after the selective delete according to SAP Manual we don't need to perform any thing on aggregates...as selective data deletion on cube will delete data from aggregates as well
    Please update how to identify error

  • When is there going to be a select all/delete all option in email? I need to search for certain emails and delet them from my phone but not my email program (Outlook)

    when will there be a select all/delete all option in Emails? I have a large number of emails that come to my phone which i dont want to delete from my outlook mail account (On my PC). However, i want to be able to search, select all and delete these emails from my phone? I do not use ICloud either as it causes issues with my calendars at work.
    These features should be a standard as there are plenty of other users out there that are trying to do the same thing and as yet there has been no progress? The email on the iphone is one of the biggest downfalls of the phone, blackberry and android handle them much better, but i dont have an option with my phone at work. Please help??

    No one here would have any idea when or if such a feature would be introduced until and unless Apple announces it.

  • How can I select and delete messages without T'bird opening each one as it is selected?

    Well, that says it.... if I select a message, say, to delete it because the subject line says "If you open this message, your computer will be instantly infected with every known malware" - - woops! the Thunderbird setup just opened it.
    -- I need to select for deletion without opening -- Am I totally missing something??

    Under the heading of my "totally missing something", I had a suspicion that T'bird would guard against what I was concerned about.... Nice to have that confirmed.
    Also good to have the F8 tip for future use.
    Thank You - from the cowtown -

  • How can I select and delete the fill color (white background) of a live trace (B&W) with in an actio

    How can I select and delete the fill color (white background) of a live trace (B&W) with in an action set?
    Illustrator CS4 in windows XP.

    Maybe Li[ve trace] is not t]he way[ to go
    I have some suggestion one leave it as is and use a blending mode of multiply to give it a color background like this
    leave it as is make it a grayscale tiff import int Illustrator and color it it in Illustrator like this
    Or trace over it with the brush tool aand then give it a color ground.
    Or do the original over and do a cleaner job with no tone or a minimum of tone. Then Live trace.

  • Process order %00000000001 has been selected for deletion

    Hi Guys,
    With the use of strategy type 86 (assem bly processing for process order) when creating the sales order it is giving the error
    Process order %00000000001 has been selected for deletion
    Message no. V1796
    According to process order will be created automatically with the order type PI04. Related setting for the order type Pi04 in the specified plant is done.
    Pls help.

    Solved..Change the customer number

  • How can i get my delete conversation back

    how can i get my deleted conversation back. its very important i really need those messages back . PLEASE SOMEONE HELP ME GET IT BACK WHAT DO I DO !!!!

    no

  • Making  Statistics to Discover the use % of Select/Update/Delete

    Hi,
    I have a small database, and I'd like to do a Statistics about the use of Select/Update/Delete. I hear about two ways.
    1-) Using Audit
    2-) Reading the Archives though package DBMS_LOGMner
    What way do u suggest to me ?
    If anyone have links and more information how I can do this statistics, could post it here ?
    Thank you.
    Fernando.

    2-) Reading the Archives though package DBMS_LOGMnerWell, if the database is not in archivelog mode, you can only read the online redo logs, therefore, missing the historical information.
    The best and simpliest solution to implement auditing.
    Jaffar
    Message was edited by:
    Syed Jaffar

  • Select all / Delete selection Translation

    Hi,
    although I am running my Web Dynpro ABAP in Swedish the "Select all / Delete selection" table options are displayed in English. Anyone who knows whether or not this is a bug or a known limitation ... or perhaps something that I can fix?
    Thanks!

    Hi Peter,
    I still do not understand why all the other standard functionalities are translated but not "Select all/Delete selection". Could you be a little more specific how/what you mean with domain translation?
    Thanks!

  • How can I edit imported audio track? After selecting and deleting region and joining remaining parts, it keeps playing the track with the deleted part! What am I doing wrong?

    How can I edit imported audio track? After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?

    After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?
    How exactly are you doing this?
    When I cut out a part of an audio region, then drag the remaining parts together, so they are touching, the track will skip the cut out section when playing the file.  Also, if I select the remaining parts of the region and use the command "Edit > join regions". This will create a new audio file with the cut out part deleted.
    You should see this prompt, when you are joining the regions:

  • How can I recover deleted conversation ?

    How can I recover deleted conversation ?

    You restore an iCloud or iTunes backup made prior to the conversation being deleted but after the conversation was created.

  • TS2755 Can I recover a deleted conversation?

    I was just wondering if I could recover a deleted conversation from my messages?

    If it was present at last sync, then you may be able to restore from backup and retrieve it.  You would lose anything added since the last sync.

Maybe you are looking for

  • Is this possible with LOG ERRORS?

    I have a procedure which does a bulk insert/update operation using MERGE (running on Oracle 10gR2). We want to silently log any failed inserts/updates but not rollback the entire batch no matter how many inserts fail. So I am logging the exceptions v

  • Query regarding Button in a BSP Page

    Hi All, I want to add a button to a BSP Page which on clicking will open a Page Fragment. Please guide me how to do this. Thanks in advance.

  • Are there any shortcut keys to switch between displays in screen sharing?

    I have been trying the option-command-1 & 2 shortcut but it doesn not want to work for me. Is there something I need to setup before doing this?

  • Radeon HD 7690M XT and HP dv7-6c47cl

    My dv7 laptop works, for the most part, completelly fine. Granted I have sent it in for repairs multiple times....and honestly don't doubt I will need to again.  The main concern with it is this dreaded dedicated graphics card. The Radeon HD 7690M XT

  • Set operations

    Does SEA toolkit allow set operations on subagent managed objects? We have installed SEA on our system and running demo subagent. But our Manager is refusing to perform any set operations on any of the variables on our system saying it is read only.