Okay. . . . just thought I'd jump in here. . . Matthieu is correct. . . I am
in the middle of trying to build bigger and better data structures to handle
what is admittedly a fairly simple task . . .but had dug myself so far into
a hole trying to set it up the wrong way there is NO WAY I could have fixed
it without all your help. . . . .

But, just a note (found a generous oracle dba):

if you query:

<cfquery name="getgrades" datasource="sotl">
select '#proposal#'
from grades06
where readerid = #session.readerid#
</cfquery>

(putting the list variable in single quotes as the requested column name)

You will get the value of the column!!  and not just value of the list
variable!



On 11/29/05, Ken Ferguson <[EMAIL PROTECTED]> wrote:
>
> I'm interested to know what happens in SQL+ or Toad if you run:
>
> select 404 from proposals
> I mean, am I understanding you right that you have a column in a
> database named 404 (or some other number)??? I would expect, given 5
> results from the above query, that you would get:
> | --| ---- |
> | 1 | 404 |
> | 2 | 404 |
> | 3 | 404 |
> | 4 | 404 |
> | 5 | 404 |
> | --| ---- |
>
> no matter what the values in that column actually ARE.
>
> --Ferg
>
>
> M wrote:
>
> >All incredibly valid points!
> >
> >Unfortunately very short on time. . .they (faculty) need to start grading
> >these things  tomorrow evening.  Starting closer to the beginning we
> >currently have the following:
> >
> >1) oracle database
> >2) one table containing the proposals -- proposalid, readinggroup,
> proposal
> >details, status (saved - submitted)
> >3) one table containing reader info -- readerid, login, password,
> >readinggroup
> >
> >What we need:
> >
> >1)One table designed to hold all grades, for either group -- either
> together
> >or separately
> >
> >2) A form that can contain the correct information regarding the grades
> >currently in the grades table for a given reader in a given reading
> group.
> >
> >
> >Pathetic, isn't it?  :-(  I know its sad, but I want to learn how to fix
> >this!
> >
> >THANK YOU!
> >m
> >
> >
> >On 11/29/05, Ken Ferguson <[EMAIL PROTECTED]> wrote:
> >
> >
> >>What database are you using? You need to name those columns differently.
> >>In MySQL, even if you do a straight select on a column named "404", it's
> >>going to return 404 for every row. However, if you name that column
> >>col_404, it'll return the values you're looking for. I think you've got
> >>a larger architectural problem here though. Why do you have these
> >>dynamic column names in the first place? This can all be represented
> >>much better in the database. You'd have a far easier time with your app
> >>and it'd work more efficiently if you reworked your db design to
> >>eliminate this nastiness. You're using a relational database for a
> >>reason -- so you can maintain the relationships between your data. You
> >>need to be taking advantage of that with joined tables rather than
> >>faking the funk with dynamically named columns in a table.
> >>
> >>--Ferg
> >>
> >>
> >>
> >>Molly Abraham wrote:
> >>
> >>
> >>
> >>>It does and it doesn't. . .cannot figure out why. . . it seems to work.
> .
> >>>
> >>>
> >>but only returns the column name:
> >>
> >>
> >>><cfquery name="getindiv" datasource="sotl">
> >>>select #i# as grade
> >>>
> >>>
> >>>from grades06
> >>
> >>
> >>>where readerid = #session.readerid#
> >>></cfquery>
> >>>
> >>>      <td><cfoutput>#getindiv.grade#</cfoutput> (the column name --
> >>>
> >>>
> >>ex:  404) is returned. . .not the value of '2' it contains.
> >>
> >>
> >>>Debugging:
> >>>
> >>>getindiv (Datasource=sotl, Time=0ms, Records=1) in D:\Webpub\Wwwroot\ @
> >>>
> >>>
> >>12:18:47.047
> >>
> >>
> >>>select 404 as grade
> >>>
> >>>
> >>>from grades06
> >>
> >>
> >>>where readerid = 2
> >>>
> >>>Any more ideas??  Hugely grateful, but still apparently terminally
> slow.
> >>>
> >>>
> >>. .
> >>
> >>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225645
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to