Viewing 15 posts - 6,496 through 6,510 (of 7,608 total)
Eugene Elutin (7/25/2013)
webrunner (7/25/2013)
July 25, 2013 at 9:40 am
Easy enough to demonstrate that:
USE tempdb --you can use a "real" db if you prefer
GO
IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'table1' AND schema_id = 1)
...
July 25, 2013 at 8:29 am
Eugene Elutin (7/25/2013)
Alexander Suprun (7/24/2013)
Eugene Elutin (7/24/2013)
RAISERROR cause transaction to rollback, so your log insert is rollbacked as well as delete...
It's so untrue...
RAISERROR has nothing to do with the transaction.
It's...
July 25, 2013 at 8:27 am
webrunner (7/24/2013)
Alexander Suprun (7/24/2013)
July 24, 2013 at 5:22 pm
You don't need to explicitly cast it in this case, because integer has a higher precedence than varchar, so SQL will implicitly force the varchar to integer.
You should check the...
July 22, 2013 at 4:30 pm
From a performance standpoint, a single table can work just as well as partitioning in many cases as long as you have the correct clustered index. But if you've...
July 22, 2013 at 3:00 pm
This is why cursors exist. Just use a cursor, unless you have an extraordinarily high volume of emails to send.
CREATE TABLE [dbo].[TestData](
[text] NULL, --??...
July 22, 2013 at 2:25 pm
You'll get better performance from clustering on the date -- as the only or first key column -- if date/date range is specified in the queries.
I believe a...
July 22, 2013 at 2:11 pm
You don't need a CTE. In this case, it would just add complexity for no real reason that I can see :-).
July 22, 2013 at 2:03 pm
Sean Lange (7/22/2013)
Sue-651097 (7/22/2013)
But this doesn't solve the problem with the like operator as I cannot implement the wildcard %, or?
Yes you can still do a wildcard search.
inner join #search...
July 22, 2013 at 1:39 pm
Michael Valentine Jones (7/22/2013)The CASE expression will verify that the data string is in YYYY-MM-DD format, and is a valid date. It will return a 1 if the date...
July 22, 2013 at 11:34 am
Something like this should be very close at least, I think:
create proc pSearch
@searchparam varchar(400) -- values will be entered like this - seperated by comma: John, Mary, 23.10.1980
as
set @searchparam...
July 22, 2013 at 11:19 am
chrissorric (7/17/2013)Thanks for all the help!
This is what I finally came up with
SELECTp.OrderNum
FROM@Orders AS p
INNER JOIN@Results AS x ON x.LabNum = p.LabNum
GROUP BYp.OrderNum
HAVING SUM(Case when x.Flag = 'N'THEN 1...
July 17, 2013 at 1:11 pm
If the first date is greater than the second date, you will get a negative value.
If you want to treat all date differences as positive, add ABS() function around the...
July 16, 2013 at 3:27 pm
If you can, instead just truncate the old table, then re-insert only the kept rows.
July 16, 2013 at 2:15 pm
Viewing 15 posts - 6,496 through 6,510 (of 7,608 total)