View previous topic :: View next topic
|
Author |
Message |
ashwinreddy
Active User
Joined: 16 Sep 2004 Posts: 106 Location: Hyderabad
|
|
|
|
Hi
i have a problem with a query
my purpose is to
when a user enters both code no and group no the control should pass to another screen
let me clear u about my query their may be subgroups in a code no so i have to validate whether the correct subgroup has been entered to code no,
i need help regarding this query, i had written a query but it seems it doesn't work properly
SELECT CD
FROM table-name
WHERE cd = :WK-CD
and sub-cd like 'wk-sub-cd%' ;
please come up with a query
you can amil to ***Removed***
Thanks & Regards
Ashwin |
|
Back to top |
|
|
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
Hi Ashwin,
Quote: |
Just clisk on Quick Register and fill the profile details to become a member. No conformation is required. The membership is free to all. |
Coming to your query really to say its not clear. But as I understood you have a code lets take person MBNISS split into 3 parts. You want to validate each part before executing the query. If my thoughts are matching with your query please validate the parts of code seperately using COBOL code then only execute in query. Because DB2 resources are costly and if your code contains junk data then your program will get abend.
Eg:
IF WS-MBNIS1 IS NUMERIC AND WS-MBNIS2 IS NUMERIC AND WS-MBNIS3 IS NUMERIC
EXEC-SQL
-- query --
END-EXEC
ELSE
DISPLAY "ERROR IN MBNISS"
END-IF.
If your que is not same as above please send us your code so that we will understand it properly.
Thanks,
Reddy. |
|
Back to top |
|
|
ashwinreddy
Active User
Joined: 16 Sep 2004 Posts: 106 Location: Hyderabad
|
|
|
|
Hi
Thanks for the suggestion but my client needs in a query.
Let me explain u in detail
i have a 9digit unique numer which is assigned to stores and under that code number we have sub groups as like gws233,f3eesd1
so when a user enters the cobe number and sub group.i should check whether a subgroup entered is contained in code numer.if their is no valid subgroup in cde number i have to display a error message.
For this i have to write a query.
i feel this is clear to you all and i am expecting a quick reply.
Thanks
Ashwin |
|
Back to top |
|
|
rsm_deepak
New User
Joined: 06 Apr 2005 Posts: 30 Location: visakhapatnam
|
|
|
|
Please give the details of ur db tables in brief. |
|
Back to top |
|
|
|