Forum Replies Created

Viewing 11 posts - 1 through 12 (of 12 total)

  • RE: Replace the values from the lookup tables

    Lookup Table 1:

    CREATE TABLE [dbo].[LT1](

    [LT1_ID] [varchar](25) NULL,

    [Desc] [varchar](25) NULL);

    insert into [LT1] ([LT1_ID] ,[Desc]) values ("Cat_Code","Category"),

    ("Prod_Code", "Product")

    Lookup Table 2:

    CREATE TABLE [dbo].[LT2](

    [LT2_ID] [varchar](25) NULL,

    [Val] [varchar](25) NULL);

    insert into [LT2] ([LT2_ID] ,[Val])...

  • RE: get lookup data

    Thank you

  • RE: get lookup data

    Thank you...I really appreciate your help

  • RE: get lookup data

    Getting error message: conversion failed when converting _A to int

  • RE: get lookup data

    the above one is the final structure of table... sorry about my confusion

  • RE: get lookup data

    Sorry... Here is the table structure

    I have two tables, lets say Table 1 and Table 2 as below

    Table 1:

    Col1 Col2 Col3

    1 _A 11

    2 _B 12

    3 _C 12

    4 _A 11

    Table 2:

    ID...

  • RE: get lookup data

    Simply table 1 with the following data

    I have two tables, lets say Table 1 and Table 2 as below

    Table 1:

    Col1 Col2 Col3

    1 _A 11

    2 _B 12

    3 _C 12

    4 _A 11

    Table...

  • RE: get lookup data

    _A, _B are in Col3 and 1,2 are in Col2 in Table 1.

    Sorry about the confusion

  • RE: get lookup data

    Sorry... I have the data in table something like this

    Table 1:

    Col1 Col2 Col3

    1 _A

    2 _B

    3 ...

  • RE: Ignore row if the one of the codes is null

    Thanks for you reply.

    I just tried the below sql and it is working as expected.

    select*

    from(

    select*, r = dense_rank() over (partition by num order by case when rcode is not null...

  • RE: append column data

    Thank you... Thank you so much

Viewing 11 posts - 1 through 12 (of 12 total)