Viewing 15 posts - 1 through 15 (of 41 total)
Hi
I used a different splitter function which is as follows:
CREATE FUNCTION [dbo].[Split](@String varchar(MAX), @Delimiter char(1))
returns @temptable TABLE (items varchar(MAX)) ...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
October 21, 2015 at 5:17 am
Sean,
Sorry for the late reply.
Since the requirement needed urgent solution we fixed it from the code behind.
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
May 11, 2015 at 2:41 am
Sean,
Thanks for the answer.
This will work only when the designations are known beforehand,right?
In my case the designations are not fixed and we take the values from the designation table.
Any solution...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
April 13, 2015 at 2:25 am
Sorry Sean..
I should have tested the order of data in the insert statement.Please find the orrect statements below:
inserting to' ProjectAssignment'
-----------------------------------
insert into dbo.ProjectAssignment
select 'A-6140','2014/03/04','P1','L30025',0,0,1,NULL,'','','',3,''
insert into dbo.ProjectAssignment
select 'A-6141','2014/03/04','P1','L30025',0,0,1,NULL,'','','',3,''
insert into dbo.ProjectAssignment
select...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
April 9, 2015 at 10:42 pm
Creating designation table
---------------------------
CREATE TABLE [dbo].[Designation](
[RecID] [bigint] IDENTITY(1,1) NOT NULL,
[DesignationID] AS ('D'+CONVERT([nvarchar](40),[RecID])),
[DesignationName] [nvarchar](100) NULL,
[Description] [nvarchar](500) NULL,
[Status] [smallint] NULL,
[JobLevel] [nvarchar](10) NULL
) ON [PRIMARY]
sample data
-------------
INSERT INTO dbo.Designation
select 'Group Test Manager','Group Test...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
April 9, 2015 at 2:06 am
Hi
Sorry for not adding the sample query.
Here it is:
-------------------------------------------------------------------------------------------------------------------
DECLARE @RunQry NVARCHAR(MAX),@DesignationNames NVARCHAR(MAX),@Designation NVARCHAR(MAX),@DesignationTotal nvarchar(MAX)
SELECT @Designation=COALESCE(@Designation+',','') + QUOTENAME([DesignationID])
FROM [dbo].[Designation] WHERE...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
April 7, 2015 at 12:07 am
One more thing...
If the original query is enough and it would be better without ordering added,pleas let me know that too.Any suggestions other than the ordering part,that would improve the...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
July 2, 2014 at 11:31 pm
Hi,
Sorry for that Jeff.You can find the sample data here.
-------------------------------------------------------
declare @Tmp Table(EmpId nvarchar(10),FullName nvarchar(60),DesignationName nvarchar(100),ReportingMgr nvarchar(60),LoginMgr nvarchar(60))
insert into @Tmp values('A-4981','Rupen','VP-SD','Moris','Rupen')
insert into @Tmp values('A-4982','Joe','SSDM','Rupen','Rupen')
insert into @Tmp values('A-4983','Roy','SSDM','Rupen','Rupen')
...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
July 2, 2014 at 11:20 pm
I finally solved the problem by using the following query:
SELECT FullName,convert(varchar,dob,103) Birthday
from @People
WHERE DATEPART(wk, DATEADD(yy, DATEPART(yy, @CurrDate)
- DATEPART(yy, dob), dob)) = DATEPART(wk,@CurrDate)
and datediff(d,convert(datetime,(cast(datepart(d,dob)as varchar)+'/'+
...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
August 31, 2011 at 5:35 am
Thanks Lowell..
I have tried your query as well as the one that follows:
SELECT FullName,convert(varchar,dob,103) Birthday
from @People
WHERE DATEPART(wk, DATEADD(yy, DATEPART(yy, GETDATE())
- DATEPART(yy, dob), dob)) = DATEPART(wk, GETDATE())
and...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
August 30, 2011 at 10:17 pm
Thanks Ken,but this does not give me the expected result.Sorry if i had not made myself clear in the previous post.
What i need is the upcoming birthdays of the current...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
August 30, 2011 at 5:21 am
See whether this works:
--------------------------
update a set userid='Amolr' from wuser a inner join cliente b on a.fid = b.fid where b.c_number in
(
select b.c_number from wuser a
inner join cliente b...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
July 18, 2011 at 12:33 am
If the file stream does not get encrypted,why is the answer 'YES'?I want my points back............
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
June 29, 2011 at 5:13 am
But a filtered index is possible only in SQL 2008.
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
May 24, 2011 at 3:49 am
Unique keys do not allow NULL values.As 'NULL' values cant be compared to check for uniqueness,the values of the unique column are considered to be equal.This means that a column...
---
Thinking is the hardest work there is, which is the probable reason so few engage in it.
Sunitha
😎
May 24, 2011 at 1:44 am
Viewing 15 posts - 1 through 15 (of 41 total)