Viewing 15 posts - 331 through 345 (of 1,229 total)
SQL_Surfer (7/28/2013)
Can you give me some pointers of rewriting this query? Can data be grabbed at 1 shot instead of doing UNION ALL.
I think so. Post the whole query and...
July 28, 2013 at 1:46 pm
vshiva2379 (7/28/2013)
Since you did not understand i how given that data and more over i do not want to disclose my original data i have given that, if...
July 28, 2013 at 6:24 am
Dird (7/28/2013)
select name,case
when maths > science and maths > comp then 'maths'
when comp > science and comp > maths then 'comp'
else 'science'
end
from student
I think you need another edit...
July 28, 2013 at 6:03 am
vshiva2379 (7/28/2013)
My table is
Student
StudentID int,
name varchar(20),
maths int,
science int,
comp int
records are
1, Allen, 60, 80,75
2, John ,70,60,90
3, Kim, 86,85, 80
result...
July 28, 2013 at 5:57 am
It's not really possible to tell if a rCTE would return your resultset more efficiently. Can you post the actual query rather than pseudocode? There is a far more efficient...
July 28, 2013 at 5:27 am
AndrewSQLDBA (7/26/2013)
I am trying something, that I am not sure is possible.
I have a CreateDate column in a table, there are approx 5000 rows with the same date and...
July 26, 2013 at 10:24 am
thorkil (7/25/2013)
HiI want to find an integer after a hyphen in a string. If found, then use it. If not, then return -1
What do you want to do with 123.4?
July 25, 2013 at 8:20 am
prabhu.st (7/25/2013)
Thanks Guys,for reading my post,
finaly i got it,
yes,it is possible in the single query, it is..
select max(item) over()item from my_table where id = 5
Thanks,
Prabhu
No, that doesn't work. It returns...
July 25, 2013 at 7:27 am
prabhu.st (7/25/2013)
... CTE, SubQuery,JOINs,Derived Tables,
All of these are elements of a single query. What do you really mean? If you mean "using a single query and without using any...
July 25, 2013 at 7:04 am
I've had some good results from this in recent years:
USE [Matching]
GO
/****** Object: UserDefinedFunction [dbo].[IF_Levenshtein01] Script Date: 25/07/2013 10:00:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- this will score...
July 25, 2013 at 3:13 am
Can you post up a sample data script please?
July 25, 2013 at 2:56 am
savycara (7/24/2013)
I need this column data...
July 25, 2013 at 1:58 am
r_noob (7/15/2013)
... ON (A.Field1 like '% ' + B.LookupValue + ' %')
That looks like words in a sentence. Try Jeff's splitter: split the sentence on space, remove any leading blanks...
July 16, 2013 at 2:11 pm
Break up your cte/derived table chain:
WITH EMPLOYMENT_OPPORTUNITIES_CTE(
rownumber, id,title,contactperson,lastmodified,description,workexperiencetypeid,
workexperience,jobtypeid,AcademicExperienceTypeId,
industryid,industryid2,industryid3,salaryminid,salarymaxid,
jobTitle,city,state,PostalCode,positions,deadline)
AS
(
SELECT top 4000 -- top 4000 what? Hair colour? Use ORDER BY or risk random and unpredictable results!
ROW_NUMBER() OVER (ORDER BY lastmodified DESC)...
May 21, 2013 at 12:57 pm
April 26, 2013 at 2:46 pm
Viewing 15 posts - 331 through 345 (of 1,229 total)