Looking For Some Guidance From A Kind Person

Apr 4, 2008

I am gonig into interview for a junior developer position. The role involves a lot of SQL based work. Training is on the job, and they know I am new to this, but they want to know what I can do with SQL server by wednesday, and obviosuly I stand a better chance if I can do a reasonable amount by then.I am assuming I can practise with offline databases, so I would like to do that. Also I was wondering if there were any simple example databases I can load up.

I have downloaded and installed the software, and would like to know how to connect and create a test database.
There will be a small test in the interview and the questions are:
1. SQL Management and Data Extraction
For this task you will need to be familiar with database tables, data types and constraints. There will be some administration work using SQL Management Studio along with some T-SQL queries. You will need to show use of the SELECT, INSERT, UPDATE and DELETE statements. If you do not have SQL Server, you can download the express edition for free at the following URL. http://msdn2.microsoft.com/en-us/express/bb410791.aspx


2. XSLT
For this task I will be asking you to produce some HTML output displaying the data from an XML file. The concept is similar to ASP.


3. Database Design
You will be given a scenario for a company that requires some database software for the smooth running of their organisation. You will need to plan and design a data structure to accommodate these requirements. You will be allowed to spend as much time on this part of the test as you wish. Key information here is going to be database normalization.




These questions dont make a whole lot of sense to be at the moment, so would appreciate a breakdown in simpler terms.





This job will be a fantastic opportunity for me to get into development, and would appreaciate any help that you guys have to offer, thanks in advance.

View 21 Replies


ADVERTISEMENT

Need Some Guidance!

Jul 14, 2004

I have been trying to rescue my company's helpdesk database because the company moved premesis and we lost that particular server.

It was originally running SQL Server 6.5, and my line manager simply copied the database.DAT files straight out of the MSSQLData directory without running a backup through Enterprise Manager.

Does anyone know how i can rescue these files so that we can get our helpdesk up and running again?!

thanks in advance for any help you can provide.

View 14 Replies View Related

NEED HELP And GUIDANCE!

Jul 20, 2005

I have a HUGE project (at least for me) and need some guidance.I am trying to create a database for a local university movie clubthat allows users to input there basic personal information (name,address, telephone number) as well as movies in there collection. Themovies will be categorized by genre (comedy, romance, horror, etc.)and title. I want to be able to let the users add and remove moviesto their list of movies they own, I'll call it "MOVIES I OWN".The user will also need to be able to create a SECOND list of moviesthey would like to see, again they can choose by genre and title.They need to also be able to add and remove from this list also, i'llcall it "MOVIES I WANT TO SEE".The last part of the project will be to match the users of "movies iwant to see" with "movies I own" users. It will be displayed on thelocal university website when the user logs in and will alert the userto the match. If there is a match at a later time, maybe the user canbe emailed? Also if there is a match, perhaps the two movies can betaken off record after the user acknowledges the match. I would needit to be able to handle a small amount of users now logged in at thesame time , but would like for it to eventually handle several hundredusers logged on at the same time in the distant future with outperformance problems.I am not sure if sql 2000 is the best to get this done or perhapsoracle. I am currently trying this on mySQL with PHP but currently amlost in a forest of data. Any guidance suggestions will be greatlyappreciated. I am pretty new to this so please be kind...

View 3 Replies View Related

Need Guidance

Oct 9, 2007

Hi Guys
I'm new to this Forum and I downloaded SQL express advanced today, I'm more a network secuirty but I wanna save my company some money in create and quoting system and will work in the travel arena. However I'm not sure what querying program to use to pull quotes out and have options to email them as well. This would be the client side part, which records data.What program could I use to do this???

View 3 Replies View Related

ETL Guidance

Sep 6, 2006

Hi,

We've decided to use SSIS for an ETL type project. We are going to convert some files to our special flat file format. Our special flat file format will not change, but we will need to convert about 40 different style flat files into this format. We will receive any of these files at random intervals. We will likely have to add more file formats to the 40 at some point, too.

