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 |
jonclayIRM
Starting Member
12 Posts |
Posted - 2015-02-26 : 08:34:09
|
Hi thereI'm sure this is a very simple issue but I can't seem to get my head around it, and I wondered if anyone could please help?I'm using the following script, but instead of pulling out only user WEB it's pulling out others too and it completely ignoring my dates by pulling out records with lower dates.SELECT ContactID, AddressType, Address1, Address2, Address3, Town, County, Postcode,Telephone1, Telephone2, Fax, DateCreated, UserCreated, DateAmended, UserAmendedFROM dbo.AddressesWHERE DateCreated >'01/01/2015' OR DateAmended >'01/01/2015'AND UserCreated='WEB' OR UserAmended='WEB'ORDER BY UserCreated, DateCreated, UserAmended, DateAmendedMany thanksJon |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2015-02-26 : 08:56:07
|
WHERE (DateCreated >'20150101' OR DateAmended >'20150101')AND (UserCreated='WEB' OR UserAmended='WEB') Too old to Rock'n'Roll too young to die. |
|
|
jonclayIRM
Starting Member
12 Posts |
Posted - 2015-02-26 : 08:58:57
|
Wow.... that easy eh?!Thank you SO SO much!!Best wishesJon |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2015-02-27 : 15:23:34
|
:)welcome Too old to Rock'n'Roll too young to die. |
|
|
|
|
|
|
|