• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

query of queries question

Guest
Jun 09, 2010 Jun 09, 2010

Copy link to clipboard

Copied

HI All -

I have a query which returns the result set like below. The column names are like 1990, 1991, 1992 and there are certain amount for each year

1990 1991 1992
1000 5000 6000
2000 2000 3000

I have a query of query which finds the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number.

Thanks

TOPICS
Advanced techniques

Views

396

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 09, 2010 Jun 09, 2010

Copy link to clipboard

Copied

The easiest way is to start your column names with letters.  If those are years, just prepend the letter y.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2010 Jun 09, 2010

Copy link to clipboard

Copied

LATEST

Thanks Dan, that heped

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation