UPDATE...SET...FROM

jamietjamiet Posts: 11
edited February 19, 2007 10:27PM in SQL Prompt code snippets
I've looked within the options panel for a way of exporting snippets but I can't find a way. So I might as well just post it up here in freetext:

Snippet: usf
Description: UPDATE...SET...FROM
Category: DDL
Code:
UPDATE
SET
FROM



I was quite surprised there wasn't one there for UPDATE already actually. Anyway, its in mine now!!!

-Jamie

P.S. Is there a way to export/import snippets?

Comments

  • The only thing I would add to your snippet would be:

    UPDATE $CURSOR$ SET

    so the cursor is positioned right after the UPDATE keyword when SQL Prompt resolves the snippet. That way you avoid moving the cursor yourself to type in the name of the table you're updating. Good suggestion on import/export of snippets.
  • Hi massybird,

    I tried to set the cursor in my snippet using the $CURSOR$ statement. But upon testing it in the query analyzer, it only showed the text itself. Hope you can help me out.

    Thanks,

    Nico
Sign In or Register to comment.