Forum Replies Created

Viewing 15 posts - 781 through 795 (of 812 total)

  • RE: Check Syntax on a Database

    It does nothing! ๐Ÿ˜Ž

  • RE: Error Severity

    Correct answer is 1-25:

    exec sp_helptext sp_addmessage

    in the output search for @severity and you'll find this piece of code that is the law.

    --...

  • RE: T-SQL Operators

    Bah?

  • RE: Fastes way to increment an id column

    -- try to use this for replication:

    set identity_insert my_table on

  • RE: Fastes way to increment an id column

    -- what about IDENTITY??

    SET NOCOUNT ON

    -- Just a simple test table

    IF (OBJECT_ID('tempdb..#my_tab') IS NOT NULL)

    DROP TABLE #my_tab

    CREATE TABLE #my_tab (id INT NOT NULL IDENTITY(1000,1), any_date DATETIME)

    -- Create...

  • RE: Fastes way to increment an id column

    ???????????????

  • RE: List of Stored procedures in your database

    --for a list of store proc/func/view/etc. and getting the body of proc/func/view/etc. run this query

    --copy the resultset and paste it in a new querywindow, then run it.

    set nocount on

    select 'exec...

  • RE: Data script generator

    -- This proc print a statement to copy data from one table to another with same structure. e.g. transfering data between servers (production to develop)

    -- I use it in...

  • RE: Identity puzzle

    Thanks! Some times sql behave in unexpected manner.

  • RE: T-SQL

    The correct answer is only ONE:

    2009-02-01 00:00:00:000, 2009-01-31 00:01:01:000, 2009-01-31 21:59:58:347

    I do not know why there was a multiple choise.

    The author of QotD.

  • RE: TSQL

    Iggy (2/8/2009)


    Whilst I totally understand it's a valid identifier, I just want to understand, does that query create a table with the name "#", or does it create a temporary...

  • RE: Restore of the Database

    Obvious!

  • RE: Loop Through every table in a DB

    Version for Sql 2000: ๐Ÿ˜€

    SET ANSI_NULLS ON

    SET QUOTED_IDENTIFIER ON

    GO

    -- =============================================

    --PART OF THE MACRO CODE EXECUTION BY CHRIS MORTON

    --CONTACT CBMORTON@GMAIL.COM

    --2009-01-05

    --20/01/2009 Carlo Romagnano - specify table names and @SQLScript speficy $T...

  • RE: Insert Script Generator

    Linson.Daniel (1/12/2009)


    Carlos,

    First of all, great SP there...but let me tell you why mine is quite different from yours.

    1. Here my aim was to script the table s data in insert...

  • RE: Insert Script Generator

    I use this one that is fast and do not use cursor. In SSMS I put it in hotkey ctrl+3. When I select the table I press ctrl+3 and I...

Viewing 15 posts - 781 through 795 (of 812 total)