Showing posts with label ideas. Show all posts
Showing posts with label ideas. Show all posts

Thursday, March 29, 2012

Getting the list of expressions from a package

Does anyone have any ideas on quickly getting a list of all expressions used in a package? For the BIDSHelper add-in (http://www.codeplex.com/bidshelper) we need to get a list of all the expressions used in the package and update the list whenever an expression is added through the IDE. Currently, we are iterating through the package, and checking every property of every task to see if it has an expression. On big packages, this is slow, as you might imagine.

Any suggestions would be appreciated. Maybe one of our MVPs could flag this for Microsoft follow-up, to see if they have any suggestions.

I'd be happy to do that for you.

[Microsoft follow-up]|||

Tasks or components generally are responsible for their own expressions -- there is no central repository. As such, I can't think of any other way to accomplish your goal.

The only potential shortcut I can think of is for components in a dataflow. Instead of iterating through the dataflow, you might be able to just look at the dataflow properties to see all expressionable objects in that dataflow (properties named something like [<component name>].[<object name>].[FriendlyExpression])

Thanks
Mark

|||Is there any event that I could hook into from the IDE to let me know when a task or data flow component has been updated by the user? If that was possible, I could minimize the rescanning of the entire package, by just checking individual tasks.

Friday, March 23, 2012

Getting Started SQL 2005

Can anyone help with REAL Fast Track links to Getting Started with SQL 2005 DB Design? I have loads of ideas on implementing databases but I'm stuck on where exactly to start from. No prior DB or programming experience but I possess remarkable aptitude.

>>No prior DB or programming experience but I possess remarkable aptitude

LOL - gotta love confidence.

Well, your first step is almost always a good book. I can't recommend any, the books I bought were SQL for programmers. You should read some beginner books on SQL and database design, and work from there. Remember, you can't do anything with a database unless you learn to drive a tool like Access, a programming language such as C#, or you're happy to type SQL directly into SQL Server for all your queries/inserts/updates.

|||Thanks a lot. Always 'knew' that the best way to start would be yo push Access to its limits. Hope using VB (2005) isn't a bad choice for a programming language. Figured I should start with VB before delving into C#. Once again, thanks a lot cos I'm darn serious about this .NET developer track. Resources on VB & C# programming are most welcome. Huge task ahead but I guess the 1st step is getting started!

Friday, February 24, 2012

Getting error while using "text" datatype

Hello, I am writing a sproc and am getting this error: Any ideas? Thanks!!

Msg 402, Level 16, State 1, Procedure InsertUserPreferences, Line 18

The data types text and text are incompatible in the equal to operator.

-

create procedure InsertUserPreferences

(

@.PublisherServer text

)

as

begin

if exists(Select Preference_StringList from USER_Preference where Preference_StringList = @.PublisherServer)

begin

--UPDATE

exec dbo.uProc_USER_Preference

end

If you are using 2005, change to using varchar(max) and this will work. You cannot use a text value in a equality comparison

create table test
(
textValue text
)
go
select *
from test
where textValue = ''
go

You could use a cast to only get the first 8000 characters:

select *
from test
where cast(textValue as varchar(8000)) = ''
go

If that will work for you.

Is that your entire proc? How des the update work? If it exists, do you just update the modify date?

|||I will give it a shot and get back with you. Thank you for your help!!!|||Dude that worked!! Thanks man!!!!

Getting error while using "text" datatype

Hello, I am writing a sproc and am getting this error: Any ideas? Thanks!!

Msg 402, Level 16, State 1, Procedure InsertUserPreferences, Line 18

The data types text and text are incompatible in the equal to operator.

-----------------------------------

create procedure InsertUserPreferences

(

@.PublisherServer text

)

as

begin


if exists(Select Preference_StringList from USER_Preference where Preference_StringList = @.PublisherServer)

begin

--UPDATE

exec dbo.uProc_USER_Preference

end

You cannot use an equal operator with TEXT or NTEXT. You can only use LIKE for comparison. Why are you using text, and not varchar? Are you using SQL 2000 or 2005?|||

Hello and thanks for responding!! I restored data from a SQL Server 2000 database to a SQL Server 2005 to meet our requirements. It was our DBA's decision to make that field a datatype of 'text'.

|||I would recommend changing it to VARCHAR if possible.