Showing posts with label states. Show all posts
Showing posts with label states. Show all posts

Sunday, March 25, 2012

Derived Column Comparison

I am importing States into a table and need to change all NULL fields before I perform a lookup. I'm using a derived column to replace the state value. I'd like to find all States that are blank and set it to "--".

Ironically, this works:

State != "" ? State : "--"

but

State == "" ? State : "--"

Does not work

Can someone tell me why?

Just a guess: the State column really has NULL values (vs. empty strings), which never compare equal to anything. But to explain why the first approach works, there must be some kind of implicit conversion going on.

I think the right way to express what you mean is:

isnull(State) ? "--" : State

|||

Or State is a " " (space), not "". Check for both-

ISNULL(State) ? "-" : TRIM(State) == "" ? "-" : State

|||Thanks, the state was not really null, but empty string

Saturday, February 25, 2012

Deploy successful, but updated report not showing...

Using VS2005 to deploy an updated report on a machine running SQL 2005
Reporting Services.
VS states that the deployment was successful, but the old version of the
report is what's getting run.
Can't reset the Default Website on that machine as it's running the web
services behind our application.
What have I missed?
Kyle JedrusiakOn Dec 4, 11:47 am, "Kyle Jedrusiak"
<kjedrus...@.princetoninformation.com> wrote:
> Using VS2005 to deploy an updated report on a machine running SQL 2005
> Reporting Services.
> VS states that the deployment was successful, but the old version of the
> report is what's getting run.
> Can't reset the Default Website on that machine as it's running the web
> services behind our application.
> What have I missed?
> Kyle Jedrusiak
Try deleting the report and re-deploying it. It worked for me.