Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
maarten.del
Starting Member
17 Posts |
Posted - 2009-08-05 : 04:33:15
|
| Hi,I do this...DELETE FROM [mona].[dbo].[TB_CR_Tellerstanden_LOT_2]INSERT INTO [mona].[dbo].[TB_CR_Tellerstanden_LOT_2] ([RtuTimeStamp] ,[Tag] ,[Value])SELECT TOP (100) PERCENT RtuTimestamp, RtuName, isnull(MeasValue, 0) as MeasValueFROM dbo.HisLogWHERE (RtuTimestamp >= Convert(datetime,(left(CONVERT(nvarchar, (CURRENT_TIMESTAMP - 10), 20), 10)))) and (SUBSTRING ( TagName ,6 , 3 )= 'ATE')ORDER BY RtuTimestamp desc, RtuNameI copy values from Hislog to TB_CR_Tellerstanden_LOT_2 but want to at 'R' to the RtuName at the end. How do i do that?Thanks in advance.Maartenbe green, leave it on the screen |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-05 : 04:59:49
|
| SELECT TOP (100) PERCENT RtuTimestamp, 'R' as RtuName, isnull(MeasValue, 0) as MeasValueFROM dbo.HisLogWHERE (RtuTimestamp >= Convert(datetime,(left(CONVERT(nvarchar, (CURRENT_TIMESTAMP - 10), 20), 10)))) and (SUBSTRING ( TagName ,6 , 3 )= 'ATE')ORDER BY RtuTimestamp desc, RtuNameMadhivananFailing to plan is Planning to fail |
 |
|
|
maarten.del
Starting Member
17 Posts |
Posted - 2009-08-05 : 05:38:23
|
| Found it!!!(RtuName + 'R') as RtuNameThanks |
 |
|
|
|
|
|
|
|