sql-server-2008

Import CSV within SQL Server 2008 Management console

I'm trying to import a CSV file within the SQL Server Management console. The CSV is comma delimited. I have some columns that has a comma within double quotes, it seems that SQL Server splits the value in 2 columns. How can I solve this? I hope you can understand what I mean. Thanks in advance. ...

How to convert products to product-with-pack-sizes using the largest pack size

For a food online-ordering application, I have worked out how many ingridients we need (which we call StockItems), but need help converting that to what we should order based on what sizes they come in (which we call SupplierItems -- i.e. StockItems + PackSizes). If we take apples as an example, we need to order 46 (that bit has already...

Export Import error 'SSIS Data Flow Task could not be created' … registering DTSPipeline.dll, cannot create task “STOCK:PipelineTask”

I'm about to throw in the towel on this one. Running SQL Server 2008 enterprise on Windows 7 x64. Can't get past this issue. When I try to Import / Export Data from databases through SQL Server Management Studio I get the following Error. Error: TITLE: SQL Server Import and Export Wizard ------------------------------ The SSIS Data ...

Running the Script, made by generate script on different server gives error.

the following is a script which was generated using generate script option. the wizard says that this can be used to copy, create db on different servers so its made for it, then why does this error occur.?? the error is Msg 5170, Level 16, State 1, Line 2 Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MS...

Comparing Time in SQL Server 2008

Here is my table. I need a query which returns the shift id for a specified time How can I get the value? shift_ID shift_From shift_To 1 2010-09-21 10:00:00.000 2010-09-21 18:10:00.000 2 2010-09-21 20:00:00.000 2010-09-21 05:00:00.000 Suppose I am giving 02:00:00 as input I need to get the shift ...

setting max date value to oracle 10g from sql2000+n

Hi I have this update statement UPDATE OPENQUERY(linkedServerToOracle ,"SELECT T$TDAT FROM BAAN.TTDSLS031010 WHERE T$CUNO='003098' AND T$CPGS=' 4AN00'") SET T$TDAT=CONVERT(varchar, '4712-01-01 00:00', 121) and the current setting in linkedServerToOracle (10g) is supposed to take the value '4712-01-01 00:00' as pseudo infinite dat...

The OLE DB provider "SQL Native Client" has not been registered

TITLE: Microsoft SQL Server Management Studio ------------------------------ The test connection to the linked server failed. ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The OLE DB p...

All possible combinations for two column data

I have a two column view Product Id Tag ---------------------- 1 Leather 1 Watch 2 Red 2 Necklace 2 Pearl I'm trying to get all possible combinations of tags for a product as such: 1 Leather 1 Leather,Watch 2 Pearl 2 Pearl,Necklace 2 ...

asp.net database connection

Hi, I have the correct entries in the web.config file in my asp.net project. How do I make sure that the connection has been established successfully? I want to pull an image form my database and then display it on my aspx page. Some things to note: I am using visual studio 2010, sql server 2008, .NET 4.0 Thanks Here is the relevant p...

asp.net repeater control for displaying images and associated names

Hi, I want to implement an image gallery in asp.net/C#. I am using sql server 2008, visual studio 2010 and .NET 4.0. I have made a webpage and now want to display 6 images as thumbnails (and their names just below the thumbnails) at the center of the page. The format of the display is something like this: img1 img2 img3 `<name...

What should I map a TimeZoneInfo property to a SQL Server 2008 DB Type?

Hi folks, I have a TimeZoneInfo property on some object which I need to save to a Microsoft SQL Server 2008 database. What type of database field type should I use, please? If it helps, I'm also using Entity Framework 4, which came with my Visual Studio 2010. ...

how to retrieve bulk data from sql without slowing down the server/program

hi i have a program wherein it will retrieve data from sql based on a specific date range.. the problem is when the date range is set to a year or greater than that then the loading of data is so slow that sometimes the program will be not responding. Is there a way avoid this? ...

Remote Maintenance Plans in SQL Server 2008

I've set up a maintenance plan in instance #1 of SQL Server 2008. In theory, it will connect to instance #2 and back up those databases to the hard drive of instance #1. I have: Created a login on instance #2 Given that login the correct permissions needed to back-up a database (I tested it) Created a working connection in the mainte...

Cannot open database "Database" requested by the login

Hey guys, I'm working through a sample .Net MVC application. I've added the aspnet membership api tables to an existing database. I've modified the web.config file as follows: <connectionStrings> <add name="ApplicationServices" connectionString="Data Source=localhost;Initial Catalog=nerddinner;Integrated Security=True;User Instanc...

SSIS, Dealing with rows which depend on other rows.

This is quite a strange problem, wasn't quite sure how to title it. The issue I have is some data rows in an SSIS task which need to be modified depending on other rows. Name Location IsMultiple Bob England Jim Wales John Scotland Jane England A simplifed dataset, with some names, their locations, and a column 'IsMultiple' whi...

Big parameter list for SQL query

Hello, I have a big list of int parameters for a SQL query: update mytable set col='xyz' where id in (/* thousands of ints */) My problem is that in SQL Server 2000 there are a limit for parameters. I could run this query on an SQL Server 2008 too. What is the better way to do this. Edit: The list of Ids come from a C# program. No...

SQL Server Recursive query

Some days ago I asked a question on SO regarding help on a recursive query. The problem of that question was "How to get the history of a Person appointments". Now I am having a problem similar to that one but it should answer to a slightly different question: How to get an Appointment history? For example if Appointment with ID = 5...

Access Project Recognizes Schema as NetworkID

I created a new MS Access project against a SQL Server 2008 database using windows based authentication. (UPDATE: Now using Login Credeitnals, same results though) I have some tables in the (dbo) schema and some I made in a (prj) schema. In the access project itself, prj is not recognized but the dbo are. Looking at the access table l...

Read data from SqlDataReader

I have a SQL Server 2008 database and I am working on it in the backend. I am working on asp.net/C# SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { //how do I read strings here???? } I know that the reader has values. My SQL command is to select just 1 column from a table. The column contains str...

SQL 2008 Express & Intellisence?

Does the SQL 2008 Express have intellisence? ...