Viewing 15 posts - 76 through 90 (of 462 total)
Remove that first group by value..
SELECTCOUNT(dbo.LK_EXPHistory.Exp_High) AS High,
COUNT(LK_EXPHistory.Exp_Low) AS low ,
COUNT(LK_EXPHistory.Exp_Medium) AS medium,
COUNT(LK_EXPHistory.Exp_None) AS [No Expreience],
dbo.EXP_Area.Area,
dbo.EXP_Category.Category
FROM dbo.LK_EXPHistory
INNER JOIN dbo.EXP_Category
ON dbo.LK_EXPHistory.EXPCategoryID = dbo.EXP_Category.EXPCategoryID
INNER JOIN dbo.EXP_Area
ON...
January 19, 2010 at 7:23 am
arun.sas (1/18/2010)
Hi,What you have written in the statement is correct, but you should convert the date time type by convert (varchar (15), tet.dteTravelDate, 103)
Not always, I guess it depends on...
January 19, 2010 at 12:40 am
that should work,
SELECT dateadd(m, 1, getdate())
What is the format that you are looking for?
January 13, 2010 at 2:35 am
The query that Gsquared has suggested, (untested)
;WITH CTE (Title, Subject, row_no) as
( SELECT Title,Subject, Row_number() OVER(PARTITION BY Subject
Order by price desc) as row_num
FROM Book)
Select * from...
January 12, 2010 at 1:09 am
Dont you think you should be giving the variable names in your subsequent fetch also?
FETCH RATES INTO @baseModID, @tmpRate
(within your while loop)
January 12, 2010 at 12:53 am
I dont understand how 'A123456' would have 1 in total when there are no count in either modes
Is this what you need?
SELECT T1.ItemName,
SUM(CASE WHEN Mode ='AAA' THEN 1...
January 10, 2010 at 6:17 am
Depends (on the code) on the transactional blocks of your stored procedure.
http://msdn.microsoft.com/en-us/library/ms190612(SQL.90).aspx
January 8, 2010 at 5:41 am
Test data as suggested by SS but a 10000 feet view from my side is that you need an 'UNPIVOT'. Read this,
http://technet.microsoft.com/en-us/library/ms177410(SQL.90).aspx
January 8, 2010 at 5:37 am
Depends on your knowledge level of database/sql. Anyway, to start with,
I found a description in wikipedia, which goes like this,
A database trigger is procedural code that is automatically...
January 8, 2010 at 2:06 am
or may be this? (untested as there is no test data)
SELECT * INTO ##tmp_transaction
FROM dbo.tr_transactions a
Where a.scheme_id in (
(SELECT DISTINCT scheme_id
FROM dbo.tr_scheme_rates
WHERE recalculate_transactions = 1
AND (([start_date] < a.delivery_dtime) AND (end_date...
January 7, 2010 at 7:45 am
Dont you think you should be putting this after the ON clause ?
AND (([start_date] < a.delivery_dtime) AND (end_date > a.delivery_dtime))
January 7, 2010 at 7:42 am
Just to add to what tyson had to say,
BOL
Unicode strings
Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for...
January 7, 2010 at 4:21 am
A case of dynamic cross tab or pivot i guess. Read this excellent article.
January 6, 2010 at 4:07 am
I dont think there is any in built function for that. (I could be wrong). Lets wait and see if someone has a better suggestion. Thanks.
January 6, 2010 at 2:43 am
Viewing 15 posts - 76 through 90 (of 462 total)