Forum Replies Created

Viewing 15 posts - 166 through 180 (of 314 total)

  • RE: Connecting via TCP/IP

    As long as SQL is running and you can query the data your application should be able to work with the SQL Server.

    Thanks

    Sreejith

  • RE: Data from Previous Row

    This solution assumes that you have no way to order the data and the order that you get from Source is right.

    1.Load the data in the table( PreviousRow) it to...

  • RE: Column Name as a Parameter Value

    If its a straight select statement and that fact that you just have 12 columns I would use a case statement. The reason being sp is complied.

    If the sp has...

  • RE: Help Needed Debugging Query

    Try this.

    Select Combined.NursingHomeName, Combined.City, Combined.Street, Combined.State, Combined.ZipCode, Combined.PhoneNumber

    from Combined , (

    Select  Left([NursingHomeName],5) as left5NursingHomeName,[City],Count(*) as Counts

    from Combined

    group by Left([NursingHomeName],5),[City]

    having count(*) > 1 ) Dupe

    where Left([Combined.NursingHomeName],5) = left5NursingHomeName and ltrim(rtrim(Combined.City))...

  • RE: Archiving to history without creating duplicate rows

    Your query is not going to work cos this is how it needs to be done.

    Try something like this.

    --Update Existing (If any Data has Changed)

    update daily_transactions_hist set  daily_transactions_hist.Col1 = DLY.Col1,

         daily_transactions_hist.Col2...

  • RE: Performance issue with SQL Server 2000

    If you don't have auto update statistics on then its advisable to update statistics on a scheduled basis. My experience has been update statistics runs faster and DBCC ReIndex. And...

  • RE: SQL 2000 restore problem

    Like Greg said you cannot change the loagical name.

    Here is how u should have done it.

    Use Master

    go

    --sp_helpfile

    RESTORE DATABASE NewDBName

     FROM DISK = '\\Path\OldDB.bak'

     WITH MOVE 'OldDB_Data' TO 'D:\SQLData\MSSQL\Data\NewDB\NewDB.mdf' ,

      MOVE 'OldDB_Log' TO 'E:\SQLLogs\MSSQL\LOG\NewDB\NewDB_log.ldf'

    go

  • RE: Text file dump to network drive with DTS

    After you are done with setting the tranformation, run the DTS. Just by setting the tranformation does not output the result(and the Column Name) to the text file. Hope this...

  • RE: Dynamic SQL failing converting varchar error

    Try this. I have commented Execute statement for you to see the sql before running it. Hope this helps.

    BEGIN

    SET NOCOUNT ON;

    DECLARE @RunID INT,

       @sql1 varchar (255),

            @sql2 varchar (255),

            @sql3...

  • RE: help needed in building an sql script

    From your explaination I hope this is what u are looking for.

    select  A.key1,A.key2, ((sum(A.Amount1)+  sum(A.Amount2))/2)* sum(B.Amount4)

     from tableA A INNER JOIN tableB B ON A.key1 = B.key1 and A.key2 = B.key2

    group...

  • RE: Dynamic SQL failing converting varchar error

    Can you try this:

    DECLARE @RunID INT,

      @sql1 varchar (255),

            @sql2 varchar (255),

            @sql3 varchar (255),

            @SQLStatement nvarchar(2000),

            @BB   varchar (255),

            @PID  varchar (255)

    SET @sql1 = 'Update c_account SET MSA_BB_FootNote ='''

    select...

  • RE: Getting detailed error message

    Have you looked at sysmessages in master database. Thats has the description that you are looking for but you might have to add code to plug  in the table,column name.

    Thanks

    Sreejith

  • RE: Error doing restore of full/differential backup

    Cynthia,

    NORECOVERY should be used to do a point in time restore using transaction log backup.

    Hope this helps

    Thanks

    Sreejith

     

  • RE: Creating Multiple Rows Repeating Info from one Row in a table

    I've read about Numbers table in SSC and how it can be used to avoid cursors.

    Here it is.

    Create table #Numbers(Num int)

    Declare @ID int

    set nocount on

    set @ID = 1

    while (@ID <=...

  • RE: Permissions to run DTS packages

    From your question I feel that that article tells you want you need to do? Am I missing something?

     

Viewing 15 posts - 166 through 180 (of 314 total)