locked
How To Get resultset based on comma value RRS feed

  • Question

  • User2033107836 posted

    Hello
    This is my table1 data

    Field1	Field2	Field3
    A	50	01-Oct-2017
    B	50	01-Oct-2017
    C	50	02-Oct-2017
    C	50	02-Oct-2017

    *Note :- Here Field3 is datetime datatype

    if i pass 01-Oct-2017,02-Oct-2017 then i want to show resultset like this below

    50

    Tuesday, October 31, 2017 4:42 PM

Answers

  • User347430248 posted

    Hi asp.ambur,

    please refer the example below.

    Table in SQL:

    Query:

    SELECT distinct f2 
    FROM Table_1 
    WHERE f3 in ('2017-10-01','2017-10-02');

    Output:

    Regards

    Deepak

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 1, 2017 1:41 AM