GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   SQL Query (https://gfy.com/showthread.php?t=478968)

OptMediaJohn 06-09-2005 05:05 PM

SQL Query
 
Anyone good at SQL here?

I am trying to make a query that replaces a tab in a column after every entry in that column. I started using trim(), but I don't think I know how to use it corrrectly.

Here is what I have so far:


Select fullname_ from members_ and TRIM(BOTH ' ' members_);


What am i doing wrong?

cyber_ninja 06-09-2005 05:07 PM

dont do it :Oh crap

OptMediaJohn 06-09-2005 05:08 PM

Don't do it? Why? It has to be done...

woj 06-09-2005 05:10 PM

can you try explaining again what you are trying to do?

OptMediaJohn 06-09-2005 05:12 PM

Ok, I have a table members_ with a column fullname_ . The column fullname_ has a tab after every name (caused from the import of this table into this database). I want to remove this tab after every name in that column. Someone pointed me to TRIM, however I don't think I am doing that so well.

Does that make sense?

woj 06-09-2005 05:16 PM

make a backup of the table,
and then try something like this perhaps?
UPDATE members_ SET fullname_=TRIM(fullname_)

If you are still having problems you can hit me up on icq:33375924

OptMediaJohn 06-09-2005 05:34 PM

Big thanks to WOJ on this, looks like its running perfectly!

Thanks again!!

V_RocKs 06-10-2005 12:03 AM

WOJ gives advice? WOW!

Also, you can TEST it first by doing this,

SELECT TRIM(fullname_) from members_ SET


All times are GMT -7. The time now is 08:53 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123