I'd like to use a flexible design, but I just started with SSIS and its going to be hard to test all the possible combinations, so I hope I can find some guidance in this forum.

What would be a good approach to allow for the most reuse of work to support these various file formats?

View 4 Replies View Related

The Top Sales Person?

Dec 26, 2006

I am quite newbie, really grateful for some help how to create a sql sentence in Reporting Services that would return the best sales person from each shop.. The following returns all the sales persons from each shop

So how to select the top sales person from each shop?
SELECT TOP (10) shop.name, SUM(Cd.Price) AS Sales, Personal.Name AS Salesperson
FROM Purchase INNER JOIN
Personal
ON Purchase.Salesperson_id = Personal.Personal_id RIGHT OUTER JOIN shop
ON Personal.work_id = shop.shop_id FULL OUTER JOIN
Cd ON Purchase.Cd_id = Cd.Cd_id
GROUP BY Shop.Name, Personal.Name
ORDER BY Sales DESC

Or something like this? But how in Rep.Services???

...LEFT OUTER JOIN (
SELECT P.work_id, P.Name, SUM(C.Price) AS TotalSale
FROM @Personal P
INNER JOIN @Purchase B
ON B.Salesperson_id = P.Personal_id
INNER JOIN @Cd C
ON C.Cd_id = B.Cd_id
GROUP BY P.Work_id, P.Name
) D
ON D.Work_id = S.Shop_id

View 4 Replies View Related

Guidance Needed

Sep 20, 2007

Hello Dear Forum! I am new to this web. I am now days working with .NET Tecs especailly ASP.NET. I have developed a small school system in which i used  SQL MDF file. I want to know about its approach if they want to make it online. and one more question, is MDF file is best for more than 10,000 Students? Can i convert the MDF into normal table format like SQL Server 2005 , i am using SQL Server Express.
Take Care.Wating for reply.
Developer
 

View 4 Replies View Related

In Over My Head And Need Guidance

Aug 24, 2007

I am the IS manager for a medium business. I am also the DBA and the programmer and help desk and trainer etc etc.

In 2003 I embarked on a project which went live in 2005. We contracted to have our order processing system rewritten into SQL. I went from a character based 4GL language called Progress running in a UNIX enviroment to a knock down, drag out, full blown microsoft solution. I have been operating this new system for two years making modest enhancements and improvements as my skills with microsoft are increasing and improving (retraining my brain to think objects)and hiring contractors to do the really cool fun stuff.

I have to learn Server 2003, SQL Server 2005, SQL Express, T-SQL, Replication, Reporting Services, SSIS, IIS, DTS, Visual Source Safe, Visual Studio, VB, C#, ADO.NET and the .NET Framework fits in here too although I don't really know where.

I hope you are starting to understand my feeling of being 'in over my head'. Right now everything is running perfect. I do backups, restore them and create new reports. Basic stuff.

On top of this our company has merged with a larger one and this bigger company does not have a microsoft solution. They have an AS400 home grown application that I do not want to learn. I will not go backwards!!!!! I will loose my job/position in the next couple of years. I want certifications (to get that interview).

I just don't have the skills to back up the certification (I don't want to be one of those exam cram people) I do a plethora of unrelated taks all day long. Not because I have to do them I choose to do them. I like both DBA and Programming.

So, if you were me, and could get certifications and have experience to back them up what would you do first?

View 4 Replies View Related

Guidance From The Gurus.......

May 2, 2007

Greetings All,



I have a SQL2005 table that I'm needing to export to a 'formatted' csv flat-file to emulate a mainframe output. I'm new to SSIS so don't beat me up to bad... The current output of my ssis csv file is as follows:



95752,95725,0001,0, ,N
11473,8704,0001,0, ,N
1279215,436612,0001,0, ,N
43595,43592,0038,0, ,N



