Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Sochaux (France)
    Posts
    55

    Unanswered: select... like many values

    Hi,
    i want to write a query like this :

    select *
    from my_table
    where my_table.a like (select a1 from my_table2)

    where my subquerry returns many values.
    But it's not possible to have a like with many values.
    Anyone can help me to wrote this differently.

    Thx

  2. #2
    Join Date
    Jan 2004
    Location
    Issy les Moulineaux, France
    Posts
    24
    Hi,

    try:

    select *
    from my_table, my_table2
    where my_table.a like my_table2.a1;

  3. #3
    Join Date
    Jan 2004
    Location
    Sochaux (France)
    Posts
    55
    Originally posted by lyonnais
    Hi,

    try:

    select *
    from my_table, my_table2
    where my_table.a like my_table2.a1;
    ???
    No need to specify the column ???
    And how can i specify a where clause in this case ?

    Here is my real query :
    Code:
    select distinct dqaqt22.INDICATEUR_TYPE_DEMANDE, dqaqt22.NO_DOSSIER_INCIDENT, dqaqt22.INDICATEUR_REVELATEUR_PANNE
    from dqaqt22
    where (dqaqt22.CODE_CAUSE not in (select valeur
    					from dqaqtba
    					where qualification_associee = 'ASSISTANCE'
    					and PARAMETRE = 'CODE_CAUSE')
    and dqaqt22.CODE_IMPUTATION_GARANTIE not in (select valeur
    					from dqaqtba
    					where qualification_associee = 'ASSISTANCE'
    					and PARAMETRE = 'CODE_IMPUTATION')
    and dqaqt22.CODE_DEFAUT_GARANTIE not in (select valeur
    					from dqaqtba
    					where qualification_associee = 'ASSISTANCE'
    					and PARAMETRE = 'CODE_DEFAUT'))
    and instead of the "not in" clause i'd like to have "not like"
    Last edited by venderic; 03-12-04 at 08:10.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •