Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Monday, March 19, 2012

help with a max length table constraint

Table File_Paths (physical system file paths)

The columns represent parts of the path.

How can I set up a constraint that the total concatenated length of all the columns within a row is less than 260 chars?

Thanks

ALTER TABLE SomeTable WITH NOCHECK
ADD CONSTRAINT SomeCheck CHECK (LEN(Col1+ co2 + col 3) <= 260)

HTH, Jens Suessmeyer.

|||

Right on target. Thanks

For some reason, when it gets saved a bunch of unnecessary parentheses both square and round get added.

The square brackets help if there are white spaces but the program just forces them. Likewise with the round the len() function did not need the items enclosed individually either.

Is there wa way to turn that off in SSMS?

|||The database engine modifies expressions specified in constraints, defaults, computed column etc. There is no way to control this behavior or suppress it. This is even more so in SQL Server 2005. So you should not rely on the scripting for your DDL. Instead it is better to maintain the scripts yourself in source code control system.|||

Thanks.

A newbie needs hand holding and the GUI does that. I am sure eventually I will get more independent but until then...

Umachandar Jayachandran - MS wrote:

you should not rely on the scripting for your DDL. Instead it is better to maintain the scripts yourself in source code control system.

Let me get this straight:

After I execute the script, the only other time I need it is if I want to modify it or reuse it on another server. Otherwise, it is for informational purposes. For the info to be effective, the DDL code would have to be broken down into smaller files for granularity and a huge effort to duplicate the tree-like organization. No automation at all. And all this while the same already exists, but the code is munged.

What is it with MS and code munging by force? Didn't they get enough complaints about mutilating html/aspnet markup in VS1.x? That was a sheer nightmare!

What good does it do to add over 40 unnecessary bracket chars in just one line of code?

</rant>

Sunday, February 19, 2012

Help referencing Report Path in SharePoint Report Viewer

I put in a Report Viewer in one one my webpart buckets. I'm trying to set the properties now. I set the Report manager URL to:

http://myservername/Reports

The problem comes when trying to specify the report path. I'm not sure where this is stored...I just tried taking it from my URL when I ran the report but this doesn't work:

Pages/Report.aspx?ItemPath=%2fa_dashboard%2fa_dashboard

Where exactly is the directory or path I need to poitn to and how do I figure out how it should be formed?

screen shot: http://www.webfound.net/reportpath.jpg

Report Manager URL

http://myserver/reports/

Report Path

/myfolder/myreport

|||I understand this but I tried that. /myfolder/myreport where does this stem from? I tried pasting in the foldername that shows in Report manager for my report (the yellow folder you see) but that's not working.|||You know what, thanks it worked. I was missing the other half..the report name!