Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a string within a column in sqlserver
Message
From
02/06/2008 17:42:51
 
 
To
02/06/2008 16:16:31
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01321126
Message ID:
01321163
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Oh gosh, it couldn't be that simple could it? I'll test it - thanks Stefan!

Actually I was not sure when I read your description, so I'm happy you did not laugh at me :-)
FWIW, if you want only those rows where the second part after the semicolon exactly equals "ABC" (ignoring whitespace), then I believe something like this might work (untested)
Select * From dbo.myTable 
    Where 
        Replace( 
            SubString( 
                myField, CharIndex(';',myField), Len(myField)
                ), 
            ' ','' 
            ) = ';ABC';
Regards
-Stefan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform