Forum Replies Created

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

  • RE: insert simultaneously in 2 tables

    1. DEST is an alias for your Destination table (headers in step 2 and header_detail in step 5)

    2.It will do what you were trying to do. you don't need to...

  • RE: Impact of stopping service when trans. log is full

    SQL should be able to commit all the xaction to a point just before SQL was restarted (assuming this was not a very long running uncommited xaction).

    If you have...

  • RE: SQL SERVER 2000 ON A LAN

    If its a web based application you don't have to install anything. If its a client server app then u need to install obdc(connectivity). You don't have to install SQL...

  • RE: insert simultaneously in 2 tables

    Try this:

    ALTER Procedure [dbo].[INSERT_Header]

    (

     @admin_menu_id int,

     @admin_submenu_id int,

     @header_file varchar(150),

     @header_alt varchar(150),

     @header_caption varchar(200),

     @language_id int

     @outID int OUTPUT

    )

    AS

    BEGIN

    --Header - Update Existing

    Update headers set header_file = ltrim(rtrim(@header_file))

     WHERE  headers.fk_admin_menu_id = @admin_menu_id

      and headers.fk_admin_submenu_id = @admin_submenu_id

      and (ltrim(rtrim(header_file)) <>...

  • RE: How to use result set returned by Stored Procedures?

    You can also use "Permanant" temp table thats build in your outer procedure and the inner procedure can populate/update it and the temp table isdeleted after its done using the...

  • RE: data drop caused by view

    Right click on the view and generate script. Then copy the scrpit and run it in query analyzer.

    Hope this helps

    Thanks

    Sreejith

  • RE: SQL Join Question

    I am assuming you want to get the most current Comments in TableB and if no comment is present then get the coooment from table A.

    Try this:

    SELECT a.aid, a.aname,COALESCE(UpdateTableB.acomments,a.acomments)

    FROM tablea...

  • RE: sp_executesql problem

    I tried this and it worked.

    declare @sql1 nvarchar(4000),

     @sql2 nvarchar(4000)

    declare @ret int

    set @sql1=N'Select * from '

    set @sql2=N'sysobjects;'

    --exec @ret=sp_executesql @sql

    exec(@sql1 + @sql2)

    --select @ret

  • RE: Check if Index exists

    Have u ever tried looking at sysindexes table. That will have the information that u are looking for.

    Hope this helps.

    Thanks

    Sreejith

  • RE: Index Tuning Wizard.

    Can you tell us what error u are getting when u run INdex tuning wizard? Does the quer run when u run from Query analyzer?

     

  • RE: unlock the tables programmatically

    Try to solve the bigger issue of locking inside the loop then u wouldn't need to unlock or set timeout.

    Thanks

    Sreejith

  • RE: Alter Table Add Column Fails during update

    Have u tried this:

    Begin Tran T2;

    ALTER TABLE [MyTable] Add IDCOL int default 0;

    Commit Tran T2;

    Begin Tran T1;

    Update [MyTable] Set IDCOL=75;

    Commit Tran T1;

    I am assuming since T2 is inside T1, Alter table...

  • RE: Single Table Restore SQL 2000

    you can do a single table restore if that table resides on its own "file group". Else you would have to restore and copy over.

    Thanks

    Sreejith

  • RE: Help With Date/Time Query

    Hope this one solves your problem.

    declare @startdate datetime

    declare @starttime datetime

    declare @enddate datetime

    declare @endtime datetime

    Declare @startdatetime datetime,@enddatetime datetime

    set @startdate = '09/07/2006'

    set @starttime = '10:00AM'

    set @enddate = '09/07/2006'

    set @endtime = '11:20AM'

    Select @startdatetime...

  • RE: Need help tuning SQL Server 2000

    One thing I know is Detaching and Attaching are much faster than Backup and Restore.

    Thanks

    Sreejith

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