Forum Replies Created

Viewing 15 posts - 1 through 15 (of 74 total)

  • RE: Temp table - table scan

    Yes.. But First name or MiddleNamee or Lastname would differ... I simulated my actual table into this one.. Thanks brown.. i will try to create clustered index on empno column....

    Thanks...

  • RE: Temp table - table scan

    Thanks to All...

    create table #emp

    (

    empnoint,

    firstname varchar(128),

    middlename varchar(128),

    lastnamevarchar(128)

    )

    Inside a Sp i m creating this temp table. is it possible to create a clustered index on the column that has duplication? .....

  • RE: Temp table - table scan

    Thanks Brown!!!.. but i cant make column empno as autoincreament as per requirement....but i can additionally add one more column and make it auto increment. will that avoid table scan?.....

  • RE: SP to execute at every nite

    but i am using Express edition....i thk there wont be sql agent in it

  • RE: best decimal value for currency-amount column

    Crystal Clear!!!!!!... Thanks a lot

  • RE: Query performance n Index needed?

    thanks jeff.... but some other transaction may use this table..so i cant use truncate cmd...

  • RE: Query performance n Index needed?

    INSERT INTO SA_HR_LINES(PUB_ID,PD_NAME,

    FROM_DATE,TO_DATE,

    QT_NUM,STRD_YEAR,

    ADVANCE_PID,STATUS,

    TRN,SESSION_ID,

    CREATED_BY,CREATED_DATE,

    UPDATED_BY,UPDATED_DATE)

    SELECT @PVC_PUB_ID,

    ATTRIBUTE2,

    CONVERT(VARCHAR(11), LTRIM(RTRIM(ATTRIBUTE3)), 106),

    CONVERT(VARCHAR(11), LTRIM(RTRIM(ATTRIBUTE4)), 106),

    ATTRIBUTE5,ATTRIBUTE6,

    ATTRIBUTE7,1,

    TRN,SESSION_ID,

    @PVC_LOGIN_USER,GETDATE(),

    @PVC_LOGIN_USER,GETDATE()

    FROM TAB_TEMP WHERE ACTION_FLAG='I' AND

    SESSION_ID=@PBI_SESSION_ID AND TRN=@PBI_TRN

    UPDATE pub_lines SET

    PUB_ID= tempTable.ATTRIBUTE1,

    PD_NAME ...

  • RE: Complex Query

    Hello Jeff... i implemented it in my coding which has more columns..it works fine.. is there any other way to make it simple?:-)

  • RE: Complex Query

    thats works like a charm... thanks a lot chris 🙂

  • RE: Complex Query

    Thanks Derby... but i cant use SP.. just CTE or select - query kind of....thats the problem... 🙁

  • RE: CTE problem with insert

    create table #sample(sno int identity,student_no int, head int,task varchar(50))

    insert into #sample (student_no,head,task) values(1,10,'tactical')

    insert into #sample (student_no,head,task) values(10,20,'basket')

    insert into #sample (student_no,head,task) values(20,40,'aerospace')

    insert into #sample (student_no,head,task) values(40,10,'robot')

    insert into #sample (student_no,head,task) values(10,40,'tackle')

    insert into...

  • RE: SP skelton

    Thanks fritchey.....

  • RE: SP skelton

    Grant Fritchey (3/7/2011)


    1) it really depends on what you're looking for. Basically it seems OK. I'm not sure I'd have the outer BEGIN...END wrapper because it's not really doing anything...

  • RE: Doubt in compile

    Hi Lowel,

    We are making all business logic of the project into SP format.. so all logic is written as a SP.. having following skelton...

    IF EXISTS (SELECT * FROM sysobjects

    ...

  • RE: complex query

    i am not fond of copy and paste... just want to a better way to achieve it... since i m a beginner i dont knw how efficient to...

Viewing 15 posts - 1 through 15 (of 74 total)