Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script

Hello All,

I am actually trying to load data from SQL database:

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

    ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState='96';

The data are loaded correctly

However, I also want to load the data  where NextState is 99 so I am using the script below and it is not working:

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

    ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState='96' and '99';

Any idea where I am wrong please?

KR,

Hasvine

1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

where NextState='96' or  NextState='99';

View solution in original post

9 Replies
sushil353
Master II
Master II

Hi,

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

    ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState in ('96','99');

pokassov
Specialist
Specialist

where NextState='96' or  NextState='99';

Not applicable
Author

Hi Try this

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

  ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState='96' and NextState= '99';

thanks

Manju

Not applicable
Author

Thank you for the quick reply.

It is working now.

Not applicable
Author

Hi Hasvine,

Try this

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

  ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState='96' or NextState= '99';

awhitfield
Partner - Champion
Partner - Champion

Hi Hasvine,

can you please mark the appropriate answer as CORRECT - it helps other community members.

Thanks in advance

Andy

Not applicable
Author

Hi Andy,

I do not get the Correct option. I can only see helpful.

Could you please let me know where the option is so that i can change the option.

Thanks,

Hasvine

sunilkumarqv
Specialist II
Specialist II

Try this .

SQL SELECT AgentId,

    Campaign,

    Duration,

    ID,

    ActionLocalTime,

    SessionID,

    NextState

FROM "HN_Ondata".dbo.ODActions where NextState='96' and NextState='99';

awhitfield
Partner - Champion
Partner - Champion

Hi,

You have to open the original thread, then CORRECT will appear 🙂

Andy