danielle v2.1b
11-22-2004, 03:10 AM
Hiya,
I made a database driven site a while ago and made a particular field optional. As the site has progressed, I've realised this was a silly thing to of have done because searches against this field are only listing the partial result from those that filled it.
What I'd like to do is run an SQL query on my database to fill in all the old records that are blank with a default value only I'm not sure how to best do this. Oh how WYSIWYG software makes us soft in the head!
My table is called "pictures" and it has a column called "type". Whilst my SQL knowledge is good enough to select all the blank fields, I don't know how to fill them all without going through them one at a time. Should I be using Insert or Replace or am I way off with both those? Any help or pointers would not only be most gratefully appreciated, they'd stop a young blonde looking real silly after she's pulled all her hair out!!!
Many thanks,
Danielle
I made a database driven site a while ago and made a particular field optional. As the site has progressed, I've realised this was a silly thing to of have done because searches against this field are only listing the partial result from those that filled it.
What I'd like to do is run an SQL query on my database to fill in all the old records that are blank with a default value only I'm not sure how to best do this. Oh how WYSIWYG software makes us soft in the head!
My table is called "pictures" and it has a column called "type". Whilst my SQL knowledge is good enough to select all the blank fields, I don't know how to fill them all without going through them one at a time. Should I be using Insert or Replace or am I way off with both those? Any help or pointers would not only be most gratefully appreciated, they'd stop a young blonde looking real silly after she's pulled all her hair out!!!
Many thanks,
Danielle