Viewing 15 posts - 1,456 through 1,470 (of 1,920 total)
You have to change the default keyboard lay-out of SSMS 2008 ; follow thsi path to change it
1. Tools
2. Options
3. Environment -> Keyboard
4. Keyboard Scheme --> SQL Server 2000
Hope...
May 26, 2010 at 6:11 am
Hi there, as Gail said, you will have to look up at PIVOT.
For starters, i have coded for your requirement, but this is only w.r.t the sample data you provided!...
May 26, 2010 at 5:12 am
Anamika, excellent work done in posting the necessary tables , sample data and an equally good "desired result".. Kudos to you!
Now for your desired result, try this query:
SELECT TT.ID,
...
May 26, 2010 at 4:26 am
arun.sas (5/26/2010)
Nice approach cold coffee, a bit change in the statements. It’s should like
select dateadd(dd,N-1,@startdate)from dbo.tally
where n <= datediff(dd,@startdate,@enddate)+1
Oh yeah, arun, sorry for...
May 26, 2010 at 2:14 am
Hi Mohan , the following code wil help you out!
--===== Create and populate the Tally table on the fly
SELECT TOP 11000 --equates to more than 30 years of dates
...
May 25, 2010 at 11:19 pm
Small example depicting the retrieval of a value from the dynamics-sql to the calling code:
The dynamic-sql take a divisor from the outside, calculates the division and returns the quotient to...
May 25, 2010 at 8:37 pm
Jeff Moden (5/25/2010)
ColdCoffee (5/25/2010)
May 25, 2010 at 8:30 pm
Sample data and table:
DECLARE @Employees TABLE
(
EMPLID INT,
EMP_STATUS VARCHAR(3),
EMP_IDENTITY VARCHAR(5)
)
INSERT INTO @Employees (EMPLID ,EMP_STATUS ,EMP_IDENTITY)
SELECT 121210,'A','A321' UNION ALL
SELECT 121211,'L','B123'
DECLARE @Tests TABLE
(
EMPLID INT,
TEST_ID VARCHAR(5),
TEST_DT DATETIME
)
INSERT...
May 25, 2010 at 8:24 pm
WayneS, as a classic question, do u really think ISNUMERIC can be used as an is_all_digits functions? There is nothing that a super fast coder like you don't know and...
May 25, 2010 at 8:08 pm
As you are first time poster, you probably wont be aware of how to post the data in ready-to-use format, so i took the onus on my side and created...
May 25, 2010 at 6:21 am
One doubt, will a parent have only 3 childs? If it is, then i have the code for you! Please clarify!
May 25, 2010 at 5:49 am
INSERT INTO kurs.utbetalning (personal_id)
SELECT personal_id FROM kurs.personal
GO
and I get the following error message:
Msg 515, Level 16, State 2, Line 2
Cannot insert the value NULL into column 'loneperiod', table 'kursdatabas.kurs.utbetalning'; column...
May 25, 2010 at 3:11 am
Rectified the code again with the Vairables yoyu used!
Code:
Select Emp_Name,Emp_Surename,Emp_Shomareshenasname,Edarekol_Id,Vahed_Id
from Employee
where
(Emp_Name=Case when @VarEmp_Name is not null Then @VarEmp_Name Else Emp_Name end)
And
(Emp_Surename=Case when @VarEmp_Surename is not null Then @VarEmp_Surename Else...
May 25, 2010 at 2:35 am
Viewing 15 posts - 1,456 through 1,470 (of 1,920 total)