In the interview test one of the questions was asked in which I have doubt is below-:
If a table has a VARCHAR columns, containing values: prod,system,PROD,Test,Prod. Which one of the following queries will find all the records containing 'PROD' irrespective of the case?
a) SELECT * FROM TABLE WHERE COLUMN=IGNORE_CASE('PROD')
b) SELECT * FROM TABLE WHERE COLUMN=LOWER_CASE('prod')
c) SELECT * FROM TABLE WHERE LCASE(COLUMN)='prod'
d.) None of these
My answer was a)
case in-sensitive sql query
-
- Posts: 43
- Joined: Tue Dec 07, 2010 5:32 pm
- Skillset: COBOL,JCL,DB2,VSAM,CA7
- Referer: Google
-
- Posts: 43
- Joined: Tue Dec 07, 2010 5:32 pm
- Skillset: COBOL,JCL,DB2,VSAM,CA7
- Referer: Google
Re: case in-sensitive sql query
Hi,
Any suggestions are welcome.
Any suggestions are welcome.
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: case in-sensitive sql query
With the benefit of the time that has elapsed, what have you discovered by looking in the manuals?
-
- Posts: 43
- Joined: Tue Dec 07, 2010 5:32 pm
- Skillset: COBOL,JCL,DB2,VSAM,CA7
- Referer: Google
Re: case in-sensitive sql query
C is the correct answer
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: case in-sensitive sql query
That's nice and definitive. Can you provide a link to the manual reference that you found, it can help other people looking at the same type of thing in the future?
-
- Posts: 43
- Joined: Tue Dec 07, 2010 5:32 pm
- Skillset: COBOL,JCL,DB2,VSAM,CA7
- Referer: Google
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Output of rexx is coming in UPPER Case only
by arya_starc » Thu Jan 12, 2023 3:41 pm » in CLIST & REXX - 4
- 2378
-
by sergeyken
View the latest post
Fri Jan 13, 2023 1:44 am
-
-
- 7
- 11741
-
by AusZosGuy
View the latest post
Fri Sep 10, 2021 6:40 pm
-
- 0
- 2570
-
by JIMDOOEY
View the latest post
Tue Mar 01, 2022 8:48 am
-
- 1
- 2500
-
by enrico-sorichetti
View the latest post
Fri Apr 02, 2021 6:56 pm