- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Strange Concatenation
HI All
I'm facing a very strange issue. I'm trying to load the data as
Load trim('TRFS_Code') & '' & trim('supp-code') & '' & trim('com-grp') & '' & trim('sub-group') & '' & trim('p-status') & '' & trim('p-desc') & '' & trim('s-desc') & '' & trim('p-size') & '' & trim('vat-code') & '' & trim('VAT_Percentage') & '' & trim('Average_Weight') & '' & trim('Ingredients') & '' & trim('Preparation') & '' & trim('Details') & '' & trim('p-pack') & '' & trim('pallet') & '' & trim('layer') & '' & trim('active_date') & '' & trim('active_date_30') & '' & trim('date-coded') & '' & trim('KG') & '' & trim('supp-pcode') & '' & trim('Volumetric') & '' & trim('Length') & '' & trim('Width') & '' & trim('Depth') & '' & trim('nom-wt') & '' & trim('consumer-desc') & '' & trim('sg-desc') & '' & trim('com-desc') & '' & trim('ean-code') & '' & trim('tuc') & '' & trim('pp1-sell') & '' & trim('Cost') & '' & trim('Stir_Start') & '' & trim('Stir_End') & '' & trim('supp-name') & '' & trim('Brand') & '' & trim('CA Manufacturer') & '' & trim('Brand_Description') & '' & trim('Amazon_Browse_Node_ID') & '' & trim('Amazon Browse Node 2 ID') & '' & trim('AMZ_Product_Type') & '' & trim('ASIN') & '' & trim('Amazon Category') & '' & trim('Amazon Product Type') & '' & trim('Flavour') & '' & trim('Cuisine') & '' & trim('eBay_Food_Cat_2') & '' & trim('eBay_Cat_3') & '' & trim('eBay_Cat_4') & '' & trim('eBay_Cat_5') & '' & trim('eBay_Store_Cat') & '' & trim('eBay_Store_ Cat_No') & '' & trim('CourierProdType') & '' & trim('eBay_Alcohol_Policy') & '' & trim('Feature1') & '' & trim('Feature2') & '' & trim('Feature3') & '' & trim('Feature4') & '' & trim('Feature5') & '' & trim('Colour') & '' & trim('Filter1') & '' & trim('Filter2') & '' & trim('Filter3') & '' & trim('Filter4') & '' & trim('Filter5') & '' & trim('Image1') & '' & trim('Image2') & '' & trim('Image3') & '' & trim('Image4') & '' & trim('Image5') & '' & trim('Image6') & '' & trim('M2_CAT3') & '' & trim('M2_CAT4') & '' & trim('Master_Cat') & '' & trim('Sector_Top20') & '' & trim('Sale_Price') & '' & trim('Sale_Start') & '' & trim('Sale_End') & '' & trim('Country_Origin') & '' & trim('FALBC_Name') & '' & trim('FALBC_Description') & '' & trim('FALBC_Category') & '' & trim('FALBC_Category_2') & '' & trim('FALBC_Keywords') & '' & trim('FALBC_Page_Title') & '' & trim('FALBC_Meta_Keywords') & '' & trim('FALBC_Meta_Description') & '' & trim('FALBC_Sort_Order') & '' & trim('GoogleShoppingCatNumber') & '' & trim('GoogleShoppingCatTree') & '' & trim('GoogleCampaign') & '' & trim('GoogleCampaignDailyBudget') & '' & trim('GoogleLanguages') & '' & trim('GoogleLocation') & '' & trim('GoogleAdGroup') & '' & trim('GoogleKeyword') & '' & trim('GoogleType') & '' & trim('GoogleBidAdjustment') & '' & trim('GoogleDescriptionLine1') & '' & trim('GoogleDevicePreference') & '' & trim('GoogleAdSchedule') & '' & trim('GoogleAvailability') & '' & trim('GooglePrice') & '' & trim('GoogleBrand') & '' & trim('GoogleGTIN') & '' & trim('GoogleMPN') & '' & trim('GoogleMultipack') & '' & trim('GoogleShipping') & '' & trim('Video1') & '' & trim('Video2') & '' & trim('Liquid') & '' & trim('M2_URL_KEY') & '' & trim('Prod_Categories') & '' & trim('numberofitemspacksize') & '' & trim('unitcountl') & '' & trim('unitcounttype') & '' & trim('typeofwine') & '' & trim('countryregionofdeclaration') & '' & trim('alcoholcontentnumberonly') & '' & trim('alcoholcontentunitofmeasure') & '' & trim('EBAYNumberofItems') & '' & trim('OnBuyUKCatNo') & '' & trim('OnBuyUKCat') & '' & trim('VidaUKCatNo') & '' & trim('VidaUKCat') & '' & trim('numberinpack') & '' & trim('ebay_allergens') & '' & trim('eBay_Prod_Grp') & '' & trim('ebaycategoryid') & '' & trim('ShopComDept1') & '' & trim('ShopComDept2') & '' & trim('ShopComDept3') & '' & trim('LiquidVolume') & '' & trim('LiquidVolumeUnitofMeasurement') & '' & trim('eBayType') & '' & trim('FR_TR_Title') & '' & trim('FR_TR_Description') & '' & trim('FR_TR_Brand_Description') & '' & trim('FR_TR_Feature1') & '' & trim('FR_TR_Feature2') & '' & trim('FR_TR_Feature3') & '' & trim('FR_TR_Feature4') & '' & trim('FR_TR_Feature5') & '' & trim('FR_TR_Flavour') & '' & trim('FR_TR_Colour') & '' & trim('FR_TR_Cuisine') & '' & trim('FR_AMZ_Prod_Title') & '' & trim('FR_AMZ_Prod_Desc') & '' & trim('AMZ english browsenode') & '' & trim('FR_AMZ_Browse_Node_ID') & '' & trim('FR_AMZ_Product_Type') & '' & trim('FR_AMZ_ASIN') & '' & trim('FR_AMZ_Category') & '' & trim('FR_AMZ_Feature_1') & '' & trim('FR_AMZ_Feature_2') & '' & trim('FR_AMZ_Feature_3') & '' & trim('FR_AMZ_Feature_4') & '' & trim('FR_AMZ_Feature_5') & '' & trim('FR_eBay_Prod_Grp') & '' & trim('FR_ebaycategoryid') & '' & trim('FR_eBayType') & '' & trim('FR_ebay_allergens') & '' & trim('FR_CDiscount_ID') & '' & trim('FR_AlcPolicy') & '' & trim('FR_TR_Ingredients1') & '' & trim('FR_TR_Preparation') & '' & trim('FR_TR_Ingredients') & '' & trim('ES_TR_Title') & '' & trim('ES_TR_Description') & '' & trim('ES_TR_Brand_Description') & '' & trim('ES_TR_Feature1') & '' & trim('ES_TR_Feature2') & '' & trim('ES_TR_Feature3') & '' & trim('ES_TR_Feature4') & '' & trim('ES_TR_Feature5') & '' & trim('ES_TR_Flavour') & '' & trim('ES_TR_Colour') & '' & trim('ES_TR_Cuisine') & '' & trim('ES_TR_Ingredients') & '' & trim('ES_TR_Storage') & '' & trim('ES_TR_Alc_Policy') & '' & trim('ES_AMZ_Prod_Title') & '' & trim('ES_AMZ_Prod_Desc') & '' & trim('ES_AMZ_Browse_Node_ID') & '' & trim('ES_AMZ_Product_Type') & '' & trim('ES_AMZ_ASIN') & '' & trim('ES_AMZ_Category') & '' & trim('ES_AMZ_Feature_1') & '' & trim('ES_AMZ_Feature_2') & '' & trim('ES_AMZ_Feature_3') & '' & trim('ES_AMZ_Feature_4') & '' & trim('ES_AMZ_Feature_5') & '' & trim('ES_eBay_Prod_Grp') & '' & trim('ES_ebaycategoryid') & '' & trim('ES_eBayType') & '' & trim('ES_ebay_allergens') & '' & trim('PL_TR_Title') & '' & trim('PL_TR_Description') & '' & trim('PL_TR_Brand_Description') & '' & trim('PL_TR_Feature1') & '' & trim('PL_TR_Feature2') & '' & trim('PL_TR_Feature3') & '' & trim('PL_TR_Feature4') & '' & trim('PL_TR_Feature5') & '' & trim('PL_TR_Flavour') & '' & trim('PL_TR_Colour') & '' & trim('PL_TR_Cuisine') & '' & trim('PL_eBay_Prod_Grp') & '' & trim('PL_ebaycategoryid') & '' & trim('PL_eBayType') & '' & trim('PL_ebay_allergens') & '' & trim('PL_AlcPolicy') & '' & trim('PL_TR_Ingredients') & '' & trim('PL_TR_Preparation') & '' & trim('DE_TR_Title') & '' & trim('DE_TR_Description') & '' & trim('DE_TR_Brand_Description') & '' & trim('DE_TR_Feature1') & '' & trim('DE_TR_Feature2') & '' & trim('DE_TR_Feature3') & '' & trim('DE_TR_Feature4') & '' & trim('DE_TR_Feature5') & '' & trim('DE_TR_Flavour') & '' & trim('DE_TR_Colour') & '' & trim('DE_TR_Cuisine') & '' & trim('DE_TR_Ingredients') & '' & trim('DE_TR_Storage') & '' & trim('DE_TR_Alc_Policy') & '' & trim('DE_AMZ_Prod_Title') & '' & trim('DE_AMZ_Prod_Desc') & '' & trim('DE_AMZ_Browse_Node_ID') & '' & trim('DE_AMZ_Product_Type') & '' & trim('DE_AMZ_ASIN') & '' & trim('DE_AMZ_Category') & '' & trim('DE_AMZ_Feature_1') & '' & trim('DE_AMZ_Feature_2') & '' & trim('DE_AMZ_Feature_3') & '' & trim('DE_AMZ_Feature_4') & '' & trim('DE_AMZ_Feature_5') & '' & trim('DE_eBay_Prod_Grp') & '' & trim('DE_ebaycategoryid') & '' & trim('DE_eBayType') & '' & trim('DE_ebay_allergens') & '' & trim('directions_for_use') & '' & trim('storage_instructions') & '' & trim('halal_approved') & '' & trim('kosher_approved') & '' & trim('brc_certified') & '' & trim('red_tractor') & '' & trim('fair_trade') & '' & trim('marine_stewardship') & '' & trim('organic') & '' & trim('acc_salsa') & '' & trim('acc_british_lion') & '' & trim('acc_freedom_food') & '' & trim('acc_leaf') & '' & trim('acc_rainforest') & '' & trim('acc_food_for_life') & '' & trim('acc_quality_meat_scotland') & '' & trim('acc_fa_welsh_livestock') & '' & trim('acc_ni_beef_lamb_fqas') & '' & trim('acc_eblex') & '' & trim('acc_rspo') & '' & trim('acc_school_approved') & '' & trim('acc_ifs_food_standard') & '' & trim('acc_iso_14001') & '' & trim('acc_fssc_22000') & '' & trim('other_accreditation') & '' & trim('cal_100_kj') & '' & trim('cal_100_kcal') & '' & trim('fat_100') & '' & trim('sat_fat_100') & '' & trim('mono_fat_100') & '' & trim('poly_fat_100') & '' & trim('trans_fats_100') & '' & trim('carb_100') & '' & trim('sugar_carb_100') & '' & trim('polyols_carb_100') & '' & trim('starch_carb_100') & '' & trim('fibre_100') & '' & trim('protein_100') & '' & trim('salt_100') & '' & trim('sodium_100') & '' & trim('vitamin_a_100g') & '' & trim('vitamin_c_100g') & '' & trim('folate_100g') & '' & trim('calcium_100g') & '' & trim('iron_100g') & '' & trim('zinc_100g') & '' & trim('chol_100') & '' & trim('non_milk_extrinsic_sugars_100g') & '' & trim('alcohol_strength_per_vol') & '' & trim('fat_percentage_dry') & '' & trim('M2_ACC') & '' & trim('Gluten') & '' & trim('Egg') & '' & trim('Crustaceans') & '' & trim('Celery') & '' & trim('Soyabeans') & '' & trim('Sesame') & '' & trim('Sulphur_Dioxide') & '' & trim('Lupin') & '' & trim('Milk') & '' & trim('Peanuts') & '' & trim('Treenuts') & '' & trim('Mustard') & '' & trim('Fish') & '' & trim('Molluscs') & '' & trim('M2_Allergens') & '' & trim('M2pstatus')
FROM
[lib://Data Extracts/Products.qvd]
(qvd);
But this is not working and it says Unexpected Token as an error. Please help.
Regards
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@prat1507 remove single quotes used inside trim function if it is column name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope, it's a simple text. Ideally it should work for texts but this is not working!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@prat1507 you already using single quotes to combine texts then no need to use trim function here, you can simple use 'text1' & ' '& 'text2' &' '&....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is still not working 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@prat1507 what is error? Make sure that you are not missing single quotes for any texts. Also make sure that you are not missing &' '& part between texts. Further you can simplify by adding space in texts itself within single quotes like below
'text1 ' & 'text2 '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, i ran yourscript just changing the QVD and it works perfectly.
I'm working with september release, could be a version issue?
Or,
try putting this in red between, for having a valid field name and not all of the text as name:
.....
trim('M2pstatus') as FieldName
FROM [lib://.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason I'd put this space is coz I'm planning to add a separator, trim is used coz there would be Fields instead of text. To simplify the problem I've removed the separator and added the fields in quotes so that it takes text.
Did you try running the code I'd put in above, probably you might know.
Regards
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well QFabian, I want to concatenate all my Fields with a separator and add it to a variable, so that I can use that variable on a table.
To simplify the problem, I tried this first but it wasn't working for some reasons.
Regards
Pratyush