Need a Help on build script

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Need a Help on build script

Post by dr.murthy »

Hi all,

i have an requirement like to bulid a one script for validating fileds in all tablesby with below syntax..

----<FILELD_NAME>
INSERT INTO VALIDATION
SELECT CASE WHEN (select count(*) from <TABLE_NAME> where <FILELD_NAME>is not null and
<FILELD_NAME>>' ') > 0 THEN 'PASS' ELSE 'FAIL' END"RESULT",0,GETDATE() GO


my thing is i have an 87 tables in my datamart and more than 7000 fileds and i have a sheet which contains tablenames and field names.
is there any possibility to by doing automation for bulld a script

Thanks in Advance...
D.N .MURTHY
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Your syntax appears to denote SQL Server.

You can use something like @sp_columns to identify list of columns and iterate through it.
Post Reply