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

how do i retrieve a value from a specific row and column of a query?

Guest
Dec 22, 2011 Dec 22, 2011

I'm new at this, but i want to be able to retrive values from succeeding rows while i'm outputting results from a query. the table in the datasource is a program schedule, each row represents one hour of weekly programming, and i want to be able to look ahead to see when the next program starts. can i grab values from a designated row and column of a table or query?

667
Translate
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
Advocate ,
Dec 22, 2011 Dec 22, 2011

I think what you are looking for is something like this.

<cfset nextStartTime = queryName["startTimeColumnName"][currentrow+1] />

You can access queries like multimensional arrays, so I am telling it to get me the startTimeCoulmnName value from the next record.

Jason

Translate
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
Dec 22, 2011 Dec 22, 2011
LATEST

OK. Thank you for that. I think that solves my problem. I have to check each succeeding row to see when the program changes, which could take several rows, because programs can last hours. So the nextstarttime could be several rows ahead. Thanks again.

Translate
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