and I need to get to here:



95752 ,95725 ,1 ,0 ," ","N ",0

11473 ,8704 ,1 ,0 ," ","N ",0

1279215 ,436612 ,1 ,0 ," ","N ",0

43595 ,43592 ,38 ,0 ," ","N ",0



Basically I need to pad the first 2 columns with trailing spaces to a fixed width of 11 characters, 3rd column convert number format and pad to fixed 5, 4th column pad to fixed 3, 5th column add double quotes around 20 character fixed. 6th column add double quotes around and pad to fixed 2. Finally adding a , 0 to each row which is used a LF/CR.



Any feedback in regards to getting pointed in the right direction would be greatly appreciated...

View 5 Replies View Related

SSIS Guidance

Apr 10, 2007

im trying to convert a sql stored procedure to a ssis project as part of a learning experience, however, im not sure where to even begin. im looking to see if someone can help my find my footstep.



basically, the sproc looks through a table and pulls two fields into a cursor, there is a third field, the where clause is if say that field is greater than 1.



basically the first field it pulls is the name of another sproc to run, and the this field says if i want to execute that sproc or not. so i want to rewrite this sproc in ssis to go through the table, and execute each sproc name based off of the first table.



my initial ssis thought was to add a for each loop, but i couldnt figure out how to go through the table. anyone offer some help on how this could be done? thanks

View 3 Replies View Related

XML Source - Guidance?

Jul 12, 2007

I have a large (4 GB) xml file. I use the SSIS XML Source, generate an xsd and conversions/destinations and this does a great job of creating the multiple outputs including cross reference tables with autogenerated id's (I have no script task or component, so they must be auto). These load nicely into the six tables.



The guidance I seek is what should I do for the next xml source file as it will be an incremental data addition to the base file. I don't see any obvious way to keep the package from autogenerating id's that may conflict with the existing ids.



Am I missing the obvious? It may be, as I am enjoying SSIS, but I am not an expert at all. I can post pertinent items if needed.



Thank you for any guidance.

View 6 Replies View Related

SQL 2005 32-bit Vs 64-bit Guidance

Mar 17, 2007

What some good reasons to select 64-bit rather than 32-bit for SQL Server 2005?

We are preparing to install a very large SQL Server 2005 cluster. Initially, the primary database is estimated at 1 Terabyte, with 5 more databases that will add up to another Terabyte. After a few years, the estimate jumps up to 20 Terabytes for the largest DB and another 20 for the other five, combined.

We've made the assumption that a database this large, with up to 1000 concurrent users, that this is a good candidate for a 64-bit installation. And that we're better off starting out with 64-bit, rather than migrating later.

Can someone provide some guidance?

View 1 Replies View Related

MY HELP!!!!! Request.....ONLY 1 Person Reply.

Oct 15, 2007

I can believe it, 40 people read my sql query problem and ONLY ONE reply to my request for help.

Thanks!!!! It's great to know that we help each other in this community.

View 1 Replies View Related

Role/Person Table?

Dec 6, 2005

