Viewing 15 posts - 1 through 15 (of 22 total)
first of all serg-52 no need to be sorry.
thanks for the solution.
want a suggestion on some nice way to improve knowledge of new sql as till now i was using...
January 26, 2015 at 11:15 pm
the above solution fails when i
update MstrMap set MapValidUpto = 40100
where MapPerson = '2001'
and
add another row
INSERT [dbo].[MstrMap] ([MapDepartment], [MapPerson],[MapGroup],[MapValidFrom],[MapValidUpto],[MapMdfdBy], [MapMdfdOn])
VALUES (N'MGMT ', N'2001 ',N'', 40101, NULL,1, CAST(N'2014-05-08 18:01:22.000'...
January 23, 2015 at 12:23 am
old hand thanks for the solution but this solution fails in some scenarios.
can you further help me with the same.
January 23, 2015 at 12:13 am
thanks old hand for the perfect solution required by me 🙂
January 20, 2015 at 9:58 pm
if you look at desired output you will come to know my difficulty.
sorry if i am not able to explain my problem properly.
my required output being code 2002,2003 for specific...
January 20, 2015 at 5:35 am
CREATE TABLE [dbo].[MstrMap](
[MapKey] [bigint] IDENTITY(1,1) NOT NULL,
[MapDepartment] [varchar](8) NULL,
[MapPerson] [char](8) NULL,
[MapGroup] [varchar](12) NULL,
[MapValidFrom] [int] NULL,
[MapValidUpto] [int] NULL,
[MapMdfdBy] [smallint] NULL,
[MapMdfdOn] [datetime] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
INSERT [dbo].[MstrMap] ([MapDepartment], [MapPerson],[MapGroup],[MapValidFrom],[MapValidUpto],[MapMdfdBy], [MapMdfdOn])
VALUES...
January 20, 2015 at 5:29 am
CREATE TABLE [dbo].[MstrPerson](
[PrsnCode] [char](8) NOT NULL,
[PrsnName] [varchar](30) NULL,
[PrsnGrpCode] [varchar](12) NULL,
[PrsnMdfdBy] [smallint] NULL,
[PrsnMdfdOn] [datetime] NULL,
CONSTRAINT [PK_MstrPerson] PRIMARY KEY CLUSTERED
(
[PrsnCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,...
January 20, 2015 at 5:19 am
this is the actual query i have used to get desired result,but i fell its not proper method to write the query
Select PersonID,PersonGrp,PersonName,MapID,MapDepartment,DateFrom,DateTo
From Person Join PersonMap On MapPersonID = PersonID
Union
Select...
January 20, 2015 at 5:01 am
sorry phil i am used to using that case for my office work. will keep it in mind in further posts
January 20, 2015 at 4:55 am
I Have Used Multiple Unions To Get Desired Output.
1. Join On MapPersonID = PersonID
2. Join On MapGrp = PersonGrp
3. Join On For Others Memebers But It Gives Me Dulpicate Records...
January 20, 2015 at 4:54 am
The Tables Are Related To Each Other As 1st Table Has List Of Employee And Other The Department In Which They Work.MapPerID = PersonID Of First Table.MapGrp = PersonGrp Of...
January 20, 2015 at 4:26 am
Thanks Jack Bro For The Solution.
The Double Qoutes Was Giving Error.
The Escaped Qutes One Done The Trick For Me.
SSChampion Now My Other Query Where I Had To Update 10 Lakhs...
December 31, 2008 at 9:52 pm
You likely need to escape the single quotes in your where clause or you can use double quotes around Jay as at least the Foxpro ODBC and OLEDB drivers will...
December 31, 2008 at 12:19 am
I Use The Index On The MyKey Or TrKey Field And DbfFileName Field For Comparing It With My Main Table (Which Has Same Structure As Temp)
For Finding Data In Temp...
December 31, 2008 at 12:11 am
SSChampion The Update Quries Are
1. Update MyTemp Set DbfFileName = '2005.Dbf' ,TrExchng = 51
2. Update MyTemp Set MyKey = Str(TrExchng,2) + TrValNo + TrPtyCod + TrCurDt + TrPrdCod
These Are The...
December 30, 2008 at 9:41 pm
Viewing 15 posts - 1 through 15 (of 22 total)