Forum Replies Created

Viewing 15 posts - 31 through 45 (of 100 total)

  • RE: Multiple SQL Instances

    It's just another install of SQL Server.

    for help refer to BOL-->Installing SQL Server-->Instances-->How to install a named instance of SQL Server 2000 (setup).

    ..hope that helps.

  • RE: Hardware Requirements For SQL Server 2000

    The answer for a dw design is that it depends...on desired performance and reliability.  I would read up on RAID in BOL and make a decision from there.  You'll also...

  • RE: restore bacjup from diff location

    It means other users are connected preventing single user mode. 

  • RE: Need function to match elements in one table to another

    how about an sp?

    CREATE PROCEDURE [dbo].[truefalse]

    @table1 varchar(50), @table2 varchar(50),

    @answer varchar(1)='' OUTPUT

    AS

     

     --False

     if (select sub.answer from (

     select distinct case when t2.id is null then 'False' else 'True' end as answer

     from table1...

  • RE: finding matches using LIKE logic. I''''m sure there''''s an easier way...

    May need to edit, but how about something like this:

    select [ID],[DESC] from

    where

    --Lower case at positions 1-2

    PATINDEX('%[a-z]%',(cast([id] as varchar(50)) COLLATE Latin1_General_BIN))<3 and

    --CAPS position at 3 or more

    PATINDEX('%[A-Z]%',(cast([id] as...

  • RE: Counting numbers of files in a directory.

    Would this work for what you need?

    create table #temp(

    [name] varchar(100),

    depth int,

    [file] int)

    insert into #temp

    EXECUTE master.dbo.xp_dirtree N'C:\', 1, 1

    select count([name]) from #temp where [file]=1 and [name] like 'abc%'

    drop table #temp

  • RE: DTS Intelligence - Ignores Dependent Objects?

    OK, I played with this out of curiosity because I move stuff all the time.  So here is what I found:

    1st, I decided to script from database->all tasks->generate sql script.

    Note:...

  • RE: Copying data

    The good basics of DTS are all in BOL (boos online) installed with SQL.

  • RE: Copying data

    I would use the DTS Import/Export wizard to push data between environments.  You'll have the choice to drop all existing data or append data.  You can also use it to move...

  • RE: DTS Intelligence - Ignores Dependent Objects?

    If you use the DTS Import/Export wizard and choose to move by "object" (3rd choice), you have the ability to choose that option (include dependent objects).  The 1st choice, move...

  • RE: Current table of spid

    Probably needs some cleaning (built for Query analyzer) but here goes....

    --create temptable

    create table #spid(

    spidid int,

    dbid int,

    objid int,

    indid int,

    type varchar(3),

    resource varchar(1),

    mode varchar(2),

    status varchar(25))

    insert into #spid

    exec sp_lock

    go

    --alter table for more info

    alter table #spid...

  • RE: Truncate Log

    BACKUP LOG [dbname] WITH TRUNCATE_ONLY

    Note: 

    The "Backup Log Truncate Only" command should be used  if you are out of disk space and can't backup the db. 

  • RE: T-SQL brain teaser, tricky sum for employee data.

    Here is one solution...

    I do have one extra join to over state my thought process

    --Join pass for attributes and amount

    select sum(CD.amount)as amount from check_data CD,

    --Choose employees and dates for query

    (select...

  • RE: sum of distinct records

    Maybe try something like this:

    select count(Name),date from(select distinct Name,date from testing)A group by date

     

    hope that helps.

  • RE: Strip Non-Numeric Characters from Varchar

    I would look at using ISNUMERIC() possibly.  It returns a 1 or a 0 on its evaluation.  That assumes you're OK with data like A123BC acting as non-numeric.

     

     

Viewing 15 posts - 31 through 45 (of 100 total)