Forum Replies Created

Viewing 15 posts - 1 through 15 (of 51 total)

  • RE: Script foreign keys

    Hi Peter,

    If you want this script working with different database then you need to use fully qualified name in the form database.schema.object_name in queries and also to add database id...

  • RE: Script foreign keys

    I've just tested it and script works (as expected) in SQL 2008 but not in 2000 as Sunshine tried. Sorry

  • RE: How to empty database

    Hi Luis,

    It looks that problem was just in copying script from web page to query window. It added some special characters.

    You can find file with unchanged script attached. I...

  • RE: How to empty database

    Hi Luis,

    This script was written while SQL 2000 was actual version. I'll be back when I do test (or rewrite) on 2008.

    Boka

  • RE: Read file system directory & files with T-SQL

    One thing you can do (even if it's not a secure way) is to map this share using particular credential:

    exec @Return = master..xp_cmdshell 'net use mapletter: \\server2\sharename pwd /user:domainname\username'

    ......

  • RE: SQL SERVER 2005 vs ORACLE 10G

    Jerome,

    Look for "partitioned tables [SQL Server]" in BOL 2005!

  • RE: renaming tables from script

    Hi Dave,

    Try this SQL script. If it works as you want just uncomment commented line. It's a good idea to create SP having old and new names as input parameters....

  • RE: Problem in Query

    Think about grouping with rollup. It's very useful option.

  • RE: Performance Tuning: Concatenation Functions and Some Tuning Myths

    Hi Jeff,

    I've seen a lot of discussions here but no one mentioned indexes and choice of clustered one. What you can find in practice is that db designers usually create...

  • RE: SP3 for SQL Server 2005

    Everything you need about SP2 is on http://technet.microsoft.com/en-us/sqlserver/bb426877.aspx

  • RE: percentage of paid sales by year and month

    Try with left outer join instead of inner join.

  • RE: Toward Integrity Part 5

    For everyone who wants to be a database professionalist:

    1. Read this article;

    2. Learn from C.J. Date books;

    3. If you survive - start your database work.

  • RE: Table journal

    PCI,

    Create command is "hidden" cause I'm not using create DDL command but Select ... into

    Procedure spCreateJournal (follow variable @SQLCommand) will create journal table if it doesn't exist.

  • RE: Update Rowcount

    John, don't escape using return value. Let's see another scenario for proc:

    Alter Procedure dbo.MyTestProd @RowCount as int out

    As

    begin

    declare @RetValue int

    Update dbo.t1 set dbo.t1.f1 = 2

    select @RowCount = @@Rowcount, @RetValue =...

  • RE: Update Rowcount

    Alter your proc adding return statement like this

    Alter Procedure dbo.MyTestProd @RowCount as int out

    As

    begin

    Update dbo.t1 set dbo.t1.f1 = 2

    set @RowCount = @@Rowcount

    return @RowCount

    end

    and now you can execute it...

Viewing 15 posts - 1 through 15 (of 51 total)