Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
SELECT entertainer_id,
entertainer_groupname
FROM casestudy_entertainer
INNER JOIN casestudy_availability ON casestudy_entertainer.entertainer_id = casestudy_availability.availability_entertainerid
INNER JOIN casestudy_calendardates ON casestudy_availability.availibility_calendardateid = casestudy_calendardates.calendar_id
WHERE entertainer_type = '&Entertainer_TYPE'
AND casestudy_calendardates.calendar_date = '&Event_date'

What I have tried:

I tried still gets same problem
Posted
Updated 3-Jun-21 3:07am
Comments
Patrice T 3-Jun-21 7:14am    
Where is the '%s' in this code ?

There is no example of the string "%s" in that code, which means one of two things:
1) It's part of your code that queries the DB - since "%s" is the C / C++ printf / sprintf format code for a string, it's possible that it's being reported on code you don't show and assume is that query. Use the debugger to find out exactly what is going on.
2) It's part of your data, and the DB is trying to convert the datatype automatically to match a string to a numeric field but finding something odd in the string it's trying to work with. The debugger may help you here, but a good check of your actual data is probably more likely to help.

Either way, there is nothing we can do from here!
 
Share this answer
 
I take it you're running this for example in SQL*Plus. & indicates a substitution variable so you need to define a value for it prior to using.

Try using something like
define Entertainer_TYPE = 'Something goes in here'
define Event_date = 'And this contains something else'


Based on the names of the variables it looks like you're handling dates using varchar. If that's true, you should change dates to use date type
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900