like isnull?
Is there any way to check if like?
select @myVariable isequal("hotta","kutel")
If it is equal to "hotta" set it as "kutel"
something like this?
For Sybase (as asked and after asked which RDBMS), use the equality operator and either an IF block for flow-control or a CASE expression for inline assignment. String literals must use single quotes in T-SQL (double quotes are for identifiers when enabled), so comparisons like "hotta" should be 'hotta'.
Example: IF-based assignment
if @myVariable = 'hotta'
begin
select @myVariable = 'kutel'
end Example: single-statement using CASE
select @myVariable =
case when @myVariable = 'hotta' then 'kutel' else @myVariable end Notes and troubleshooting:
is null to test for NULL or wrap with a null-replacement function (for example isnull(...,'') or coalesce(...)) if the intent is to treat NULL as an empty value.Hotta and hotta as different; normalize with upper()/lower() if needed.SET and SELECT both assign variables. SET is ANSI-standard for single assignments; SELECT can assign from queries — be careful if the query returns multiple rows.Jump to Post— sknake 1,622What rdbms are you using?
What rdbms are you using?
sybase...
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.