Viewing 15 posts - 1 through 15 (of 15 total)
I have tried on activity monitor as it shows wait type as IO_COMPLETION.
I have tried creating indexes on a table which i join while updating
but query still does not completing...
January 28, 2013 at 8:27 am
ChrisM@Work (9/14/2012)
rajawat.niranjan (9/13/2012)
Thanks @ChrisM@WorkIt worked 🙂
But what was wrong was is null sort or something else?
Each option in the CASE construct, including the ELSE, must have the same...
September 15, 2012 at 6:43 am
ChrisM@Work (9/13/2012)
declare @var int =2
select ClientInternalID, ClientName, NULL ParentInternalID
from TB_Client cl
CROSS APPLY (
SELECT OrderBy = CASE @var
WHEN 1 THEN CAST(ClientInternalID AS VARCHAR(10))
WHEN 2 THEN CAST(ClientName AS VARCHAR(10))
WHEN 4...
September 14, 2012 at 12:34 am
September 13, 2012 at 11:31 pm
ChrisM@Work (9/13/2012)
Eugene Elutin (9/13/2012)
It's only going to work if you use dynamic sql.
Please note, if you run the following type...
September 13, 2012 at 9:04 am
Hi All,
The following did't work
declare @index varchar(10) = 2
select CityInternalID, CityDefaultName, CityCountryID from TB_City where CityCountryID = 121 order by case @index when 4 then CityZipCodes...
September 13, 2012 at 3:01 am
Thank you dwain.c
While using sp_executesql dynamic sql working well. I will be preferring dynamic SQL here.
August 16, 2012 at 5:11 am
Thanks dwain.c
I have following queries regarding this:
1. Here I don't have all parameters compulsory except city, so if i use this single query every time I will be join all...
August 15, 2012 at 11:13 pm
Hi dwain.c
I am using IN clause because i have multiple values for countries and provinces.
and IN does not work with a variable without using dynamic query.
like select * from tb_country...
August 15, 2012 at 2:01 am
Hi All
right now I am using following dynamic sql code
to select a city Lat Long:
(Please suggest if there is better solution)
IF LTRIM(rtrim(@PostCode)) <> ''
BEGIN
select @ParameterList = ''
set @PtSql...
August 13, 2012 at 12:22 am
@dwain.c
I can Use IF/Else but there i'll have to use too many iterations,
Because @Country and @province may contain more that one value.
and each table City, Region, Country and Province contains...
August 9, 2012 at 11:49 pm
Yes this is not sure whether any of parameter will contain value or not except @city or @zip.
and also I guess IN clause won't work with a variable containing multiple...
August 9, 2012 at 10:06 pm
Yeah right 😛
that was mistake putting "DESC" instead of "ASC"
But my intention was "ASC".
😀
July 12, 2012 at 2:20 am
rhythmk (7/11/2012)
No issue.:-)
However one question.You did not mention which record you want.So if you want any specific record tweak the query little bit get the name of column for order...
July 12, 2012 at 12:47 am
That worked
Many Thanks @rhythmk 🙂
July 11, 2012 at 11:42 pm
Viewing 15 posts - 1 through 15 (of 15 total)