Results 1 to 3 of 3

Thread: MS SQL equivilent for Oracle DUAL

  1. #1
    Jeffrey Chieppa Guest

    MS SQL equivilent for Oracle DUAL


    I am searching for the MS SQL equivilent for the Oracle Dual command.
    select 'hello' from dual;

    Jeff
    jchie@vafb.com

  2. #2
    JK Guest

    MS SQL equivilent for Oracle DUAL (reply)

    There is no Dual table in SQL SERVER. For string selecting,date selection no need Dual table in SQL SERVER.
    EXAMPLE:

    select 'hello' as hello
    go
    select 10
    go
    select getdate() as currentdate
    go



    ------------
    Jeffrey Chieppa at 5/25/01 11:35:43 AM


    I am searching for the MS SQL equivilent for the Oracle Dual command.
    select 'hello' from dual;

    Jeff
    jchie@vafb.com

  3. #3
    Raj Guest

    MS SQL equivilent for Oracle DUAL (reply)

    Just do a
    select 'hello' ( without a from clause)
    to test out for a particular condition you cld do

    select 'hello' where 1=1 ----------( returns hello) and
    select 'hello' where 1=2 ---------(returns 0 rows)

    Hope that answers your questions.

    Raj



    ------------
    Jeffrey Chieppa at 5/25/01 11:35:43 AM


    I am searching for the MS SQL equivilent for the Oracle Dual command.
    select 'hello' from dual;

    Jeff
    jchie@vafb.com

Posting Permissions

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