Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excluding things from a field during load

Hi, I have a field where I have bunch of things that I don't need. How can I limit this?

For example, I have a field called production_line where I only need things that start with the letter L.

production_line

wsk090

lsk090

lam110

man102

so I only want to extract the 'lsk090' and 'lam110'

1 Solution

Accepted Solutions
ecolomer
Master II
Master II

Yes,

LOAD * from file.qvd

where left(production_line, 1)='l';

or

where production_line like 'l*';

Saludos,

Enrique

View solution in original post

13 Replies
jerem1234
Specialist II
Specialist II

Try somethng like:

Table2:

Load .....

Resident Table1

where production_line like 'l*';

Hope this helps!

ecolomer
Master II
Master II

In the select you can put ...

where left(production_line, 1)='l';

to select only the elements from production_line with first leter = l

Saludos,

Enrique

Not applicable
Author

Right now, I'm using a QVD to load this field.

Would I put   Where Left(production_line, 1)='1' right after the field in the load statement?

jerem1234
Specialist II
Specialist II

Something like:

Data:

LOAD *

FROM Test.qvd (qvd)

where production_line like 'l*';

So, yes after load statement.

Not applicable
Author

Hi,

Yes use Left() function but change = '1' for = 'l' (L) or use commodin "*" something like this:

* Opc1 (Left)

Table1:

LOAD *

From myFile.qvd

Where Left(production_line,1)='l';

or

* Opc2 (Commodin *)

Table1:

LOAD *

From myFile.qvd

Where production_line,1 like 'l*';

Best regards.

maxgro
MVP
MVP

after from

load

     ...                                                  // your fields

from

     somefile.qvd (qvd)                      // your qvd

where

     Left(production_line, 1)='l'          // or production_line like 'l*' as Jeremiah suggested

     ;

ecolomer
Master II
Master II

Yes,

LOAD * from file.qvd

where left(production_line, 1)='l';

or

where production_line like 'l*';

Saludos,

Enrique

Not applicable
Author

It is not working for some odd reason. Right now I have this,

Load

     field1

     field2

     resource

     field3

from example.qvd (qvd)

where left(resource,1)='l*'

and it is not fetching any lines from this table. It says '0 lines fetched'

maxgro
MVP
MVP

where left(production_line, 1)='l';