Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hoping someone can help...if this is even possible?!?
I have the following table...
number | YCH G | BWM G | BRN G | LWH G | KNI G | LNI G | MAC G | MCI G | VWM G |
10602906-2 | y | n | n | n | n | n | n | n | n |
10605441 | n | y | n | n | n | n | n | n | n |
20118159 | n | n | n | n | n | n | n | y | y |
20743581 | n | y | y | n | n | n | n | n | n |
and what I want to do is create a secondary table as a lookup for my main table above.. i.e when I select number 20118159 I want to be able to select from a list any site code where there is a 'y' in the column... can I create a create a table like this...
number | site_code |
10602906-2 | YCH G |
10605441 | BWM G |
20118159 | MCI G |
20118159 | VWM G |
20743581 | BWM G |
20743581 | BRN G |
so that I can have a list box of sites and my main table will reurn the related numbers?!?
Does that make any sense?
still cant get site codes to pick up 'not entered' never found anything so annoying!!!!
Try this:
if(attribute is null, 'null', attribute)
but treeseco way is better
thanks tresesco so much for your help so far but I still cant get it to work
the table I used first time had null values (which I ignored) I have used a different part of the script to replace nulls with 'not entered' (by using if isnull in load statement) so my main table looks like..
number | YCH G | BWM G | BRN G | LWH G | KNI G | LNI G | MAC G | MCI G | VWM G |
10602906-2 | y | n | n | n | n | n | n | n | n |
10605441 | not entered | not entered | not entered | not entered | not entered | not entered | not entered | not entered | not entered |
20118159 | n | n | n | n | n | n | n | y | y |
20743581 | n | y | y | n | n | n | n | n | n |
I want a secondary table secondary table as a lookup for my main table above.. i.e when I select number 20118159 I want to be able to select from a list any site code where there is a 'y' or 'not entered' in the column... like this...
number | site_code |
10602906-2 | YCH G |
10605441 | YCH G |
10605441 | BWM G |
10605441 | BRN G |
10605441 | LWH G |
10605441 | KNI G |
10605441 | LNI G |
10605441 | MAC G |
10605441 | MCI G |
10605441 | VWM G |
20118159 | MCI G |
20118159 | VWM G |
20743581 | BWM G |
20743581 | BRN G |
can I modify the script (that you suggested before) to do this? sorry for being so dull
CroTables:
Crosstable (site_code, Flag,1)
Load
*
from <>;
NoConcatenate
Final:
Load
*
Resident CroTable Where Flag='y';
Drop table CroTable;