Viewing 15 posts - 4,756 through 4,770 (of 7,597 total)
Luis Cazares (9/21/2015)
WayneS (9/21/2015)
Kristen-173977 (9/20/2015)
GilaMonster (9/19/2015)
September 22, 2015 at 8:53 am
This really looks like a trigger. Check for db-level (DDL) triggers. If not, check for server-based triggers (that seems unlikely in this case, though). For example:
SELECT t.*
FROM...
September 21, 2015 at 1:45 pm
SQL provides some help here.
You can use missing index views
sys.dm_db_missing_index*
and the index stats view:
sys.dm_db_index_usage_stats
to help determine what indexes to create.
First and absolutely foremost, you need to determine and implement the...
September 21, 2015 at 10:55 am
If you don't require an nvarchar search, you can use varchar and get 900 chars to search.
September 21, 2015 at 8:28 am
Since you're always searching at the start of the string, you could add a persisted computed column of ~900 bytes and search on that:
ALTER TABLE ourtable
ADD bigcolumn_search AS CAST(LEFT(bigcolumn, 450)...
September 18, 2015 at 4:06 pm
Here's another method to try, just in case:
SELECT
ta.last_name,
ta.first_name,
tb.ID
FROM
TableA ta
INNER...
September 18, 2015 at 2:20 pm
That code is dependent on the DATEFIRST setting, and I don't believe it's accurate anyway. Maybe this?:
--additional dates for testing/verification
INSERT INTO #weekdays (datevalue, numericvalue) VALUES
('20150101', 1000),
('20150102', 1001),
('20150103', 1001),
('20150104', 1001),
('20150105',...
September 17, 2015 at 1:11 pm
The design is basic, but it seems workable for very straightforward messaging.
Just some possibilities, not necessarily better than what you have:
1) I agree with an identity column on the Message...
September 17, 2015 at 12:32 pm
If instead of sync'ing up just once a day, or some other slow schedule, you want an up-to-the-second value, why not just get the value from the actual table itself...
September 16, 2015 at 5:07 pm
I was just using CAST to show that it would avoid the implicit conversion, but it still didn't resolve the need to recompile. This is just a failure on...
September 16, 2015 at 3:37 pm
Thanks for the follow up.
Interesting, and bizarre. We can prevent the implicit conversion using CAST. But we still have to recompile even to avoid a full query scan...
September 16, 2015 at 2:40 pm
Kristen-173977 (9/16/2015)
ScottPletcher (9/16/2015)
If you're trying to return a result set, not sure if that will work the same or not.
We do both ways and I can't say I've ever known...
September 16, 2015 at 12:13 pm
If you're going to allow that, easiest would be to then quote all the values:
Select 'Apple=''5'',Orange=''10,11,12'',Banana=''11''' UNION ALL
Then you can use the same technique with a delimiter of ''',' instead...
September 16, 2015 at 11:37 am
Maybe you could do something like this:
CREATE PROCEDURE dbo.GetSomeData (@rptType INT, @customerID INT)
AS
SET NOCOUNT ON
IF @rptType = 1
EXEC dbo.rpt_1 @customerID
ELSE IF @rptType = 2
...
September 16, 2015 at 11:28 am
My understand was that all operation codes needed shown, not just the two being checked.
September 16, 2015 at 10:33 am
Viewing 15 posts - 4,756 through 4,770 (of 7,597 total)