matthew irving

Ranch Hand
+ Follow
since Apr 28, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by matthew irving

How do i retrieve the value of the input and convert it to a variable?
Thats right i need to take both the key and the value from each pair and and put them into two columns. I'm having the most trouble with taking the json input and turning it into a variable i can work with.
I am trying to retrieve both parts of a JSON object through a stored procedure, for example from {bob:ben, 3:sue, James:cat} I want to get each part of the pair separately using sql and put them in a table. So it would be like this


How do i do this?
I almost have it but it won't execute the string.


10 years ago
JSP

you have to add some parenthsis, in the if condition that filters for the AND, its some conditions AND next parameter



I'm sorry I don't fully understand what you mean could you clarify please?
10 years ago
JSP
I think i have it.

10 years ago
JSP
Can you please provide an example?
10 years ago
JSP
Would the statement eliminate the need for a large number of if statements?
10 years ago
JSP
I want any that HAVE matches to match and any null to not be searched against.
10 years ago
JSP
Would this sql work?

SELECT * FROM cases where CaseNumber=? OR MemberNumber=? OR MemberName=? OR Caseworker=? OR Descriptor=? OR Problem=?
10 years ago
JSP
I have six fields. Any of the fields can have a search term in them. I want the code to be able to understand how to handle a query where some of the search terms can be null.
10 years ago
JSP
I think the code below would work but i can't figure out how to get the st.executeQuery() to recognise which case to display.

10 years ago
JSP
Is there anyway to shorten the number of If statements?
10 years ago
JSP
So do i use a new prepared statement for each if statement?
10 years ago
JSP