Viewing 15 posts - 16 through 30 (of 33 total)
Thank you Will try and test the performance
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
November 12, 2014 at 5:50 am
Yes after the @
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
November 12, 2014 at 5:41 am
Hi
Try this way
as my prev piece of code but only change the left join between the tables.
CREATE TABLE #REV_BINDERS2
(
[OFFICE_ID]...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
October 28, 2014 at 2:21 am
Hi
Try a cover index
something in the line of
CREATE NONCLUSTERED INDEX Idx_CoverIndex ON InvoiceEquipment (EquipID,InvoiceDate DESC) inlcude (Amount,Type)
Kind Regards
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
October 27, 2014 at 5:07 am
HI
maybe this will also help. Thou not an IN operator but effective
Kind Regards
CREATE TABLE #REV_BINDERS2
(
[OFFICE_ID] [INT] NOT NULL
...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
October 27, 2014 at 5:04 am
Hi Luis
Thanks for the link. Will have a look at it.
Regards Daniel
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 3, 2014 at 10:22 pm
Eirikur Eiriksson (8/2/2014)
Daniel Matthee (8/2/2014)
Eirikur Eiriksson (8/2/2014)
CONVERT(INT,P.[20140728]) + CONVERT(INT,P.[20140804])
Hi Eirikur
I dont fully agree that it has the same flexibility.
For example in my suggestion i can create any date...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 12:01 pm
GilaMonster (8/2/2014)
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 11:59 am
Eirikur Eiriksson (8/2/2014)
CONVERT(INT,P.[20140728]) + CONVERT(INT,P.[20140804])
Hi Eirikur
I dont fully agree that it has the same flexibility.
For example in my suggestion i can create any date range as a integer...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 11:50 am
Hi
Please help me if I am wrong. But usually when i do an inner select and look at sql monitor the physical reads, or even sp_who2 active the amount of...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 10:58 am
Hi
Yes normalize should work but if you can get your dates to be more like and integer value like 20140707 = 7-jul-14
then the following idea might work better for you.
CREATE...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 3:19 am
Hi
I recommend create a nice function on your database.
CREATE FUNCTION [dbo].[getParmsFromString]
(@String VARCHAR(MAX))
RETURNS @Parms TABLE
(
...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 2:48 am
So this can easily be done in SQL.
But since this is string parsing it will be intense on the sql server. So i recommend to rather change the way the...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 2, 2014 at 2:29 am
Hi
What about something like this.
declare @inc int = 0
create table #BATCH (
Number int,
BATCH varchar(2)
)
while (@inc < 36000)
begin
insert into #BATCH
select @inc,
case
WHEN @inc BETWEEN 10000 AND 10999 THEN 'A' ...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 1, 2014 at 5:04 pm
Hi
Although the above mentioned queries will work I have learned not to do Inner select as this creates over head on the tempdb on the server.
An inner select is sql...
--------------------------------------------------------------------------------------------------------------------------------------------------------
To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
http://www.sql-sa.co.za
August 1, 2014 at 4:38 pm
Viewing 15 posts - 16 through 30 (of 33 total)