On Jan 4, 2008 8:14 AM, Chad Gray <[EMAIL PROTECTED]> wrote:
> If I delete the row then I break the joins in the database. So I want to
> blank the data out rather then remove the entire row.
I think Randy's got the best suggestion of just flagging the record
'inactive' or 'deleted' (or whatever
: RE: sql clear data
> If I delete the row then I break the joins in the database.
> So I want to blank the data out rather then remove the entire row.
>
> Thanks for the code. I forgot about the columnlist attribute on the
> query.
>
> There is probably a better
> If I delete the row then I break the joins in the database.
> So I want to blank the data out rather then remove the entire row.
>
> Thanks for the code. I forgot about the columnlist attribute
> on the query.
>
> There is probably a better way of setting up the database so
> don't have to
On Jan 4, 2008 8:11 AM, Ben Doom <[EMAIL PROTECTED]> wrote:
> He wants to clear all *columns*, not rows.
tsk... nitpicking over minor details :)
--
"Scientists tell us that the fastest animal on earth, with a top speed
of 120 feet per second, is a cow that has been dropped out of a
helicopter."
ah yeah then delete the row and readd it..
On Jan 4, 2008 10:11 AM, Ben Doom <[EMAIL PROTECTED]> wrote:
> He wants to clear all *columns*, not rows.
>
> --Ben Doom
>
> Greg Morphis wrote:
> > UPDATE table
> > SET foo = '',
> >Moo = '',
> >Goo = ''
> >
> >
> > leave out the WHERE clause.. i
> He wants to clear all *columns*, not rows.
There is no real way to do this in a single SQL statement. Mark's
suggestion of doing a single query to get the column names and then a
second to do the update is a way to do it, if you wanted to do it all
in SQL it's possible in SQL Server or MySQL by
10:48 AM
To: CF-Talk
Subject: sql clear data
Is there anyway to clear the data in a row in a database without using
UPDATE table
SET foo = '',
Moo = '',
Goo = ''
WHERE ID = 1
I don't want to clear the ID just the other fields.
My table has 50 fields a
about this, but im not the guy that made the database.
-Original Message-
From: Mark Kruger [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 10:58 AM
To: CF-Talk
Subject: RE: sql clear data
Chad,
Well you could do something like this:
SELECT * FROM mytable
WHER
On 1/4/08, Chad Gray <[EMAIL PROTECTED]> wrote:
> Is there anyway to clear the data in a row in a database without using
>
> UPDATE table
> SET foo = '',
> Moo = '',
> Goo = ''
> WHERE ID = 1
>
> I don't want to clear the ID just the other fields.
>
> My table has 50 fields and I don't feel
The id is the primary key that is autoincremented. I should have mentioned
that.
-Original Message-
From: Nicholas M Tunney [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 10:59 AM
To: CF-Talk
Subject: Re: sql clear data
Couldn't you delete the entire row and then add
He wants to clear all *columns*, not rows.
--Ben Doom
Greg Morphis wrote:
> UPDATE table
> SET foo = '',
>Moo = '',
>Goo = ''
>
>
> leave out the WHERE clause.. it'll empty all rows
>
> On Jan 4, 2008 9:47 AM, Chad Gray <[EMAIL PROTECTED]> wrote:
>> Is there anyway to clear the data in
Chad,
Try something like this:
select top 1 * from table
update table
set
#key# = '',
ID = ID
Code from brain directly to email so no warranty, liability, or guaranty
on that code...but it might work.
Let me know if it does and I'll treat myself to
Couldn't you delete the entire row and then add a new row with just the ID?
Nic
Chad Gray wrote:
> Is there anyway to clear the data in a row in a database without using
>
> UPDATE table
> SET foo = '',
> Moo = '',
> Goo = ''
> WHERE ID = 1
>
> I don't want to clear the ID just the other
This seems kind of odd. Why not just delete the row?
--Ben Doom
Chad Gray wrote:
> Is there anyway to clear the data in a row in a database without using
>
> UPDATE table
> SET foo = '',
> Moo = '',
> Goo = ''
> WHERE ID = 1
>
> I don't want to clear the ID just the other fields.
>
>
UPDATE table
SET foo = '',
Moo = '',
Goo = ''
leave out the WHERE clause.. it'll empty all rows
On Jan 4, 2008 9:47 AM, Chad Gray <[EMAIL PROTECTED]> wrote:
> Is there anyway to clear the data in a row in a database without using
>
> UPDATE table
> SET foo = '',
> Moo = '',
> Goo =
you would need loop to wrap around the update to determine the
Ids of the rows you wish to blank out.
Why would you need to do this?
-Mark
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 9:48 AM
To: CF-Talk
Subject: sql clear data
Is there
Is there anyway to clear the data in a row in a database without using
UPDATE table
SET foo = '',
Moo = '',
Goo = ''
WHERE ID = 1
I don't want to clear the ID just the other fields.
My table has 50 fields and I don't feel like typing out all of them and setting
them to blank.
~
17 matches
Mail list logo