Forum Replies Created

Viewing 15 posts - 151 through 165 (of 314 total)

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

    Does your table have identity or any column that can be used to programatically determine what you mean by "two rows before the last one"?

    If so its easy to do.

    Thanks

    Sreejith

  • RE: COMMIT TRAN hanging in Stored Proc

    Try this:

    select @recno = max(msgrecordid) from messagessent

    BEGIN TRAN

    Insert into svr001.storedlaneinfo.dbo.messagessent (MsgRecordID,Collector,[Time],[Date],Plaza,Lane,

    MsgID,Message,EntryBarcode,DateAdded)

    select MsgRecordID,Collector,[Time],[Date],Plaza,Lane,MsgID,replace(Message,'''',''''''),EntryBarcode,

    DateAdded from messagessent where msgrecordid <=@recno

    select @er = @@error

    IF (@er = 0)

    Begin

     

     Insert into svr002.storedlaneinfo.dbo.messagessent (MsgRecordID,Collector,[Time],[Date],Plaza,Lane,

     MsgID,Message,EntryBarcode,DateAdded)...

  • RE: OUTER JOIN - Help, I''''m stumped

    I hope u are trying this:

     

    select * from tblSOP_Type

    LEFT OUTER JOIN tblSOPS ON tblSOP_Type.id = tblSOPS.tblSOPType_id

    thanks

    Sreejith

  • RE: A very strange date issue

    Sameer,

    It could be cos the Date time field stores Time as well so for example 1999-03-05 11:00:00.000 might not be picked up by your query so try this:

    select * from FTBuEmployeeEvaluation

    where...

  • RE: Can you query against a CURSOR?

    I am not clear but I assume you were you trying to do something like this.

    Select  MatNum,VerNumMat,MatDesc,SpecSta,OldMatID,MatTypeCode,MatSubTypeCode  

     FROM  dbo.tb_MatSpec  tb_MatSpec INNER JOIN

      (

       Select  MatNum, Max(VerNumMat) as VerNumMat,'A-D' as SpecSta...

  • RE: Using MAX in an UPDATE

    I've done this before and haven't had problem. But its good to know I will avoid it in future.

    Thanks

    Sreejith

  • RE: Help with Query Design?

    Try this:

    Select StaffDetails.EmpId,StaffDetails.EmpName,EmpTotals.SumTotalNet,EmpTotals.SumTotalCost

     from StaffDetails LEFT OUTER JOIN (

     select  EmpId,sum([Total Net]) as SumTotalNet,sum([Total CostBC]) as SumTotalCost

     from InvoiceTotals

     group by EmpId ) EmpTotals on StaffDetails.EmpId = EmpTotals.EmpId

    Thanks

    Sreejith

  • RE: Join question...

    David,

    Great plains gets u doesn't it? It has been almost 2 years since I've worked with GP. But my understanding is this:

    IV00101 is Inventory Master

    IV00102 is Inventory Location (Here u...

  • RE: Query Help

    Just making it cleaner:

    Select ARDoc.OrdNbr from ARDoc

    left outer join Shippers on ltrim(rtrim(ARDoc.OrdNbr)) = ltrim(rtrim(Shippers.OrdNbr))

    where isnull(ltrim(rtrim(Shippers.InvcNbr)),'') <> isnull(ltrim(rtrim(ARDoc.RefNbr)),'')

  • RE: Strange Query Results

    I know that query should have worked. Can you try this

    select count(*) from mainestimatedetails where not exists (select 1 from mainjobdetails where mainestimatedetails.id =mainjobdetails.estimateid)

    Thanks

    Sreejith

  • RE: how to run a DTS to be managed by a JOB

    Go to Enterprise Manager->Data Transformation Services->locate the package you want to schedule and Right Click on the PackageName and Select "Schedule". You will see all the options that you have....

  • RE: Outlook and Error Logs

    Don't post the same question in different fourms

    Thanks

    Sreejith

  • RE: Nested values in a table

    Have you ever thought what would happen if someone put a clustered index, then all ur assumption is blown away. This is very tricky cos u don't know which one...

  • RE: Can you query against a CURSOR?

    1.Can you explain what ur process is trying to do (in layman's term).why do u think Cursor is the only way to do it? Looks like you are looping through...

  • RE: Creating text files for each row of the ouput

    Have you tried to print the command?  Do that and try running that command from command shell and see what error you get. It could be realted to some synrax...

Viewing 15 posts - 151 through 165 (of 314 total)