xy15973
asked on
Unix Script Problem
This script retrun values into a txt file. I need to insert a delimter "^", Currently the delimiter is only added to the headings. How can I add it to the end of the actual data.
e.g
Val1 val2 val3
ss^ dd^ mm^
select substring(Task_Type,1,10)" Type^",
substring(Job_Name,1,10)"J obname^",
substring(MemName,1,30)"Me mber^",
substring(W_Day_Str,1,15)" Week Days^" ,
substring(Days_Cal,1,10)"C alendar^",
substring(Group_Name,1,30) "Group^",
substring(Description,1,60 )"Descript ion^",
substring(Node_Id,1,12)"Da ta Center^" from def_job
Thanks
e.g
Val1 val2 val3
ss^ dd^ mm^
select substring(Task_Type,1,10)"
substring(Job_Name,1,10)"J
substring(MemName,1,30)"Me
substring(W_Day_Str,1,15)"
substring(Days_Cal,1,10)"C
substring(Group_Name,1,30)
substring(Description,1,60
substring(Node_Id,1,12)"Da
Thanks
ASKER
Will this work?
select substring(Task_Type,1,10)|
substring(Job_Name,1,10)||
substring(MemName,1,30)||"
substring(W_Day_Str,1,15)|
substring(Days_Cal,1,10)||
substring(Group_Name,1,30)
substring(Description,1,60
substring(Node_Id,1,12)||"
go
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.g:
SELECT SUBSTR(NUMDATA,4,4)||'^ '||UPLINK||'^ '||DOWNLINK||'^ '||TOTAL
FROM TEMP_TABLE
will give you:
9480^ 0^ 0^ 0
9478^ 1170^ 58^ 1228
9470^ 0^ 0^ 0
9422^ 0^ 0^ 0
9473^ 0^ 0^ 0
9445^ 1281^ 366^ 1647
9472^ 0^ 0^ 0
9480^ 0^ 0^ 0
9479^ 0^ 0^ 0
pmathinos.