cdosys

Technical Article

RE: Variable where clause

  • Reply

create procedure MySP @var varchar(20) = null as if @var = null Select * from news_items else Select * from news_items where division = @var Steve Jones sjones@sqlservercentral.com http://qa.sqlservercentral.com/columnists/sjones www.dkranch.net

You rated this post out of 5. Change rating

2003-05-20

Technical Article

RE: cast varchar as datetime

  • Reply

Hi 5409045121009, I tried the function you mentioned, and modified it a little so that it gave me the whole string and it worked. CREATE FUNCTION MyStrip1(@v varchar(50)) RETURNS Varchar(50) AS BEGIN Declare @vv Varchar(50) Set @vv=Right(@v,DataLength(@v)) RETURN Left(@vv,DataLength(@vv)) END Problem though is that it is returning it as a varchar value. I need to […]

You rated this post out of 5. Change rating

2003-05-16

Blogs

Deleting Old Local Git Branches–#SQLNewBlogger

By

I had a lot of local branches for a repo (actually a few repos)....

Use Your Voice

By

If you want more of a career and less of a job, one thing...

Real-World SQL Mastery: Your Hands-On, Mess-Free Sandbox

By

Are you ready to take your SQL skills from theoretical to tactical? If you've...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers