sql-server-2008

Invoke or BeginInvoke cannot be called on a control until the window handle has been created.

Hi I am trying to install SQL Server 2008 Developer Edition x64 on a Windows Server 2008 VM. I run the installer for a standalone installation and this works fine for the setup support rules bit. That passes ok but then I get this error: TITLE: SQL Server Setup failure. SQL Server Setup has encountered the following error: Invoke or ...

Using PIVOT in SQL Server 2008

Let's say I have some data, either in a SQL Server 2008 table or a [table]-typed variable: author_id review_id question_id answer_id 88540 99001 1 719 88540 99001 2 720 88540 99001 3 721 88540 99001 4 722 8...

reparenting hierarchyid values

If I have the following rows set up in a SQL Server 2008 table: Row Hierarchy 1 1/ 2 2/ 3 1/1 4 1/2 5 2/1 6 2/2 7 2/1/1 Currently row 5 is parented to row 2. I want to reparent row 5 to row 1, so it would now become 1/3 instead of 2/1. That much I have working so ...

Problem with DATE type in SQL Server

I'm trying to CREATE a TABLE with an attribute of type DATE in Microsoft SQL Server 2008. However, when I execute the query, I get the error: Column, parameter, or variable #3: Cannot find data type DATE. I consulted the documentation, and it indicated that DATE is a valid type in SQL Server. It works if I replace "DATE" with "DATE...

VS2008 not working with SQL Server 2008 Express ???

Hi, I've both VS2008 and SQL Server 2008 Express installed in my computer. When I try create a new DB or attach an existing one, I get the following error message:"This version of server is not supported - Only versions up to 2005 are supported." From that, I'd like to know: Is it possible that VS2008 with SP1 be not able to support...

varchar(max) datatype odbc mapping to ms-access2003

Hi there, i have tested the difference between defining varchar(max) in opposite text with our legacy application on a SQL Server 2005. All went very well and the new datatype reduced in a particular test case the amount of reads from 78 to 8 that represents a performance gain which we dont want to miss. But now on the target sqlserver...

SSIS Loop a list of connection strings in a master package, executing two other packages for each connection string

I am trying to figure out how to loop a list of connection strings in an SSIS package. MSDN suggests I can have an Execute SQL task generate a result set into a variable and use a For Each task to loop the results, but it's none too clear to me exactly how to create this. So I have a table with a single nvarchar column with a list of Sq...

Looking for advice for implementing a versioning feature in our application.

I am starting a project to create an "object versioning" feature for our software (.NET 3.5 / SQL Server 2008), basically it needs to do this: a user is looking at a customer: last name is "Smith-Johnson" 2 addresses (saved in different table) 1 product purchased 1 employee contact (saved in different table) 200 mails (saved in differ...

Testing a Data Pump

I have recently created a DataPump for connecting 2 SQL Servers together but it isn't working. Is there any way to test that the pump is working properly as I wish to eliminate from the list of possible things that may not be working? ...

Parent-child dimension in Analysis Services from Server2008

Someone know some interesting and complete tutorial about how to create a Parent-Child dimension in Server2008? I found a brief introduction in Server2005, but a lot of step are changed. thanks in advance. ...

Time line in SSRS 2008 like in management studio

HI, does anyone now if it's possible to create a time line like the one that appears in some of the default reports in management studio 2008, the Performance Data Collectors ones. I only manage to do something similar with a chart, but I'd like to implement something more like the time line in SSMS. This is the time line I'm referr...

in sqlserver, need to select one of two columns, can a case statment do this?

My table: Users (userID, col1, col2) I want to make a generic stored procedure, but I need to return EITHER col1 or col2 in a query. Can I case statement handle this situation? SELECT userID, col1 FROM Users OR SELECT userID, col2 FROM Users ...

Is there an easy way to remove all default values for a SQL database?

I'd like to remove all default values that have been setup in a particular database, is there a script that I can run to do this for all tables in database? Could be a bit time consuming without ... any help would be appreciated! ...

SQL Server 2008 backup from locked down hosting provider

I have a shared MS Sql 2008 database with my hosting provider and MS SQL Standard 2008 on my local box. They have the SQL Server locked down (rightly enough) but it menas I don't have sufficient privileges to use the backup database wizard or to generate scripts to create the database as a whole. To get around this I have been running ...

SQL Server 2008 localization of tables

I need to localize a SQL Server 2008 database. After investigating recommendations, I have found that it is best to have separate tables or each of the languages for the strings. That way different sorting settings can be set for each table. For example, a typical Product table has ProdID, Product Description, and Price fields. The r...

Tool to copy SQL Server 2008 db to SQL Server 2008 Express?

I have a typical dev scenario: I have a SQL 2008 database that I want to copy every so often to my local instance of 2008 Express so that I can do dev, make changes, etc. to the local copy. I have some constraints though: the source db is part of a live e-commerce site in shared hosting so I can't detach it and the hosting service wants ...

References/walkthroughs for maintaining database schemas with Visual Studio 2010?

I have Visual Studio 2010 Beta 2 and SQL Server 2008 installed. I'm working with a populated database and want to modify various column types. SQL Server Management Studio requires me to drop tables to do this, and get pretty finicky given my moderate level of knowledge of SQL Server. However, I heard the new database project type supp...

Is there a special sp on SQL server 2008 to get a table change script?

Hi there, I wonder how management studio generates the change table scripts each time i change a table, especially when i change the datatype from 'text' to 'varchar(max)'. Peace, Ice Update: Concerning the already given Answers i want to precise my question, after say thank you for your posts. Now, it is like already said, ssms ge...

Calling a Stored Procedure with XML Datatype

I am simply trying to call a store procedure (SQL Server 2008) using C# and passing XMLDocument to a store procedure parameter that takes a SqlDbType.Xml data type. I am getting error: Failed to convert parameter value from a XmlDocument to a String. Below is code sample. How do you pass an XML Document to a store procedure that is e...

SQL Server 2008 - Selecting multiple rows from OPENXML statement

Hi All, I have an XML file and I open that in SQL Server using OPENXML and then read the values in the XML file and insert them into the table. Assume that the XML structure is like this "<Student><name>XYZ</name><id>123</id><fathersname>XYS</fathersname><fathersid>3489</fathersid></Student>". Now I need to add this as two different row...