Forum Replies Created

Viewing 15 posts - 211 through 225 (of 252 total)

  • RE: Same stored procedures on multiple databses

    Some of our developers decided to break up dbs into dependent pairs. They append the word "_stage" to one of them. The pair exists in the dev, staging,...

  • RE: Same stored procedures on multiple databses

    One of our databases is used to control access and resides on many of our SQL Servers. From time to time, a request comes through to refresh a set...

  • RE: help with stored procedure

    You can also use a different query in each case. I resort to this when I can't get one query to execute quickly for all cases. This query...

  • RE: Move DTS Packages to a Remote Server

    Connections, file paths, exchange profiles, etc. in your package will probably not be valid at the destination. If you know what they should be, disconnected edit can be used...

  • RE: DateDiff function

    -- This is not elegant.

    declare @HireDate as datetime

    set @HireDate = '1/1/1990'

    -- Pre-calculation

    declare @Now as datetime

    declare @NowPlus30Days as datetime

    declare @dy1 as int, @dy2 as int -- for the day...

  • RE: DateDiff function

    quote:


    
    
    SELECT FName, LName, Hire_Date
    FROM Employee
    WHERE DATEDIFF(dd,GETDATE(),DATEADD(yy,DATEDIFF(yy,Hire_Date,GETDATE()),Hire_Date)) BETWEEN 0 AND 30

    --Jonathan


    I do...

  • RE: Intelligent vs. Surrogate keys

    quote:


    The two MAIN reasons I like identity columns is that you can put a clustered index on them and your inserts will...

  • RE: VB.NetCentral.com

    Thanks for the links. DevHood seems the most similar; however, it's odd that this site rates me as a level 1 peasant. I resent that - as a...

  • RE: How to move sp from 1 SS2k to another SS2k

    You can also use EM Import/Export or the DTS copy sql server objects task. There is a point at which you can select the objects to copy - rather...

  • RE: single sql statement needed

    More fun...

    create table #TableData (

    Manufacturer varchar(12) NOT NULL,

    Color varchar (15) NOT NULL

    ) ON [PRIMARY]

    insert into #TableData (Manufacturer, Color)

    select 'Toyota','Blue'

    union all

    select 'Toyota','Blue'

    union all

    select 'Honda','Red'

    union all

    select 'Honda','Red'

    union all

    select 'Honda','Green'

    union all

    select 'Ford','White'

    union...

  • RE: single sql statement needed

    It would be nice to have an aggregate "SUM" that worked on strings. I've needed it before. Perhaps a pivot table like approach? I use the trim...

  • RE: grouping data

    In general, if you need more data from the one record in the group, use a derived table to get the key and join. For example,

    SELECT A.Id, A.Name,...

  • RE: sp3/sp3a

    The MDACs are different.

    sp3 - MDAC 2.7 sp1

    sp3a - MDAC 2.7 sp1 refresh

    Its not MDAC sp1, sp2, or sp1a - it's "refresh". Perhaps MDAC 2.7 sp1...

  • RE: To delete temp tables or not to?

    I like to put the drop in myself. Sometimes to debug a procedure, I copy it into QA and comment out the stored procedure specific stuff (changing the params...

  • RE: Transferring stored procedures (SQL Server 2k)

    One more thing. If your developers give you scripts to move procedures, make sure any permission grants are outside the procedure, not part of the procedure. Also, do...

Viewing 15 posts - 211 through 225 (of 252 total)