Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to exclude certain values in a table.
For eg , In the Category table below , I want to excluded PRICE , LOA & REPORT GROUP . How do I do the scripting ?
Category |
TV & VIDEO |
TORCHES |
AUDIO OBSOLETE |
LOA |
APPLIANCES |
BATTERIES |
BRACKETS |
CABLES |
CABLE MANAGEMENT |
CCTV |
CLEANING KITS |
CABLE SOLUTIONS OBSOLETE |
COMPUTER NETWORKING |
DISPLAY STANDS |
ELLIES OBSOLETE |
ELECTRICAL |
ENERGY MONITORING |
ELECTRICAL OBSOLETE |
GENERATORS |
PRICE |
HDMI |
HEADPHONES |
REPORT GROUP |
HOME SECURITY |
INDUSTRIAL AUDIO |
INVERTERS |
LIGHTING |
MULTIMEDIA |
NETWORKING OBSOLETE |
OUTDOOR OBSOLETE |
PACKAGING |
PORTABLE DEVICES |
RAW MATERIALS ENGINEERING |
REMOTE WORLD |
SANWARE |
SATELLITE |
SHELVING |
SIGNAL DISTRIBUTION |
SATTELITE OBSOLETE |
SOLAR |
TELEPHONE |
WIND POWER |
Nayan,
If you want to do this on the Script, you could use the inner join:
//Example
// To keep only Category
// TV & VIDEO
// TORCHES
// Use
inner Join ( FullTab )
SelectedValues:
LOAD * INLINE [
Category
TV & VIDEO
TORCHES
]
Hope I Could Help
Hi
Try like this
Load If(not wildmatch(Category, 'PRICE' , 'LOA','REPORT GROUP'), Category) as Category from tablename;
Hope that helps
thanks. Will try and let you know.
It's just the same as Mayil suggested but in the case you want to load more fields than Category from the same table, you should move that condition to the WHERE clause:
LOAD
Category,
Field2,
Field3
FROM TableName
WHERE NOT MATCH (Category, 'PRICE' , 'LOA','REPORT GROUP')
;
Hi,
PFA
Hi,
You can do that like this:
LOAD
Category
FROM
XXX
Where
Category<>'PRICE'
AND
Category<>'LOA'
AND
Category<>'REPORT GROUP'
;
Hi All
Thanks for all the responses. The actual model i have a a bit more complicated. I'll try the formulae given and give feedback.
kind regards
Nayan
Hi
The formula dont seem to work. What I have done is created an extract of my database in excel.
Below are 5 items with main category and sub category (I've also attached an excel file)
Also attached is a list of main Categories and Sub-Categories.
In the table below i dont want to lines if the Main Category Code = PRICE, REPORTGRP or LOA . How do i do the scripting. For each item there should be only one line.
Just to let you know, on our database for Main Category Code equal to:
Your help would be appreciated.
kind regards
Nayan
Hi
The formula dont seem to work. What i have done is create an extract of my database in excel.
Below are 5 items with main category and sub category (I've also attached an excel file)
Also attached is a list of main Categories and Sub-Categories.
In the table below i dont want to lines if the Main Category Code = PRICE, REPORTGRP or LOA . For each item there should be only one line.
Just to let you know, on our database for Main Category Code equal to:
Your help would be appreciated.
kind regards
Nayan