Search Results

Search: Posts Made By: anduzzi
4,225
Posted By anduzzi
getting there....
Yoda - Don't bother about converting the DML in this script(or adding the header in output), just normalize the data....i.e break into number of times the total questions in the input(this case its...
4,225
Posted By anduzzi
Great start....
Yoda - Actually let me be more clear on this...since its tricky(atleast for me)!

Required Target DML:

record
string(',') A1;
string(',') A2;
date("YYYY-MM-DD")(',') A3;
string(',') A4;...
4,225
Posted By anduzzi
Champ!!!!
Works like a Champ, you rock Yoda!!!!....A Million thanks!

Thanks Corona688 for giving a kickstart to this problem....

~Anduzzi :):):b:

---------- Post updated 06-13-13 at 02:50 PM...
4,225
Posted By anduzzi
Sorry...may be I wasn't completely clear on that...
Sorry...may be I wasn't completely clear on that part....there might be some 20 decimals following...and I need only the last decimal to tag with '\n' to represent end of the record format....so my...
4,225
Posted By anduzzi
...I just need to apply '\n' ONLY to the last...
...I just need to apply '\n' ONLY to the last decimal col...this change would apply for all the cols....please check...


record
----
----
decimal('\n') lastCol;
end


Also one more thing I...
4,225
Posted By anduzzi
Works perfect.....
Yoda - Thanks a ton for your approach as well...works just perfect solving the escaping quotes....but my #2 requirement to assign a new line '\n' to the last decimal still needs a minor re-tweak.......
4,225
Posted By anduzzi
This piece of code 'almost' works great for my...
This piece of code 'almost' works great for my purpose....thanks!

Almost coz, couple of things I need to make it fit the puzzle...

1.Escape the quotes in (',') in the decimal part...output...
4,225
Posted By anduzzi
Col types...
That's the least complex part...the first few cols are fixed just as I mentioned and rest of the additions are mostly decimal...

~Anduzzi
4,225
Posted By anduzzi
Generate a DML dynamically based off of header record
I have the following scenario where I need to use a header record from a file and generate a DML based off of it...

E.g.: The header can change periodically with an additional column in between or...
1,383
Posted By anduzzi
Thanks again Chubler. Infact I had something...
Thanks again Chubler.
Infact I had something like this in the actual ksh file :
select 'select internal_order_id, doc_type_id from '"${SAP_RM_ADMIN_SCHEMA}"'.INTERNAL_ORDER'
I tried my luck with...
1,383
Posted By anduzzi
Thanks for the inputs, but both options didn't ...
Thanks for the inputs, but both options didn't get what I want !
Do you know whats missing in here ?.

To re-iterate, I want the occurence of "internal_order' and SAP_RM_ADMIN_SCHEMA and this is...
1,383
Posted By anduzzi
nawk variables
Hi - The following nawk is not working and trying to understand why!
nawk -v t="internal_order" '/SAP_RM_ADMIN_SCHEMA/ && ("[.]" toupper(t)) || /SAP_RM_ADMIN_SCHEMA/ && ("[.]" tolower(t))'...
3,371
Posted By anduzzi
grep '${ETL_VW_SCHEMA}.*\.PROJ$' *.ksh This...
grep '${ETL_VW_SCHEMA}.*\.PROJ$' *.ksh
This works, thank you !
3,371
Posted By anduzzi
This doesn't work either, any workable solutions...
This doesn't work either, any workable solutions please ?. I would appreciate !

grep 'FROM \'"${ETL_VW_SCHEMA}"\'.PROJ' infile
3,371
Posted By anduzzi
Scrutinizer - If it was that easy with grep, why...
Scrutinizer - If it was that easy with grep, why would I waste your time.
the problem really is just not the $ETL_VW_SCHEMA, the way its generated with in the quotes and text coming after that(table...
3,371
Posted By anduzzi
I want the grep to function on the...
I want the grep to function on the variables($ETL_VW_SCHEMA) and not using the baseword 'FROM' and the reason I say this is I have lot of SQLs in my .ksh file and I would choose the path of finding...
3,371
Posted By anduzzi
grep and variables ?
I would like to know if grep can extract the following requirement.
I have the folllowing piece of SQL in a file and need to grep the FROM part.
mp db-ter-fast-export...
3,634
Posted By anduzzi
Just to mention... I know we can just put in a...
Just to mention...
I know we can just put in a seperate OR in the awk to check for lower case and resolve the issue:

nawk -v t="${tables[$j]}" '/ETL_VW_SCHEMA/ && $0 ~ ("[.]" toupper(t) "$") ||...
3,634
Posted By anduzzi
Radoulov, nawk -v t="${tables[$j]}"...
Radoulov,
nawk -v t="${tables[$j]}" '/ETL_VW_SCHEMA/ && $0 ~ ("[.]" toupper(t) "$") / ...

This will not work in my case as my table list is always in upper case and 90% of the pattern occurences...
3,634
Posted By anduzzi
Hi Johnson, I am using an array({tables[$j]})...
Hi Johnson,
I am using an array({tables[$j]}) to store all the table names, which means I dont have the luxury of using the exact patterns like [Ee][Tt][Ll].
There are around 200 tables in the...
3,634
Posted By anduzzi
Before we close this thread: k=`nawk -v...
Before we close this thread:

k=`nawk -v t="${tables[$j]}" '/ETL_VW_SCHEMA/ && $0 ~ ("[.]" t "$") / || /EDW_DB_SCHEMA/ && $0 ~ ("[.]" t "$")' ${graph[$i]}`

Few of my table...
3,634
Posted By anduzzi
Oh sorry....my bad ! nawk works perfect in this...
Oh sorry....my bad !
nawk works perfect in this case.

Thank you so much for your time..
3,634
Posted By anduzzi
Hi Johnson/Vgersh, Thank you very much for the...
Hi Johnson/Vgersh,
Thank you very much for the suggestions and the pointers..
But my shell errors out with the awk syntax....here are some quick details on my OS and the actual error itself...I...
3,634
Posted By anduzzi
Hi vgersh, "${tables[$j]}" and "${graph[$i]}"...
Hi vgersh,
"${tables[$j]}" and "${graph[$i]}" are 2 arrays holding 2 distinct sets of elements like table list and graph list.
A simplified code snippet giving a better idea...

#! /bin/ksh
...
3,634
Posted By anduzzi
Does awk ever resolve params ?..
Hi,
Does awk ever resolve params in the search pattern?..
The following awk doesnt know how to resolve ${tables[$j]}$ inside a loop.
k=`awk '/${tables[$j]}$/ ${graph[$i]}`

The search pattern...
Showing results 1 to 25 of 65

 
All times are GMT -4. The time now is 10:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy