troubleshooting Question

parenthesis issue in SQL code

Avatar of jecommera
jecommeraFlag for United Kingdom of Great Britain and Northern Ireland asked on
DatabasesOracle DatabaseSQL
1 Comment1 Solution451 ViewsLast Modified:
Hi,

select rownum myrn, r, item, product_name, gbp_list_prices, CLASSIFICATIONCATEGORY,  image_original_1, current_free_stock from ( SELECT a.r,          a.item,          b.PRODUCT_NAME, b.CLASSIFICATIONCATEGORY,         b.GBP_LIST_PRICES,          b.IMAGE_ORIGINAL_1, c.CURRENT_FREE_STOCK from (select dense_rank() over(order by cnt desc) r               ,item         from (select count(*) cnt                     ,item               from $A$              group by item) ) a  join $B$ b  on lower(a.item) = lower(b.sku)   JOIN $C$ c  ON LOWER(a.item) = LOWER(c.sku) where c.CURRENT_FREE_STOCK > 10 and b.CLASSIFICATIONCATEGORY = 'Men's clothing' order by r )

The above breaks due to the ' in Men's

I tried using " but does not work... any suggestions?

thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros