May 17th, 2010
Knoxville SQL Server Users Group May/June Meetings
May and June meetings announced! Check out the site for more information…
http://knoxsql.sqlpass.org/
May and June meetings announced! Check out the site for more information…
http://knoxsql.sqlpass.org/
I am working on a project where I need to export XML from my database, in the process of asking for help I decided I would document here (a similar version of what I am working on) what I was stuck on and ask for help in my comments since twitter #sqlhelp needed more info.
I am currently trying to use FOR XML EXPLICIT to pull this data but have realized that I might be using the wrong tool. We have other feeds written in C#, I was just trying to get around the script task in SSIS.
Here you go:
Watch out Knoxville! I have officially started a PASS Chapter in Knoxville,TN called KnoxSQL.
Stay tuned for meeting information.
As of right now my plan is to do a lunch time meeting at New Horizons off Cedar Bluff once a month or so, and maybe throw in a SQL Saturday if I see enough interest.
If you would like to come and hear the latest topic, or even volunteer to help out, let me know!
I need my query to return:
bar1
bar2
foo3
bar4
Here is what I have so far… I also tried to use a while statement to loop through… no luck(any ideas?):
DECLARE @xmlString XML;
SET @xmlString = N’
<a promotion=”PL10ONL”>
<product-id>bar1</product-id>
<product-id>bar2</product-id>
<product-id>foo3</product-id>
<product-id>bar4</product-id>
</a>
‘
SELECT ISNULL(T.lala.value(‘./product-id[1]‘,‘varchar(20)’),‘found nothing’)
FROM @xmlString.nodes(‘a’) AS T(lala);
SELECT ISNULL(T.lala.value(‘./product-id[2]‘,‘varchar(20)’),‘found nothing’)
FROM @xmlString.nodes(‘a’) AS T(lala);
/*====================================*/
Got it!!! Joy!
DECLARE @xmlString XML;
SET @xmlString = N’
<a promotion=”PL10ONL”>
<product-id>bar1</product-id>
<product-id>bar2</product-id>
<product-id>foo3</product-id>
<product-id>bar4</product-id>
</a>’
SELECT s.lala.value(‘@promotion’, ‘varchar(20)’),T.lala.value(‘.’, ‘varchar(20)’)
FROM @xmlString.nodes(‘a/product-id’) AS T(lala)
OUTER apply @xmlString.nodes(‘a’) AS S(lala)
The Professional Association of SQL Server has a Summit every year in Seattle. (One in Europe too.) This year I vowed I would go. Paid for the conference myself and on November 2nd at 8:40 my flight leaves for Seattle,Washington.
Here is where you can find me at the SQL PASS Summit.
Yes, I sometimes have three sessions I want to attend in the same hour… decisions decisions…how is that cloning process going?
Tuesday:
Wednesday:
Thursday:
Friday:
Of course I’ll have to find time somewhere to play BINGO!!
The ETL database my friend and I wrote is going to launch into production Tuesday. It’s like our child’s first day of kindergarten.
There are at least 20 jobs that were not required for launch, those will need to be done in the upcoming months. It’s been almost a year since this project began. A giant endeavor which ultimately ends in a new shiny website with better analytics, promotional control, and user experience.
I’ve learned so much, granted there were, and still will be, moments where I will want to pull my hair out. But what an awesome thing to create from the bottom up?!
The way I understood it, if you put a value in “set values” within your job step (calling an SSIS Package) it would overwrite what was in the SSIS Configuration table… apparently I was wrong. I tested this today. SSIS Configuration table is the winner.
It all began in March of 2001. I survived 3 rounds of layoffs at Earthlink, an Internet service provider, but didn’t make the final round. A few weeks later I was hired by a small company (at the time) named Marketlinx.
Marketlinx writes Multiple Listing Service software for Realtors. I generated reports from listing data, and helped with cosmetic ASP/Javascript type work, which required me to query the database from time to time.
Over the next five years I became very familiar with the software, but felt that I wanted to focus more on the inner workings of the database. In April 2006 I was moved into a database programmer position. I was already familiar with the data and SQL Server 2000/2005. Anything I didn’t know I asked or researched on the web. I took many self paid for classes, I was totally amazed at what I could do.
After almost 3 years as a DBA, my database career took on a new direction, I was hired to join a team that would write a brand new data warehouse with SQL Server 2008, using SSIS, for a large Ecommerce company. This is something a DBA gets to do what, once or twice in a career?
Now, our warehouse is almost complete. I’ve learned so much and evolved with the software. I’ve made new friends in the database industry, and try to keep up with the not so local Nashville SQL Server User group. I have hopes of starting a Knoxville group later this year. I also registered for the annual Microsoft SQL PASS convention in Seattle.
I love my job and I’m excited about what I do, I don’t claim to be an expert, but every day I learn something new.
So there you go, that’s how I got to be a DBA, and I love it.
You know you’re a nerd when you lay around at night wondering…
Right now our SSIS configurations are stored in a control table in our primary database. However when installing an SSIS package if you do not choose an xml config you do not get prompted to change the connection string for the database (or any value you selected to be configurable). The config on the QA/Stage box just automagically has the correct connection string. But, I’m wondering if this is a feature or a flaw. If I’m not the one installing the package this might be a bad thing… hmmmm.
Also, right now we have a slowly changing dimension checking every attribute of a product for changes, the table is is checking has at least a million records… after going to the Nashville SQL Server User group I was told that this isn’t performant, but one product has many many attributes, so using multiple lookups is not an option. I’m thinking we are going to have to somehow do a large join on my staging table, or find another solution. But really right now the process doesn’t take THAT long, so in reality, we will probably leave it alone.