We're developing an application request/packaging/rollout worflowapplication for our 50 site, 40,000 user company. There is a requesttable, an engineering table, a distribution table, etc. etc. But, thecompany has a designated "Application Owner" at each site, and eachperson who will use the application must also be listed in the workflowapplication. So, we need a lookup table for the owners and users:CREATE TABLE REQUEST (RQ_ID INTEGER NOT NULL,RQ_BY_ID INTEGER NOT NULL,RQ_FOR_ID INTEGER NOT NULL,ASSIGNED_ENGINEER_ID INTEGER NOT NULL,OTHER INFO...);CREATE TABLE APP_OWNERS (RQ_ID INTEGER NOT NULL,OWNER_ID INTEGER NOT NULL);CREATE TABLE APP_USERS (RQ_ID INTEGER NOT NULL,USER_ID INTEGER NOT NULL);There are many other tables, of course, some with single person IDfields and addititional lookup tables where there are multiple peopleinvolved like testers, package distributors, etc. I began to wonder,why not just a single table to cover ALL the people involved:CREATE TABLE RQ_WORKFLOW_PEOPLE (RQ_ID INTEGER NOT NULL,PERSON_ROLE VARCHAR(20) NOT NULL,PERSON_ID INTEGER NOT NULL);INSERT INTO RQ_WORKFLOW_PEOPLE (rq_id,person_role,person_id) values(123456,'RQ BY',314159),(123456,'RQ FOR',951413),(123456,'APP OWNER',159413),(123456,'APP OWNER',413159),(123456,'USER',594131),(123456,'USER',313459),.....The real question I have is how does one evaluate options like this?The good news, I think, is that where I simply must have crossreference tables because of multiple values (application owners, users,testers, etc.) I've reduced the number of those tables to one byspecifying a single table by role. Is that a good thing or a bad thing?I've also removed similar data from several other tables where only asingle column was needed in those tables, i.e. the requested by andrequested for fields, the assigned engineer, and several others. Thereis one and only one of each for each request but the type of data, thatis an employee ID is exactly the same, so does it make more "sense" tokeep the data with the request table or the engineering table orconsolidate all ID data in an ID table?Any thoughts on this woudl be appreciated.Randy

View 2 Replies View Related

Selecting First Transaction Per Person

Jan 17, 2008



Hi

In a transactions table, I need to get the record for the earliest transaction date for each person or account. So far I've been doing it in 2 steps (below). Is there an easier way to do this?

Thanks

Dannie

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

SELECT

Person_ID
Earliest_Transaction_Date = MIN( Transaction_Date )
INTO

Earliest_Transaction_Dates
FROM

All_Transactions
GROUP BY

Person_ID

SELECT

b.*
FROM

Earliest_Transaction_Dates a
LEFT OUTER JOIN
All_Transactions b
WHERE

a.Person_ID = b.Person_ID
and b.Transaction_Date = a.Earliest_Transaction_Date





View 3 Replies View Related

Need To Get Separate Pages For Each Person..help

Dec 21, 2006

I'm fairly new to RS and have a problem.

I have a query that pulls information on people, courses they have taken, their score and so on. I have a date parameter setup so I can run it by year. Everything works ok on the query side, I get all the information I need on all the people and the courses they have taken. However, when I run the report, I do not get a separate page for each person and their relative information. The first page shows the first name and the rest of the 700 pages list all the courses and other information, with no break. How do I render the report so that I can get a separate page(s) for each person and their specific info? I can glady provide more info/code if need be.

Bill

View 8 Replies View Related

Getting A Final Version Of A Person Into A DW

Feb 14, 2007

I have about 8 databases to integrate. All of the databases have ssno, address city...ect. I need to create a DW table with one unique record for each actual person. In other words,

Joe Smith,123 Main St, Anytown, State,....+ssno

goes into the DW table and is the same person as Joseph S. Smith,123 Main Street... and any other versions.

Could someone point me to a reference or give me an outline of how to do this in and SSIS package?

Is fuzzy logic used here?

Do I need to deduplicate the feeder systems first??

It needs to handle a situation in, for example, the Bronx New York where there could be an apartment buiding with 7 people named Jose Sanchez .

I hope I've been clear, I'm a newbie at this DW stuff, but it's fascinating. Any help would be appreciated. Thanks

View 1 Replies View Related

Constraint Conflict, Could Use Some Guidance!! Plz.

May 20, 2008



alter table consumers

add check (zipcode like( '[0-9][0-9][0-9][0-9][0-9]'))

the datatype is char(5)

error message:

The ALTER TABLE statement conflicted with the CHECK constraint "CK__Consumers__Zipco__4316F928".


Based on this message, i would think that there is another constraint, however the build script does not have any constraints. So i am somewhat confused.

