Forum Replies Created

Viewing 15 posts - 226 through 240 (of 314 total)

  • RE: DTS Packages

    SQL Books Online is the good place to go.

    Thanks

    Sreejith

  • RE: Calculating A Primary Key VS Idenitity

    If u want 1 customer to belong to more than 1 group then ur design has got to change.

    Need to have "Customer" table, "CustomerType" table and "Customer_X_CustomerType" table to get...

  • RE: Insert with select

    Are you trying to use the record dated Jan 2 2006 (Most current b4 insert) and insert it again (with the Name Changed to BOB abd Date Changed to Current...

  • RE: Help with SQL Query

    Here you. This should get you close.

     

    --Update Existing

    Update Destination set  SRC1_NAME = SOURCE.SRC1_NAME,

       SRC2_NAME = SOURCE.SRC2_NAME,

       LAST_UP_DATE = SOURCE.LAST_UP_DATE

    from (Select SRC1.SRC1_ID,SRC2.SRC2_ID,SRC1.SRC1_NAME, SRC2.SRC2_NAME, SRC1.LAST_UP_DATE

     --SRC1.SRC1_NAME,SRC1.SRC2_ID,SRC1.LAST_UPD_DT

     from SRC1 INNER JOIN SRC2 ON SRC1.SRC1_ID= SRC1.SRC1_ID )...

  • RE: Need help with a query statement

    I forgot to add the where clause on  created_date

    so here it is:

    Select audit.* ,ticket.* from audit INNER JOIN

     (

      Select ticket_id,max(last_updated_date) as MaxUpdateDate FROM audit

      group by ticket_id ) MaxAudit on audit.ticket_id...

  • RE: Need help with a query statement

    Hope this helps.

    Select audit.* from audit INNER JOIN

     (

      Select ticket_id,max(last_updated_date) as MaxUpdateDate FROM audit

      group by ticket_id ) MaxAudit on audit.ticket_id = MaxAudit.ticket_id

       and audit.last_updated_date = MaxAudit.MaxUpdateDate

    where audit.Status not in ('EXCLUDED','ACCEPTED')

    order by...

  • RE: Stored Procedure - Doing Insert and delete as single workable unit

    Declare @i_Error int

    set nocount on

    set @i_Error = 0

    Begin Tran TR1

    Insert into REPLAY_LOG_NEW(ACTIVITYID , Student)

    select ACTIVITYID , Student from REPLAY_LOG

    Select @i_Error = @@ERROR

    If @i_Error = 0

    Begin

     Insert into REPLAY_LOG_ARCHIEVE(ACTIVITYID , Student)

     select ACTIVITYID...

  • RE: Stored Procedure - Doing Insert and delete as single workable unit

    Here you go.

    Declare @i_Error int

    set nocount on

    set @i_Error = 0

    Begin Tran TR1

    Insert into REPLAY_LOG_NEW(ACTIVITYID , Student)

    select ACTIVITYID , Student from REPLAY_LOG

    Select @i_Error = @@ERROR

    If @i_Error = 0

    Begin

     Insert into REPLAY_LOG_ARCHIEVE(ACTIVITYID ,...

  • RE: DTS stores the last {LF} in the table!!

    You can use ActiveX transformation property and look for the ascii value in the first column and exclude it if it has CR. That will exclude the last line to...

  • RE: Execute Job

    DB Owner gives complete access to the database. To be able to run JOb the user must be assigned to "processadmin" fixed server role(thats erver wide permission and he can...

  • RE: How to delete a row if date and time are older than a spacific date and time

    Try this:

    Delete tableName where Cast(Convert(Char(10),DateIN,101) + ' ' + Cast(TIMEIN as varchar(10)) as datetime) <=  Cast(Convert(Char(10),getdate(),101) + ' 08:00:00' as Datetime)

    Sreejith

  • RE: Clear all rows : Among Delete, Truncate and Drop

    Delete on table with lot of rows will take a lot of time to commit all those Xaction.

    If you want to wipe away then use Truncate table

    Thanks

    Sreejith

  • RE: Duplicate table with the same structure

    1.Open the table in Enterprise Manager (Design Mode) and Select all the Columns and paste it in to new table.

    2.Right Click the table and generate script (with Indexes and Keys)....

  • RE: how convert float to nvarchar

    If you want Date Time to be converted to Char then u need to use Convert function cos I don't know why you would want to convert date to float...

  • RE: SQL 2000, IN clause, and soft order...

    Try this:

    select * from stores WHERE  Stor_ID IN (7067,6380,8042,7896)

    order by CharIndex(stor_id,'7067,6380,8042,7896')

Viewing 15 posts - 226 through 240 (of 314 total)