Sunday, July 28, 2013

[SQL 2012] Database import from text/csv file and many to many relationship

[SQL 2012] Database import from text/csv file and many to many relationship


Database import from text/csv file and many to many relationship

Posted: 27 Jul 2013 06:45 PM PDT

I have a Windows SQL Server database with a many-to-many relationship between some articles and categories, the relation is made by an ArticleCategorie table with two columns => [ArticleID] - [CategorieID].The problem now is that I have a CSV file which look like this (*picture) with two columns article id and article tags (let's say the article id is 5; and that it has 4 different categories which has respectively id 1,4,6 and 7) so here is how the CSV looks like* =>[img]http://i.stack.imgur.com/6ZdNt.jpg[/img] The best way I found was to manually add to the table all data (articles + categories) like this :[img]http://oi40.tinypic.com/2h4x2s6.jpg[/img]So this is above the final result that I want. Unfortunately I have more than seven hundreds articles, and can't find any faster way to import them, any solutions ? How can I import my data in a fast way? Maybe I could go for a better database design ?

Cannot find Maintenance Plan folder under Management 2012

Posted: 27 Jul 2013 08:40 PM PDT

HiSomebody installed SQL and I am trying to set up a back up job but I dont see a maintenance plan folder under Management. How do I get that installed? Is it true that the Express edition doesnt come with a backup/maintenance plan option?Version is: Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) Dec 28 2012 20:23:12 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)Also I read in some forum the following query and running this returns no records:Use msdb;Select SP.name, SP.folderid, SPF.parentfolderid, SPF.foldernameFrom dbo.sysssispackages SPLeft Join dbo.sysssispackagefolders SPF On SP.folderid = SPF.folderidWhere SP.packagetype = 6;

IP addresse blocked for a specific database in the same named instance

Posted: 27 Jul 2013 05:54 AM PDT

Dear all,Please can you help me? I have a big problem with SQL server 2012 installed on the windows server 2012 :I have three Databases on a named instance 192.168.1.1\BIOUGNACH2012SP1 and some time the end users try to connect to one of the three databases (for example to the first company: Biougnach équipement) but the connection failed, for the two other databases it's work correctly. So I change just the IP address of the machine(end user) to a new one and when I try again the connection work correctly.for more information :- when the machine is blocked I ping on the server address and the ping work correctly.- I have disable firewall on the windows server 2012.- The application connected to 3 databases (3 company) in the same server and named instance.- I use the same connection string in the application, I change just the database Name, I use the same user/password for the three databases.Please Help me.

How to show the last approver in a path? need help please

Posted: 27 Jul 2013 04:24 AM PDT

Dear friends ,Being new to sql, needed help on a urgent stuff-The requirement is for field called "Final Approver"-I nee to Show name of last approver in req approval path. E.g., say the following are listed as approvers in this order: Caldwell, Walter; Rondini, Joe; Zuccaro, Leo. Then This field should show Zuccaro, Leo. thanksDJ

No comments:

Post a Comment

Search This Blog