View 6 Replies View Related

General Guidance Via Skype Etc

Apr 5, 2008

I know I already have an open thread and this is naughty, but just digging my other into a hole.

As stated in my other thread I am going into interview next week for a junior developer role, and they want to know as a test what I can find out and achieve with SSMS.

I would really appreachiate it if someone could give me some of their time to answer a few questions and guild me though the very basics. Either via MSN or Skype or something, sometime this weekend, as I really want this job on wednesday!

Thank You!

View 3 Replies View Related

XP_CMDSHELL -- Microsoft Guidance On Using/not Using

May 30, 2006

Is there any guidance on using Xp_Cmdshell from the SSIS team at Microsoft? We're needing to remotely execute SSIS packages on the server where MS SQL Server 2005 is installed.

FYI, I've researched this heavily and know about the common ways--re: Using SQL Agent or the Microsoft.Dts.Runtime library in .NET with a web service etc.



View 10 Replies View Related

How To Get User Name Of The Person Loged In To The System In SQL

Sep 27, 2007



Hi,

I have written a trigger for audit trail of one table in SQL and it has to get the user name who is doing the changes from the application(.net)
I have used the SQL user name and password while connecting the .net application to the database, and because of this whoever log in to the application and make changes on that table data, in the audit trail it still shows as the database user name.

I want to display the user name of the person logged in to the application

In the query i am using "System_user" for getting the user name. And the connection string in my application has a default uid and pswd.

I want to retain uid and pswd in the connection string but still want the query to get the name of the correct logged in user to the application.

Can anybody say me if this possible.

Thanks
Gayathri.

View 3 Replies View Related

New - Learning By Code Examples - Need Guidance

Feb 25, 2005

Hi

I'm learning by going through the tutorials and such and modifying the code to try and learn how to do more and different things.

I have a MSDE Database, and I'm building a query from the WebMatrix Code Builder.

I can get a Select and Where to work on a "Category" colum as String; to return from a text box control (where I enter the name) and on button click.

What I would like to learn how to do and am having trouble is do a select Where "Category" (string) and "Status"(Int) are the same.

I have two Seperate Textboxes after i make the Where / And Query, but I'm not sure i have the button click code right.

I have included the code below - Sorry if this is so basic ;-) - The Sub_Button1 Click is at the end.


Function ShowRecords(ByVal category As String, ByVal status As Integer) As System.Data.DataSet
Dim connectionString As String = "server='(local)'; trusted_connection=true; database='SalesContacts'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)

Dim queryString As String = "SELECT [Contact].* FROM [Contact] WHERE (([Contact].[Category] = @Category) AND ("& _
"[Contact].[Status] = @Status))"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

Dim dbParam_category As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_category.ParameterName = "@Category"
dbParam_category.Value = category
dbParam_category.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_category)
Dim dbParam_status As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_status.ParameterName = "@Status"
dbParam_status.Value = status
dbParam_status.DbType = System.Data.DbType.Int32
dbCommand.Parameters.Add(dbParam_status)

Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)

Return dataSet
End Function

Sub Button1_Click(sender As Object, e As EventArgs)
DataGrid1.DataSource = ShowRecords(CStr(TextBox1.Text)&(CInt(TextBox2.Text)))
DataGrid1.DataBind()
End Sub

View 4 Replies View Related

Some Guidance For An SSIS Newbie Wanted

Apr 27, 2006

Hi!

I'm new to SSIS (and quite new to SQL Server). I have a process which I'd like to automize via SSIS - just don't know how and couldn't figure it out yet by playing around with the program. Shouldn't be too difficult though.

First of all, that's the process as I do it now:

1) Load several flatfile sources (dumps of SQL tables) into an SQL database.
2) Add identifier rows (to some tables), set the primary and foreign keys so the database is "recreated" and I can work on it.
3) Do several simple transformations, aggregations and selects across tables and finally write a new table containing information for reporting stuff.

