Skip to main content
Inspiring
September 30, 2008
Question

Partially Delete Record!!

  • September 30, 2008
  • 6 replies
  • 428 views
Is it possible to delete part of a record?
What i mean is - can i delete the values of certain fields in a database
table, but not delete the whole record?
Im using the 'command' behaviour but it seems in can only use the Delete *

Thanks
Andy


This topic has been closed for replies.

6 replies

Inspiring
September 30, 2008
Andy wrote:
> Thanks Dooza -
> That sorted it :-D

Cool, nice one!

Dooza

--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Inspiring
September 30, 2008
Thanks Dooza -
That sorted it :-D

Regards
Andty


"Dooza" <doozadooza@gmail.com> wrote in message
news:gbt4oo$j9a$1@forums.macromedia.com...
> Andy wrote:
>> Thanks Guys
>> I'm going to use the Update Command in Dreamweaver, but im having a bit
>> of trouble setting the values to NULL.
>> The fields in the database will accept NUL values, it's just that i don't
>> know how to write it correctly.
>>
>> At the moment i have the following which doesn't work.
>>
>> Andy Ideas?
>> Thanks
>> Andy
>>
>> UPDATE Calibrations
>> SET Cal_Ref='MMColParam1', Cert_No=MMColParam2, Cal_Date=MMColParam4
>> Proc_No=MMColParam5, Cal_By=MMColParam6, Service_Required=MMColParam7,
>> Calibration_Required=MMColParam8, SubConName=MMColParam9
>> WHERE RecordID = MMColParam
>>
>> MMColParam1 ""
>> MMColParam2 ""
>> MMColParam3 ""
>> MMColParam4 ""
>> MMColParam5 ""
>> MMColParam6 ""
>> MMColParam7 ""
>> MMColParam8 ""
>> MMColParam9 ""
>> MMColParam Request("ID")
>>
>> Cal_Ref is a Number, Cal_date is a Date, The rest of the fileds are text
>
> I don't think Dreamweaver understands NULL, so you will need to go into
> the code and enter the word manually yourself. This will render the Server
> Behaviour dead untill you put "" back in the code for each entry.
>
> Dooza
>
> --
> Posting Guidelines
> http://www.adobe.com/support/forums/guidelines.html
> How To Ask Smart Questions
> http://www.catb.org/esr/faqs/smart-questions.html


Inspiring
September 30, 2008
Andy wrote:
> Thanks Guys
> I'm going to use the Update Command in Dreamweaver, but im having a bit of
> trouble setting the values to NULL.
> The fields in the database will accept NUL values, it's just that i don't
> know how to write it correctly.
>
> At the moment i have the following which doesn't work.
>
> Andy Ideas?
> Thanks
> Andy
>
> UPDATE Calibrations
> SET Cal_Ref='MMColParam1', Cert_No=MMColParam2, Cal_Date=MMColParam4
> Proc_No=MMColParam5, Cal_By=MMColParam6, Service_Required=MMColParam7,
> Calibration_Required=MMColParam8, SubConName=MMColParam9
> WHERE RecordID = MMColParam
>
> MMColParam1 ""
> MMColParam2 ""
> MMColParam3 ""
> MMColParam4 ""
> MMColParam5 ""
> MMColParam6 ""
> MMColParam7 ""
> MMColParam8 ""
> MMColParam9 ""
> MMColParam Request("ID")
>
> Cal_Ref is a Number, Cal_date is a Date, The rest of the fileds are text

I don't think Dreamweaver understands NULL, so you will need to go into
the code and enter the word manually yourself. This will render the
Server Behaviour dead untill you put "" back in the code for each entry.

Dooza

--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Inspiring
September 30, 2008
Thanks Guys
I'm going to use the Update Command in Dreamweaver, but im having a bit of
trouble setting the values to NULL.
The fields in the database will accept NUL values, it's just that i don't
know how to write it correctly.

At the moment i have the following which doesn't work.

Andy Ideas?
Thanks
Andy

UPDATE Calibrations
SET Cal_Ref='MMColParam1', Cert_No=MMColParam2, Cal_Date=MMColParam4
Proc_No=MMColParam5, Cal_By=MMColParam6, Service_Required=MMColParam7,
Calibration_Required=MMColParam8, SubConName=MMColParam9
WHERE RecordID = MMColParam

MMColParam1 ""
MMColParam2 ""
MMColParam3 ""
MMColParam4 ""
MMColParam5 ""
MMColParam6 ""
MMColParam7 ""
MMColParam8 ""
MMColParam9 ""
MMColParam Request("ID")

Cal_Ref is a Number, Cal_date is a Date, The rest of the fileds are text





"Dooza" <doozadooza@gmail.com> wrote in message
news:gbsrrj$8l9$2@forums.macromedia.com...
> Andy wrote:
>> Is it possible to delete part of a record?
>> What i mean is - can i delete the values of certain fields in a database
>> table, but not delete the whole record?
>> Im using the 'command' behaviour but it seems in can only use the Delete
>> *
>>
>> Thanks
>> Andy
>
> You need to use an UPDATE and set the values to NULL (thats if the column
> is nullable) or nothing "".
>
> Dooza
>
> --
> Posting Guidelines
> http://www.adobe.com/support/forums/guidelines.html
> How To Ask Smart Questions
> http://www.catb.org/esr/faqs/smart-questions.html


Inspiring
September 30, 2008
Andy wrote:
> Is it possible to delete part of a record?
> What i mean is - can i delete the values of certain fields in a database
> table, but not delete the whole record?
> Im using the 'command' behaviour but it seems in can only use the Delete *
>
> Thanks
> Andy

You need to use an UPDATE and set the values to NULL (thats if the
column is nullable) or nothing "".

Dooza

--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Inspiring
September 30, 2008
you could use the update, thus update the fields you wanted deleted with no
value.

but I would considder doing it some what different depending how big you
think the database is going to get. Perhaps you can have 2 tables, one
master table and the other table having the data you might want deleted
every so often. you would join the master table with the child table. doing
it like this means saving database space etc.