Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I have 3 fields as below
Raw_Data:
Load
formTitle,
litTitle,
Material_Name
FROM
Transactions.QVD (qvd);
I wish to create an additional field out of those 3 fields called Online_Activity so i can select between formTitle, litTitle and Material_Name....but i want those fields to be named 'Formulations', 'Literature' and 'Samples' as values in the Online_Activity field.
I have tried for hours and hours to get this right but i keep getting synthetic joins when i try and create a seperate table!
I'm sure this will be very simple for someone with more experience!
Thanks in advance
Danny
Danny,
Let me know if this concept script is right:
RawData:
LOAD RowNo() AS Dummy,
Rand() AS formTitle,
Rand() AS litTitle,
Rand() AS Material_Name
AUTOGENERATE 10;
Parsed:
CROSSTABLE (Online_Acitivity, Values)
LOAD Dummy,
formTitle AS "Formulation Downloads",
litTitle AS "Literature Requests",
Material_Name AS "Sample Requests"
RESIDENT RawData;
DROP FIELD Dummy;
DROP TABLE RawData;
Data is obviously bogus.
Miguel
Hi Danny,
not exactly sure what you are after! Do you mean you something like:
Raw_Data:
Load
formTitle,
litTitle,
Material_Name,
fromTitle AS Formulations
litTitle AS Literature,
Material_Name AS 'Samples'
FROM
Transactions.QVD (qvd);
Andy
Andrew's idea would do the 'renaming' of the 3 fields.
In addition, you could create a search object and include all 3 renamed fields in the parameters. That way, a user could search for a value within all 3 fields, and make a selection that way.
If you're never going to use the old fieldnames, you can DROP FIELD .... to neaten things up.
Regards
Hi Andrew
What i want to create is a brand new field name with the existing fields as values, only with a new name:
formTitle becomes Formulation Downloads
litTitle becomes Literature Requests
Material_name becomes Sample Requests
I hope this makes it clearer.
Thanks Andrew
Danny
Danny,
Let me know if this concept script is right:
RawData:
LOAD RowNo() AS Dummy,
Rand() AS formTitle,
Rand() AS litTitle,
Rand() AS Material_Name
AUTOGENERATE 10;
Parsed:
CROSSTABLE (Online_Acitivity, Values)
LOAD Dummy,
formTitle AS "Formulation Downloads",
litTitle AS "Literature Requests",
Material_Name AS "Sample Requests"
RESIDENT RawData;
DROP FIELD Dummy;
DROP TABLE RawData;
Data is obviously bogus.
Miguel
Danny
If you follow my suggestion of a search object, you will get just that.
It looks a little different but when you search the results will be listed in the 3 categories you want.
Regards
Miguel this is exactly what i was looking for! Thank you.
For some reason the forum will not let me mark this as the correct answer. As soon as i can do so i will.
Thanks again!
Danny