I succeded in loading flatfiles within the data flow view, doing some transformations and saving the output to a flatfile. What I didn't find out: how can I "recreate" the database enabling me to perform "SELECT/FROM/WHERE" statements across tables? Will I have to write the imported files to tables within a db (how?) or can I avoid this step?

A little guide (newbie friendly) would be great help!

View 11 Replies View Related

Career Guidance In Data Mining

Jan 2, 2008

Hi Can someone give me proper guidance .I am a data warehouse architect with 13 years in IT.
What are the prospects if I move to data mining.Will it be wise decision to add data mining.
Please guide.

View 3 Replies View Related

Simple SQL Server Stuff For An Oracle Person...

Jul 27, 2006

I'm trying to do some basic stuff in SQL Server 2005 that I could do in Oracle.  I'm sure there's a way to do these things, I just don't know how.  My most immediate question is this:
Is there any easy way to run a SQL script and have it spool to HTML tables to a file?  The 'results to text' from SSMS is not adequate for display purposes.  I'm trying to display table/column descriptions.
Beyond that, does anyone know of any good resources that provide an 'Oracle to SQL Server' matrix so I can help figure out how to do some of these things in SQL Server?
Thanks in advance,
Mike

View 1 Replies View Related

SQL Server Triggers- New Person -Help Required-Urgent

Mar 10, 2008

