<nodding>  Yeah, sounds like it.

Ok, that cinches it.  I'm gonna have to bite the bullet and do it the CF
way, I think.

Thanks for the help, though!  Appreciate the time..

-Patti
----- Original Message -----
From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 1:19 PM
Subject: RE: Returning columns with null values when specific columns are
unknown at runtime


> If you're talking about returning the names of the columns that are null,
> you might be able to accomplish this with a creative stored procedure...
You
> would have to draw a query from the syscolumns table to get the names of
the
> columns in that table ( unless you knew all the column names ahead of time
> ), then use a combination of a cursor(s) and "exec sp_executesql" to
> determine which columns are null and place the resultant column names in a
> temp table, then return all rows from the temp table.
>
> It's an awfully complicated process ...
>
>
> S. Isaac Dealey
> Certified Advanced ColdFusion 5 Developer
>
> www.turnkey.to
> 954-776-0046
>
> > I think you would need to right some type of union statement that would
> > have
> > to look at each field in your table separately. it would then return a
> > record set with only the fields that were blank, actually it would only
> > return the key of the record to cold fusion but in query ann it would
show
> > the fieldnames also.
>
> > Shawn Regan
> > pacifictechnologysolutions
> > 15530-B Rockfield Blvd. Suite 4
> > Irvine, CA 92618
> > 949.830.1623
> > w w w . p t s 1 . c o m
>
>
>
> > -----Original Message-----
> > From: Patti G. L. Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 18, 2002 8:58 AM
> > To: CF-Talk
> > Subject: Re: Returning columns with null values when specific columns
> > are unknown at runtime
>
>
> > Sorry, but you made the same mistake that simon did.
>
> > I don't want to return select *
>
> > I want to return select (only columns that are null and I don't know
what
> > they are up front) where primarykey = some number
>
> > I didin't actually have any questions regarding the where statement at
> > all.
> > I'm aware that I'll probably have to use the whole IS NULL dealie... but
> > where I'm stuck is how do I selectively return columns when I don't know
> > which columns fit my criteria (containing null values only).
>
> > Thanks - Patti
> > ----- Original Message -----
> > From: "Candace Cottrell" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 18, 2002 11:23 AM
> > Subject: Re: Returning columns with null values when specific columns
are
> > unknown at runtime
>
>
> >> How about this.... or am I still missing something
> >>
> >> Select * from TABLENAME
> >> WHERE col1 IS NULL OR col2 IS NULL OR col3 IS NULL OR col4 IS NULL
> >>
> >>
> >> Candace K. Cottrell, Web Developer
> >> The Children's Medical Center
> >> One Children's Plaza
> >> Dayton, OH 45404
> >> 937-641-4293
> >> http://www.childrensdayton.org
> >>
> >>
> >> [EMAIL PROTECTED]
> >>
> >> >>> [EMAIL PROTECTED] 9/18/2002 11:17:41 AM >>>
> >> Thanks, but that doesn't get me where I want.
> >>
> >> I ONLY want to return the columns that ARE null, and I never know which
> >> ones
> >> those are when I run this query... so what I need is something for the
> >> select statement.
> >>
> >> -Patti
> >> ----- Original Message -----
> >>
> >> > The only thing I can think to do is create a bunch of OR statements
> >> i.e.:
> >> > WHERE colA IS NULL OR colB IS NULL OR colN IS NULL
> >> >
> >> > ~Simon
> >> >
> >> >
> >> > -----Original Message-----
> >> >
> >> >
> >> > Is there a way to write a MSSQL 2k query that will return a result
> >> set
> >> that
> >> > contains only columns with null values when you don't know
> >> explicitly
> >> which
> >> > columns those will be?
> >> >
> >> > So if I have this data
> >> >
> >> > pk | col 1 | col 2 | col 3 | col 4|
> >> >   1       1       2        null    null
> >> >   2        null    4      null    null
> >> >
> >> > I'd like a query that would return col 3 and col 4 where pk = 1 or
> >> col 1,
> >> > col 3 and col 4 where pk=2.
> >> >
> >> > Is this possible?
> >> > -Patti
> >>
> >>
> >>
> >>
>
> >
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to