Forum Replies Created

Viewing 15 posts - 136 through 150 (of 314 total)

  • RE: how do i create a dts with headers?

    Have u tried to create a view? If u can create a view similar to the one below:

    Select '00'

    Union all

    Select '0000000000'

    Union all

    Select '0000000000'

    Union all

    Select '0000000000'

    Union all

    Select '0000000000'

    Union all

    Select '0000000000'

    Union all

    Select...

  • RE: Removing "The" from the beginning of strings.

    Try this:

    SELECT ltrim(rtrim(Right(ColumnName,len(ColumnName)-3)))

    FROM TableName

    WHERE CHARINDEX('The', ColumnName) = 1

    If this is what you want then change Select to Update:

    Update TableName set ColumnName= ltrim(rtrim(Right(ColumnName,len(ColumnName)-3)))

    WHERE CHARINDEX('The', ColumnName) = 1

    Thanks

    Sreejith

  • RE: finding not null parameters

    You can use the following(instead of creating "n" number of sps)

    1. Procedures can accept default values.

    2.If a default value comes in then you can set the appropriate boundary conditions. For...

  • RE: Culumative Units

    Hope this is what u are looking for:

    Select ORDER_HISTORY.BranchNo,ORDER_HISTORY.ItemCode,ORDER_HISTORY.Units,ORDER_HISTORY.[Date]

     from ORDER_HISTORY INNER JOIN (Select BranchNo,ItemCode,max(Units) as MaxUnits

         from ORDER_HISTORY

         group by BranchNo,ItemCode) Max_ORDER_HISTORY

     on ORDER_HISTORY.ItemCode =Max_ORDER_HISTORY.ItemCode

     and ORDER_HISTORY.BranchNo = Max_ORDER_HISTORY.BranchNo

     and ORDER_HISTORY.Units = Max_ORDER_HISTORY.MaxUnits)

     

    Select ORDER_HISTORY.BranchNo,...

  • RE: Restore database--- help!

    Is yiur backup location correct? Does ur new server have the copy of the backup from the old server at D:\DATA\MSSQL\BACKUP\imagedb1.bak

    Thanks

    Sreejith

  • RE: How to display data when data is being displayed while debugging?

    1.Does the user that is used while calling sp have appropriate rights to delete /add/Update data in tables? It could be when u excute it from Query Analyer that u...

  • RE: help with emergency

    I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....

  • RE: help with emergency sp4 on sql server 2000

    I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....

  • RE: help with sql server 2000 sp4-->emergency

    I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....

  • RE: Procedure for modifying the row located two positions before the last one

    Hope this is what u are looking for:

    Declare MinCartoonID int

    select MinCartoonID = min(CartoonID) from tableName where Display = 1

    Insert statements...

    If (Select Count(*) from tableName where Display = 1) > 2

    Begin

     Update...

  • RE: Inserting Into Two Tables At Once (A continuation...)

    U can use trigger:

    CREATE TRIGGER tri_ins_Residential_Customers

    on Residential_Customers

    FOR INSERT

    as

     --Residential_Customers

     Declare @CustomerId int,

     @FirstName varchar(50)

     @CustomerNo int

     --SET @CustomerNo = SCOPE_IDENTITY()

     select  @CustomerId = CustomerId,

      @FirstName = FirstName

      from inserted

     If Not exists (SElect 1 from Customers where CustomerId =@CustomerId...

  • RE: Can this function be Tuned

    If u are using the function in Select statement then use what Lynn suggested. Cos u don't need to have a calendar table to do what SQL does best. And...

  • RE: just swapped over to a new server. now some users cant connect

    Could it be the sid for the user is different on the new server. Have u tried sp_change_users_login

    Thanks

    Sreejith

  • RE: COMPARE TABLES

    You can try this:

    exec sp_columns TableName.

    Thanks

    Sreejith

Viewing 15 posts - 136 through 150 (of 314 total)