Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)

  • RE: Help With Select Query

    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...

  • RE: Help With Select Query

    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'...

  • RE: Help With Select Query

    old hand thanks for the solution but this solution fails in some scenarios.

    can you further help me with the same.

  • RE: Help With Select Query

    thanks old hand for the perfect solution required by me 🙂

  • RE: Help With Select Query

    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...

  • RE: Help With Select Query

    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...

  • RE: Help With Select Query

    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,...

  • RE: Help With Select Query

    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...

  • RE: Help With Select Query

    sorry phil i am used to using that case for my office work. will keep it in mind in further posts

  • RE: Help With Select Query

    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...

  • RE: Help With Select Query

    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...

  • RE: Data Import In SQL 2000

    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...

  • RE: Data Import In SQL 2000

    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...

  • RE: Update Query Issue

    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...

  • RE: Update Query Issue

    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...

Viewing 15 posts - 1 through 15 (of 22 total)