Please help me in sorting out my Problem Providing me the solution .
My Problem is
I have a master table with Primary key on ID field (PatientID-(Patient-Table)) and it is an Identity field
And My child table has the same ID field(PatientID-(PatientDetails-Table)) and it has the relationship set
And the child table has its own Primary key of its own ID field(PatientdetailsID).
What I want is as soon as enter row of data into the master table (Patient-Table)and click save on my front end application(Which is ASP.Net web application)
I want to update Child Table’S (PatientDetails)ID field ( ie.,PaientID in the PatientDetailsTable) in the  Child Table   which relates the parent table ,by doing so I want to  update the Primary key field (ie.,PatientDetailsID)  & ForeignKey Field (PatientID)of the child table and to create row  in the child table  with two columns .(PatientID,&PatientDetailsID)
What I want to achieve is in my ASP.net Application as soon as I enter Master table
I want to Edit Child tables (about 15) one by one like a Wizard pages which will have The ID Field(PatientID) same in all my wizard pages .
I want to know whether I can incorporate triggers if so in which table (is it in Patient or PatientDetails) and I will be grateful If anyone gives the Script to-do  so.I am also providing my two table sripts.
Sripts:CREATE TABLE [dbo].[Patient](      [PatientID] [int] IDENTITY(1,1) NOT NULL,      [Date] [smalldatetime] NULL,      [UserID] [int] NULL,      [FirstName] [varchar](40) NOT NULL,      [Surname] [varchar](30) NOT NULL,      [DOB] [datetime] NULL,      [Age]  AS (floor(datediff(day,[DOB],getdate())/(365.25))),      [Sex] [varchar](10) NULL,      [Occupation] [varchar](30) NULL,      [Ethinicity] [varchar](60) NULL,      [HomeTel] [varchar](15) NULL,      [Mobile] [varchar](15) NULL,      [varchar](40) NULL,      [AddressLine1] [varchar](30) NULL,      [Line2] [varchar](30) NULL,      [Line3] [varchar](30) NULL,      [City] [varchar](20) NULL,      [PostCode] [varchar](15) NULL, CONSTRAINT [PK_Patient] PRIMARY KEY CLUSTERED (      [PatientID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY] GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[Patient]  WITH CHECK ADD  CONSTRAINT [FK_Patient_User] FOREIGN KEY([UserID])REFERENCES [dbo].[User] ([UserID])GOALTER TABLE [dbo].[Patient] CHECK CONSTRAINT [FK_Patient_User] CREATE TABLE [dbo].[PatientDetails](      [PatientID] [int] NOT NULL,      [PatientDetID] [int] IDENTITY(1,1) NOT NULL,      [Date] [smalldatetime] NULL,      [NHSNumber] [varchar](12) NULL,      [HospitalRefID] [varchar](10) NULL,      [Ovaries] [varchar](15) NULL,      [ReportFromGP] [image] NULL,      [LMP] [datetime] NULL,      [DateStopped] [datetime] NULL,      [Comment] [varchar](150) NULL, CONSTRAINT [PK_PatientDetails_1] PRIMARY KEY CLUSTERED (      [PatientDetID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[PatientDetails]  WITH CHECK ADD  CONSTRAINT [FK_PatientDetails_Patient] FOREIGN KEY([PatientID])REFERENCES [dbo].[Patient] ([PatientID])GOALTER TABLE [dbo].[PatientDetails] CHECK CONSTRAINT [FK_PatientDetails_Patient] 
I want to incorporate this through database level .
I am using SQL Server2005-Express
Although  Iam using ASP.net C# I am new and I will not be able to do this in my front end.
Please help me wth the solution.
thanks
rameshs_2000

View 4 Replies View Related

Query To Retrieve First Names Of Person Where Last Name Is John

Dec 16, 2013

I need a query which retrives the firstnames of the person where last name is john. I am considering the performance as the main factor.

Is there any better query than the following?

Select firstname from tablename where lastname='John'

Considering performance as the major factor....

View 2 Replies View Related

Cannot Add Select User Permission For A Person On A Table

Feb 24, 2008



Hello,

I am trying to grant solely the SELECT privilige to a particular user and to a particular database.I am using Sql server management studio express to do this and SQL Server 2005.

I have created a new login and set the server roles to public, then on the user mapping page, I have checked the box next to the table I wish the user to access and have selected the database membership role - public.
Next, On the Table Properties, I have added the user on the Permissions Page and Selected "Select" under the grant column

When I click on effective permissions, the select command does not show and when I try to login with that user, the table does not display.

What I am doing wrong?

Thanks

View 7 Replies View Related

Database Administration/Maintenance - Guidance Needed

May 16, 2006

I have been working SQL server for many years as a web developer, however in my current position we are lacking an expert in maintenance and admninistration as the company has recently switched over to SQL Server 2005.

I therefore need to develop a greater understanding of the best practices with regards to administration and am a bit lost as there are so many options which seem like they might match my requirements. As I have never looked beyond the basic administration/maintenance side of things before I have no idea which options to investigate.

Basically I want to clear any records older than 3 months old on a scheduled/automatic basis. There seem to be various options that could do this, however I want to know what the best option is, rather than waste a lot of time and risk problems by resorting to trial and error.

We are already backing up this data, however I am not sure if I should combine these tasks. It is highly unlikely that we will ever have to restore these older records, however we do need to store the data for legal reasons.

I dont expect anyone to tell me everything, as I am happy to investigate, I just need a nudge in the right direction.

Thanks

maw

View 3 Replies View Related

Need Help With Stored Proc. Pretty Simple For An Experienced Person

Sep 6, 2007

Can someone help me rewrite this query? Basically I need to check if the name stored in "CustomerName" already exist in the table "Renter". If it does not then I ncan insert the new customer name
into the data table "Renter". If the value in "CustomerName" already exists in the database, then I need to bypass the "INSERT" and somehow return a value indicating that the insert was not performed. How can I do this. Here is the
query I currently have for performing the insert.
CREATE PROCEDURE [dbo].[VacancyGet]
(
@CustomerName nvarchar(100),
@ClientCode nvarchar(10)
)
AS
INSERT INTO Renter
(
CustomerName,
ClientCode,
)
VALUES
(
@CustomerName,
@ClientCode,
)
 

View 1 Replies View Related

Guidance Needed: Loading Hierarchical XML Into Relational Tables

Aug 8, 2007

I've got a lot of XML like this (simplified):




Code Snippet





... 8 MORE


... 9 MORE TIMES






I need to get this into three existing SQL Server 2005 tables, each with identity columns for their primary keys:




Code Snippet
CREATE TABLE ELEMENT1 (

[ID] INT IDENTITY
)

CREATE TABLE ELEMENT2 (

[ID] INT IDENTITY,
[ELEMENT1_ID] INT
)

CREATE TABLE ELEMENT3 (

[ID] INT IDENTITY,
[ELEMENT2_ID] INT
)





With primary and foreign keys as you'd expect, and, of course, many more columns!

How would I get this into tables through SSIS, preferably in a high-performance manner (there may be several gigabytes of XML to load).

The issue, of course, is that in order to insert an ELEMENT2 row, I need the ID from the coresponding ELEMENT1, etc.

Any ideas or pointers to articles would be welcome.

View 14 Replies View Related

DTS .ini File Versus SSIS XML Configuration - Guidance Needed.

Apr 25, 2008

Hello

I've been given the task of migrating a DTS package to SSIS (neither of which I am particularly familar with). The first job in the DTS package is to read a .ini file and set a bunch of variables. These variables are then used throughout the DTS package. After running the DTS package through the SSIS migration wizard this job turns into an execute script task and I can't see if it is still reading the .ini file. However, the only real purpose of this step is to allow different parameters to be passed in development, test, production etc. So I am thinking this whole step can be removed and effectively replaced with a package configuration (I'll probably use an XML file). My understanding is that by selecting the name/value pairs as appropriate in the XML package configuration file means this values will be passed in at runtime and achieve the same functionality. Is this the correct way to do this in SSIS, or do I still need the .ini file and variables?

Thanks for any advice on this issue.

Regards, John

View 7 Replies View Related

Windows 2003 - SQL Server Bug? REWARD To Person Who Fixes This Problem!!!

Dec 20, 2003

Hello.

I am about at the end of my rope. My ISP (MaximumASP) has recently upgraded to Windows 2003. I have an application written in .Net / C# that has been working for almost a year now with no problems. The day they upgraded to Windows 2003, that all changed. Upon accessing a page (ANY page) that opens the database (SQL Server) an error occurs INTERMITTENTLY. The error is:

Specified SQL Server not Found

Go to this link for the full error and Stack Trace: http://www.acob.com/SQLError2.gif

Keep in mind this NEVER happened before 2003 (same exact code, no changes) AND it will NOT happen for hours at a time (same page, same code), then BOOM! If we wait about 10-15 minutes or so, the page (EVERY page that accesses the database) works again and no error. This happens about 2-3 times within a 24 hour period. I can also RESET the web application (server) and the error disappears immediately.

I have gone through ALL of my code to make sure I am EXPLICITLY closing my data connections. This problem was MUCH worse when we were using the .Net 1.1 Framework AND Windows 2003. Reverting BACK to .Net 1.0 has alleviated the problem somewhat - but not entirely.

Does ANYONE know of any bugs, problems, whatever in Windows 2003 that may cause this. It seems as though there is a Connection Pooling leak of some sort. But I cannot fix, what I cannot find. My ISP simply keeps saying - it's a coding problem. If I have code that works for over a year and then suddenly it doesn't - is it a coding problem??

I DISPOSE of the DataSet.
I DISPOSE of my Connection.
I CLOSE my Connection.
I DISPOSE of my SQLAdapter.

I do this cleanup everywhere I initiate a connection (all in one codebehind). Additionally, the code is very simplistic: Connect, Open, Select, Bind, Dispose, Close.

Does ANYONE know what this can be??

$100 to the person who solves this problem! (Server must run for one week after solution is implemented to collect reward).

Thanks!!
AtlMaddog

View 16 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved