Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load with where

Hi

Is it possible to load from a DB with a where? I would like to load all data since 10.06.2013 and not older. Is that possible?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Very much possible. Try like:

Select * From <DB> Where DateField >= '10.06.2013'

Now here you have to ensure that the date format is similar in DB.

View solution in original post

11 Replies
tresesco
MVP
MVP

Very much possible. Try like:

Select * From <DB> Where DateField >= '10.06.2013'

Now here you have to ensure that the date format is similar in DB.

dmohanty
Partner - Specialist
Partner - Specialist

LOAD

A,

B,

C;

Select

A,

B,

C

From SchemaName.TableName

WHERE Date >= '10.06.2013'

IMP: Your Date Format should be same both in QlikView and DataBase

Not applicable
Author

I converted the Date with Load Date(Floor(DATETIME)) as Date..

can i also take this date?

dmohanty
Partner - Specialist
Partner - Specialist

Yes,

You can take both the fields: Original and Transformed. But make sure that both the fields are of different name, otherwise it would throw error. Make it DATE and NEW_DATE, like wise.

Not applicable
Author

I have now:

LoadedTable:

Load *,

          Date(Floor(DATETIME)) as Date;

ODBC CONNECT TO [xxx]

SQL SELECT action,

         ID,

          DATETIME

FROM xx."yy"

Where Date >= '19.08.2013';

Then I get the error  Expression missed

tresesco
MVP
MVP

Put the where clause in SQL select part and do the format changing in the RELOAD part using qv functions and there is no restriction of how many times you are pulling the same field (must be with different name) like below:

Load

          Date(Floor(DATETIME)) as Date,

          Month(DATETIME) as Month,

          Year(DATETIME) as Year ;

SQL SELECT

          *

from <>;

tresesco
MVP
MVP

Where Date >= '19.08.2013';   // this is wrong, try:

Where DATETIME >= '19.08.2013';  // but be careful about the timestamp format (as i already mentioned earlier)

Not applicable
Author

My code now:

ODBC CONNECT TO [xx] (xxxx);

Load Date(Floor(DATETIME)) as Date;

SQL SELECT ACTION,

                        ID,

                        DATETIME

WHERE Date >= '19.08.2013'

FROM XX."yy";

DATETIME is 10.08.2013 12:08:10.00000000 so i cant say where DATETIME >=

tresesco
MVP
MVP

Try this:

ODBC CONNECT TO [xx] (xxxx);

Load Date(Floor(DATETIME)) as Date;

SQL SELECT ACTION,

                        ID,

                        DATETIME

WHERE DATETIME >= '19.08.2013 00:00:00.00000000'

FROM RORC."RORC_ORDERS_FEED";