Regarding select string

Results 1 to 2 of 2

Thread: Regarding select string

  1. #1
    Join Date
    Dec 1969

    Default Regarding select string

    Hi to all...I am retrieving data from two tables using the UNION statement and i am thinking of having a field in my resultset(this field is not found in the database) to distinguish the data from two tables.Is it possible to set a fixed value for a particular field using the select statement?For example, a field value of 'buy' and 'sell' values are used to distinguish between the two tables.

  2. #2
    Join Date
    Dec 1969

    Default RE: Regarding select string

    SELECT &#039;buy&#039; AS MyFieldName FROM Table<BR><BR>This will give you a value of buy for the field MyFieldName that doesn&#039;t need to exist in the DB. (I&#039;m assuing its SQL Server here)

Posting Permissions

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