Viewing 15 posts - 151 through 165 (of 314 total)
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
September 15, 2006 at 4:08 pm
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)...
September 15, 2006 at 4:04 pm
I hope u are trying this:
select * from tblSOP_Type
LEFT OUTER JOIN tblSOPS ON tblSOP_Type.id = tblSOPS.tblSOPType_id
thanks
Sreejith
September 15, 2006 at 2:17 pm
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...
September 15, 2006 at 2:03 pm
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...
September 15, 2006 at 12:02 pm
I've done this before and haven't had problem. But its good to know I will avoid it in future.
Thanks
Sreejith
September 15, 2006 at 11:00 am
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
September 15, 2006 at 10:56 am
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...
September 15, 2006 at 10:38 am
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)),'')
September 15, 2006 at 10:31 am
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
September 15, 2006 at 10:28 am
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....
September 15, 2006 at 10:24 am
Don't post the same question in different fourms
Thanks
Sreejith
September 14, 2006 at 5:42 pm
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...
September 14, 2006 at 3:33 pm
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...
September 14, 2006 at 3:27 pm
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...
September 14, 2006 at 2:49 pm
Viewing 15 posts - 151 through 165 (of 314 total)