Viewing 15 posts - 8,791 through 8,805 (of 15,381 total)
You need to use a calendar table or a tally table as the main table for your query. You need to have a row for the date when there are...
April 4, 2013 at 9:52 am
Like this:
select RefNumber
from YourTable
where RefNumber not in
(
Select RefNumber
from YourTable
where EntryType not in (0, 2, 11)
)
April 4, 2013 at 9:50 am
prathibha_aviator (4/4/2013)
April 4, 2013 at 9:08 am
Your question is almost verbatim the MSDN definition of SOUNDEX. http://msdn.microsoft.com/en-us/library/ms187384.aspx
Now with the two phrases you listed the SOUNDEX would not be even close because the order of the words...
April 4, 2013 at 8:03 am
Since you say are new to sql. Looping and cursors are notoriously slow. When possible a set based approach will perform a lot better than cursor in most situations. There...
April 4, 2013 at 7:43 am
gurjer48 (4/3/2013)
Thank you the query is working fine.....regards
gurjer
Glad to know it is working and thanks for the feedback.
April 4, 2013 at 7:18 am
erikd (4/3/2013)
Lynn Pettis (4/3/2013)
erikd (4/3/2013)
Lynn Pettis (4/3/2013)
From your post I can't tell if you are using '\ n' (no space between the \ and n) as your row terminator.
There is...
April 3, 2013 at 3:10 pm
5280_Lifestyle (4/3/2013)
April 3, 2013 at 1:14 pm
Given the lack of details it is very difficult to offer much assistance here. I don't really understand why you have the subquery at all. I would also recommend that...
April 3, 2013 at 12:22 pm
Lynn Pettis (4/3/2013)
Biggest suggestion I have, don't use date as a column name. It is also a datatype starting with SQL Server 2008.
+1
Not only is it a reserved word...
April 3, 2013 at 10:42 am
Awesome job posting ddl and sample data along with desired output.
This produces the output according to your sample data.
select date, SchoolID from #temp
cross join #temp2
order by #temp2.SchoolID, #temp.date
April 3, 2013 at 10:33 am
erikd (4/3/2013)
Sean Lange (4/3/2013)
declare @thing...
April 3, 2013 at 10:27 am
Using your dynamic code as an example this will produce the same results but as a single query instead of 1 query for each column.
declare @thing nvarchar(max), @table sysname...
April 3, 2013 at 10:13 am
bpowers (4/3/2013)
April 3, 2013 at 9:46 am
Viewing 15 posts - 8,791 through 8,805 (of 15,381 total)