Mani Pazhana
asked on
Best way to design my sql query
Hello Experts,
This my SQL string:
--------------------------
theSqlString = "SELECT ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " NameAlias.NmAlsFirstName, NameAlias.NmAlsMidName, sots_paroleAssign.ParoleeA
theSqlString = theSqlString & " PA_USER.USER_NBR, PA_USER.COMPANYNAME_VC"
theSqlString = theSqlString & " FROM PBPPDSF.DSF22_SOTS.dbo.PA_
theSqlString = theSqlString & " sots_paroleAssign ON PA_USER.USER_NBR = sots_paroleAssign.provider
theSqlString = theSqlString & " ReleaseInfo ReleaseInfo INNER JOIN"
theSqlString = theSqlString & " Offender Offender ON ReleaseInfo.ParoleNumber = Offender.ParoleNumber INNER JOIN"
theSqlString = theSqlString & " NameAlias NameAlias ON ReleaseInfo.ParoleNumber = NameAlias.ParoleNumber ON "
theSqlString = theSqlString & " sots_paroleAssign.paroleNu
theSqlString = theSqlString & " WHERE (ReleaseInfo.RelPBPPOffens
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
theSqlString = theSqlString & " ReleaseInfo.RelPBPPOffense
I want to remove the hard coded values in the above query(700, 702,705,715 etc...) and store in DB.
i need help to modify the above query with new design .
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER