Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

DB2 .NET Query Syntax

$
0
0

Hi,
I am trying to use similar to:

where IPROD LIKE '%' + @IPROD +'%'
I am using DB2 and it does not like '+' and @Fieldname (e.g. @IPROD where it is a key in search field)

SQL0402: + use not valid.
It does not work with (@IPROD), thus I use '?' which works fine.

I tried below in combination and does not work either.

SELECT ID, IPROD, DESC, TYPE FROM CARMODEL.MA01 WHERE (IPROD LIKE '%' || ? || '%')

Any Help is appreciated!


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>