Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to import data like below format ,first column should be displayed and remaining should be below one ,no need to rename in the script level ,how to import like ?
EXCEL :
LOAD [ ID] as MMM_ID,
'Bedford' as PLANT,
@1,
@6,
@7,
@8,
@9,
@10,
@4,
@5
FROM
(txt, codepage is 1252, no labels, delimiter is ',', msq)
where [ ID] <>' ';
What exactly you want? can you be more specific please?
in this script all fields come from Excel ,Bedford is not in excel ,we are added that field in script ,in the excel my first column name is ID ,I want to display id as id and remaining columns name not to be displayed
,we display like below one .
LOAD
[ ID] as MM_ID,
'Bedford' as PLANT,
@1,
@6,
@7,
@8,
@9,
@10,
@4,
@5
FROM
(txt, codepage is 1252, no labels, delimiter is ',', msq)
where [ ID] <>' ';
Not sure if I understand you correctly.
1.The script looks like first column (ID) is available and is just renamed using "as".
2. Second column (Bedford) is hard coded.
3. Rest is imported from a text file with "None" as labels.
If you want to do that , then write down the hard coded or already available fields as you want, then in script editor click on "Table files", browse to the location of your text file, select and open it and in the "labels" drop down select "None".
Click on finish. You will get a script like this.
Hope this helps!
Hi Palla,
@1,
@6,
@7,
@8,
@9,
@10,
@4,
@5
is plant name?
If you want to remove these then just use below scipt,
LOAD
[ ID] As MM_ID,
Bedford As PLANT
FROM
(txt, codepage is 1252, no labels, delimiter is ',', msq)
where [ ID] <>' ';
Go to your script and add below code after SET MonthNames= .....
SET HidePrefix='@';
IN the 3 point we have labels but no need to display those one.
Yes, so select "None" in the labels drop down whiel importing the file.
but I want to display ID right ?
Yes, if ID is already available from your script. You can add it directly giving it whatever label you want.