Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged data



« Prev 1 Next »
  1. FAV

    Xml Element and data insert ,deletion ,updation

    SQL 3 views posted 8 years ago by kashif21
  2. FAV

    Xml element insertion in XML DATA

    SQL 5 views posted 8 years ago by kashif21
  3. FAV

    Export Data From SQL Server to Microsoft Excel Datasheet

    How to Export Data From SQL Server to Microsoft Excel Datasheet
    SQL 11 views posted 9 years ago by derebus
  4. FAV

    Pasar data de una tabla a otra

    Declaramos tantas variables como campos vaya a devolver la select que nos estamos currando para el cursor, en este ejemplo con dos campos vamos contentos: * declare @campo1 int * declare @campo2 int Ahora declaramos el cursor, al cual...
    SQL 4 views posted 9 years ago by derebus
  5. FAV

    Script table as INSERTS

    SQL saved by 3 people 3 views posted 10 years ago by CDIDevs
  6. FAV

    SQL Server String Split Function

    From StackOverflow. I'm still not quite happy with my understanding of it, but it looks an order of magnitude more elegant than most I've found.
    SQL 6 views posted 10 years ago by rengber
  7. FAV

    TSQL Function and Check Constraint to Ensure that a Parent Value is Present in the Table

    If a "InReplyToID" is provided, it must be a valid MessageId
    SQL saved by 3 people 11 views posted 10 years ago by rengber
  8. FAV

    Import data from tab - delimited datafile to SQL table.

    Fields are tab delimited and need to match table schema. I've found the tab separator ASCII(009) preferable over using a comma. The second version can help remove double quotation marks around character fields. Don't forget the keyword LOC...
    SQL 7 views posted 11 years ago by RICHARDP
  9. FAV

    Storing an IP address in a database table

    You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
    SQL 4 views posted 11 years ago by zingo
« Prev 1 Next »