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 |
ozandalkiran
Starting Member
13 Posts |
Posted - 2014-04-10 : 05:09:02
|
Hi i wanna write many and or operator.but when i wrote below code date interval nor workingmay u help me plsconvert(varchar(10),[CreateDate],104) as CreateDate ,[StatusCode] ,[MainCompanyLicenseCode] ,SST.SpecialStatusTypeName ,SS.Description ,[EPDKLicenseCode] ,[StationID] ,[DealerID] ,[EPDKProductNameID] ,[EPDKProductName] ,[ProductID] ,[StartDateTime] ,[EndDateTime] ,[SpecialStatusTypeID] ,[Missing] ,[Gain] ,[Status] ,[Approve] ,[IsSent] ,[StatusInfo] ,[CreatedBy] ,[CreationTime] ,[UpdatedBy] ,[UpdatedTime] ,[UpdateSource] ,[UpdatedByID] ,[IsManuel] ,[Missing_Bk] ,[Gain_Bk] ,[EPDKDescriptionID] ,[EpdkTableNumber] ,[EpdkSpecialStatusResponsiblesID] ,[Flag] FROM [PUMPOMAT_HO].[dbo].[EPDK_Table08_SpecialStatus] SS inner join EPDK_SpecialStatusTypes SST on SS.SpecialStatusTypeID = SST.RID where CreateDate between '20140101' and '20140409' and EpdkTableNumber =1 and SS.Description like '%1%tank%' or SS.Description like '%2%tank%' or SS.Description like '%3%tank%' or SS.Description like '%4%tank%' or SS.Description like '%5%tank%' or SS.Description like '%6%tank%' |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-04-10 : 05:41:58
|
[code]where CreateDate between '20140101' and '20140409' and ( EpdkTableNumber =1 and SS.Description like '%1%tank%' or SS.Description like '%2%tank%' or SS.Description like '%3%tank%' or SS.Description like '%4%tank%' or SS.Description like '%5%tank%' or SS.Description like '%6%tank%' )[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2014-04-10 : 06:44:17
|
or simplywhere CreateDate between '20140101' and '20140409' andEpdkTableNumber =1 and SS.Description like '%[123456]%tank%' MadhivananFailing to plan is Planning to fail |
|
|
ozandalkiran
Starting Member
13 Posts |
Posted - 2014-04-10 : 07:02:39
|
thank youquote: Originally posted by madhivanan or simplywhere CreateDate between '20140101' and '20140409' andEpdkTableNumber =1 and SS.Description like '%[123456]%tank%' MadhivananFailing to plan is Planning to fail
|
|
|
|
|
|
|
|