Simple Sql Question For Creating Databse

Feb 23, 2008

hello experts,

i have to create a table for user with 40 fields.

these reuire one entry per user.

like his interest hobbies professinal... information.

do you recommend me create different tables or let it in one table

if in one table will it create any speed problem?

how many fields i should limit in one table.

 

secondly can i have my fields value initialized like int type to 0 and var type to space? is there any setting in sql for the same.

 

thank you allfor quick reply

View 2 Replies


ADVERTISEMENT

Simple Databse Connection

Jan 5, 2008

hello all
the problem with me,im for the first time using SQL Server and ASP,so i have little knowledge baout these two progs.i want to know how pages in ASP are connected to databse.
second, i installed SQL Server2005 along with asp from the same CD(option of instalation of both was available). There is also a way use SQL Server within the ASP Environment(addnew itmes>sqldatabase>).
Question: if i create a databse through above method. then how i will use it in asp.net.Although i can do it by draging "SQL Data sourcr" from "Data" category in the "toolbox"however, i want to manually connect the application to Db.Something like this
Page_load(0
{
//db connection code goes here.//sqlcommand goes here.
con.open()
}
 i want some controls like txtboxes and label to manualy connect to databse tables.
plz someone forward the code,
 

View 1 Replies View Related

Creating A Databse With Parameters

May 31, 2000

when i was trying to create a database like
CREATE DATABASE @dbname
i am getting the message
Incorrect syntax near '@dbname'.

is it possible to create a database like this
if yes how

Thanks alot on advance.

View 3 Replies View Related

Creating A Stored Procedure Not So Simple...?

May 21, 2008

I am using SQL Server Express within visual studio and am needing to create a stored procedure. The proble is that every time I finish and close it then it asks me if I want to save the changes which of course I want to.
But then it always comes up with a message box that says "invalid object name"  followed with the name of the stored procedure.
??? why? I try creating a stored procedure from scratch or copying the code of another stored procedure. It alway gives me that message and does not let me save the stored procedure. I tried changing the default name of "dbo.storedprocedure1" or even leaving it as is and always I get the message that says "invalid object name: dbo.storedprocedure1" and it does not let me save the procedure.
 What am I doing wrong?

View 5 Replies View Related

Creating A Simple Update Trigger

Jul 20, 2005

I am extremely new at SQL Server2000 and t-sql and I'm looking tocreate a simple trigger. For explanation sake, let's say I have 3columns in one table ... Col_1, Col_2 and Col_3. The data type forCol_1 and Col_2 are bit and Col_3 is char. I want to set a trigger onCol_2 to compare Col_1 to Col_2 when Col_2 is updated and if they'rethe same, set the value on Col_3 to "Completed". Can someone pleasehelp me?Thanks,Justin

View 7 Replies View Related

Simple Question Creating Duplicates

Aug 17, 2006

Hi,

I'm trying to create duplicates in a copy of a table in the same database by inserting rows from the original table. Seems easy but I can't get any sql to work. help?

View 13 Replies View Related

Simple Question - Creating Calculated Member For %

Dec 20, 2004

Hi,

As the users drill down one of the dimensions, I want to show the breakup of each sub member in terms of %age e.g.

Suppose total Sales are 300 and breakup is as follows:
Category A = $ 120
Category B = $ 65
Category C = $ 115


I want that when the user drills down to the 2nd level in the Products dimension (let's say this Level is called Category) then I want the %age of Sales for each category - all adding up to 100

So this is what I should get (for the desired % breakup)

Category A = 40
Category B = 22
Category C = 38


I'll appreciate your help in making such a Calculated field.

Many TIA.

View 6 Replies View Related

SSIS - Several Bugs In Creating A Simple Task

Dec 8, 2006

I was creating an SSIS package, seemingly simple. One of the tasks I needed to do involved copying our production database to a seperate DB instance for staging. I wanted an SSIS package that would stage production so we could push and test changes.

My first problem is that I tried to create a simple Transfer Database task. When I tried to run the task, I got an error stating that our Stored Procedure, DtsRun, could not be scripted. It's an encrypted stored procedure.

A little annoyed, I decided that I'd do a transfer SQL objects instead. Now I don't want to hard-code my objects to xfer based on the current schema and edit this SSIS script every time we make a DB change; I just want it to copy ALL objects except for my encrypted proc. I'll just build a list with with another task.

I decided that I'll write a script that generates a list of proc names, and I'll pass that to the Copy SQL Server Objects task. Well apparantly I can't assign a collection value with a script. I have to create ANOTHER package that modifies THIS package because (1) The entire package isn't exposed to the script task and (2) object variables can't be used in expressions.

Am I missing something? So because I use a single encrypted stored procedure, I have to write 2 fairly complex packages to copy my database? That's just stupid. I can understand if SQL can't move the encrypted package while the database is online. I could deal with that. But the extremes I have to go to JUST to copy my database are truly rediculous.

I was really excited about SSIS, but I've been really dissapointed. The performance of the designer on my machine is really poor (I have a Core T2700 with 2GB RAM). Just about every error message I've gotten, both design-time and run-time, I've had to google because they're so obscure. And if you can only store blittable types and strings in variables, that severely limits the functionality of a package (without going to programmatic extremes).

Most of all, I'm really dissapointed in the expression system, If the CLR is loaded into the SSQL/SSIS runtime, then why am I coding it using ANOTHER proprietary coding syntax???? I thought .NET was meant to keep people from having to redesign the wheel???

Microsoft is constantly pushing C#, yet I can only script in VB.NET, which means I now have code-bases in different languages.

Overall, I'm really dissapointed with SSIS. The usefulness of the added functionality in SSIS packages is shrowded by the massive list of nuances.

View 8 Replies View Related

Creating Simple Report Using Reporting Services SP2 And SharePoint 2007 Integration

Feb 1, 2007

I've been running around in circles all afternoon trying to create one simple report using Reporting Services (with latest SP2 installed) and SharePoint 2007. To the best of my knowledge, I have everything configured correctly:

When I access http://<server>/ReportServer, I see the server name of my SharePoint site.
When I click on the name of my SharePoint site, it shows me the directory structure I have created within my SharePoint Site
When I drill down in the directory, I can ultimately see the forms I created in my forms library (created via InfoPath 2007).

The next step is to create one simple report from the data in one of these forms libraries and a report on all the items within a form library. I'm stuck at the first step of creating a report, namely what to enter as the Data Source and the connection string. With a SQL database this isn't an issue.

How does one create a data source that will allow reporting over SharePoint content with the setup described above? And, if you have information that is found in the SQL Books Online, please be kind and post links so others know where to find this information.

View 5 Replies View Related

Simple Simple Linking Tables & Perform Calculation

Mar 22, 2007

found it

View 3 Replies View Related

Searching A Databse

Aug 31, 2006

i'm making a web page for a clinic.it needs to be able to search for patients by first name, surname, date of birth and patient number.i'm using visual web developer and i have my database, my data source and GridView grid.i want  4 text boxes for my first name, surname etc. when u click enter on any of them i want to retrieve all their data and display it in the gridview.at the moment i have  one text box on the web page and through the "Configure data source" option on the grid view i can retrieve the specified data but for only this one item, e.g. SELECT * FROM [Patients] WHERE ([DOB] = @DOB). if i add another text box to my web page, and don't do anything to it, the query wont run. if i add and "AND" statement to the query, e.g. SELECT * FROM [Patients] WHERE (([DOB] = @DOB) AND ([FirstName] = @FirstName)), again it won'r run or return and data. any ideas on what i can do or where i'm going wrong. thanks 

View 1 Replies View Related

New Databse - Notification

May 18, 2000

Does anyone know how I can receive some type of notification (an alert) that fires when a new database is created (or an old one deleted) on a server?

Thanks.

View 1 Replies View Related

Databse Replication

Sep 10, 2007

Dear All I've made transactional replication between two SQL 2005 servers.Everything looks fine, synchronization working fine, no errors, however size of replicated database file = 97 Mb,on Publications server the database file size = 184 Mb. What is wrong :S ? Best RegardsPiotr

View 5 Replies View Related

How Can I Create Databse?

Apr 6, 2008

Hi,
I had downloded MS SQL express from Microsoft. But i did not find any place from where i can create databse, table etc..

please help me regarding this.

thanks
Sabbir

View 3 Replies View Related

Connection To Databse

Jun 29, 2006

hi, im totally new to this sql thing.
i have a set of classes here and my objective is to show that they can connect to the database. how am i supposed to do this?

can i post my classes here? theres a lot..

View 8 Replies View Related

How To Clear The Whole Databse?

Apr 7, 2007

Hi, my database i am working on is full of crab, who do I clear all the tables info?

View 3 Replies View Related

Databse Creation

Aug 2, 2007

How to create a database in MS SQLserver 2005 express edition.
Pleae help me to get started.I have learned some SQL commands.
But i want to execute those in SQLserver 2005.But i don't know the procedure for creating a database.please help me on this.

View 5 Replies View Related

Designing Databse

Sep 21, 2007

Im creating a sample database for purposes of keeping track of employee's jobs + billing codes for that job. currently they just use an excel spreadsheet to keep track of billing.

Question 1:

What would be the easiest way for the manager to enter billing codes? Billing codes are numbers like 956, 958, 805 and they co-relate to prices for each billing code.

1. I want the manager to enter the billing code and have the sql database find out how much that code is and add them up daily. This would prevent the manager from having to input prices and billing codes, and extra step.

Any links on the above topic would be helpful. I'm not looking for anyone to spoon feed me code just point me in the right direction. Im relatively new to sql having only a class of sql @ ITT.

Heres the way I have the db tables laid out currently.

employee table
employee_id
technumber
fname
lname
address
workphone
homephone
trucknumber
officelocation

employeejobs table
employee_id
jobs_id

jobs table
jobs_id
codes
date
timeframe
city

hours table
hours_id
employee_id
hoursworked
month


Any info would be much appreciated, Im going to go find a sql book now ;).

View 1 Replies View Related

Databse Offline

Jul 20, 2005

hi everyoneCould someone please help me in following:One of my database in SQL 2000 going Offline automatically. When ibring it back Online its Ok for 20/30 minutes and then again appear asOffline. I had similar problem when one of the database keep going to'Single user' automatically.Any idea what happening.Thank you*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 1 Replies View Related

Add A Second Databse - Benefits?

Jul 20, 2005

Hi, there is an existing application running on a SQL Server database.Now I have to built a different app, which will have two common tableswith the existing database (Customers, sales)Is there any benefit (performance mainly) creating the tables for thenew app in a new database? (On the same machine and the same instance)*** Sent via Devdex http://www.devdex.com ***Don't just participate in USENET...get rewarded for it!

View 3 Replies View Related

Lost Databse

Jun 21, 2007

I went and detached a database. It is no longer showing in EM. I try to attach the database and I do not have any MDF files anywhere on my PC. Where did my database go when I detached it? How can I get it back. Please help.



Thank you

View 6 Replies View Related

How To Transfer Databse ..

May 7, 2007

Hi,

I am doing one E-commerce Application , throgh C#. & sql server express editon. Both my Local & Web Hosting servers are in sql server express 2005. I designed Databse Throghly, to my local server. Now I want to Transfer tables to my web server. I have already Sql server mangement studio Express. I can not do.. I spent, more than 5 yrs time..

Please help asasp..

Thanks

Partha

View 1 Replies View Related

Restoring A Databse

Oct 4, 2006

I have a system running on SQL Sever and i am trying to create a second file on a diffrent computer so that I can teach people how to use sql sever (express) without risking losing any data that I have on my proper database.

I have created a backup of my database which is in a dmp file and I would like to import this into SQL Server Management Studio Express so that I can make changes to the databse without affecting the one that is running on my website.



Cheers for any help

View 10 Replies View Related

How Do I Create A Databse Link?

Nov 6, 2006

I would like to run some queries  on two tables that reside in two different database (located on the same server). The databases are both MS SQL 2000.How do I create a database link (or a table link??) so that I can create the queries from the Enterprise Manager or the Query Analyzer? Thanks a lot, Christian 

View 1 Replies View Related

2 Connections To The Same Databse Is Not Allowed?

Dec 1, 2006

I am using the SQLEXPRESS database, and connect from to locations:

Windows Service
ASP.NET web application.
 
whenever I start the windows service I get the error: Cannot open user default database. Login failed.
so I am going to visual studio and close the connection. then I close the web browser, and the windows service succeed connect to database.
but then, after windows service is connected, I open the web browser application and fails to login because the login system using the same database of windows service, and since the connection is being used by windows service, login is impossible.
 
Do you know how I can allow 2 connections at the same time for the same database?
what are the risks to do that? and how do I handle this risks.
thanks alot 
 
 
 

View 3 Replies View Related

Unable To Access SQL Databse

Mar 2, 2007

Hi,
I have a SQL Server 2005 Express database dbase.mdf which I cannot access. It works fine in VWD and the development server using the following connection string: String connectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dbase.mdf;Integrated Security=True;User Instance=True"But when the site is not on the development server but on IIS, I get a SqlException saying "User does not have permission to perform this action." when I execute the connection.Open() command. I find it extremely frustrating that something which works in the development server fails on the real server. Can anyone help me with this? Do I have to change my connection string, or perhaps set some permissions...I have already given the IUSR_MACHINENAME account and the ASPNET account full access to dbase.mdf. Surely this must be an issue that lots of people deal with... How do other people manage to log to access databases? Any help would be much appreciated.  Thanks,P1000

View 4 Replies View Related

Updating Databse Thru Datadapter .................

Dec 27, 2007

can any body tell me how to update the database thru dataadpater ???????
and another imp thing.........
if there r 2000 rows in database ..........and updation of 2 rows takes place
i want that whole of the database should not be updated ......only those two rows are updated
 
Can any one help me please??????
thanks in advance

View 1 Replies View Related

How To Know Existence Of The Data In The Databse

Jun 9, 2008

Hi Friends,I have one table in the databse,i.e userTable with one field userNameIn my form I have one Label ,textbox for entering the userName and One button for submit,So I am entering the data into the table(userTable) after clicking on the submit buttonBut my problem is before entering the data into the table I want to find wheather the given data exits or notif its not exists the data has to insert into the table otherwise its has to display the message"the user is already existed"for this I wrote the code like this in C# public Boolean isUserExists()    {        SqlCommand cmduserName = new SqlCommand("select count(*) from userTable where userName= " + txtuserName.Text + ")", conn);        SqlDataReader rdr = null;        rdr = cmduserName.ExecuteReader();                 conn.Open();               int count = 0;        while (rdr.NextResult())        {            count = rdr.GetInt32(1);        }        conn.Close();        if (count == 0)        {            return false;        }        else        {            return true;        }              protected void Button1_Click(object sender, EventArgs e)    {        if(isUserExists())            {                Response.Write("Opps ! User already Exists");                                       }                SqlCommand adapInsert = new SqlCommand("insert into userName values('" + txtuserName.Text + "')",conn);        conn.Open();        adapInsert.ExecuteNonQuery();        conn.Close();        Response.Write("data inserted");       }   is it write or not because I am not getting the output .please tell me any one where I have to change the code ThanksGeeta 

View 3 Replies View Related

Active Databse Copy

Feb 23, 2004

Hey guys,

I have to copy a databse from one server to another(both sql servers). Now the copy databse wizard wont work as the database is active( ie its open all the time), is there any other way to copy it to a different server while its in active session.

AM

View 2 Replies View Related

Copy Databse To Another Server

Nov 4, 2005

Hello,,
I backed up my database and it created a BAK file. Now I move this file to other server and trying to restore from it. It is giving me error: Device activation error. Do I have to create database before restoring. I do not have this database available in other server and I need to copy database with all constrains and tables.
Thanks,

View 2 Replies View Related

How To Remove Files From MS SQL Databse

Jul 6, 2004

Hello,

I am trying to remove files from my MS SQL database but I cannot find them. I do not know anything about databases. Someone had created a program for me through which I could upload files to MS SQL database but I need to delete some of the old files to free up some database space. I can access MS SQL database through the control panel of my host but I cannot seem to find the files I have been uploading.

If someone could give me step-by-step information on how to view the files within MS SQL database and how to remove them, it would be greatly appreciated.

Thank you.

View 1 Replies View Related

Databse Device Is Full

Nov 8, 2000

Hi

I need to ask a realy dumb question.
I have a database whereby both the devices for the tran log & the database
are full.
Does SQL 6.5 grab all the space so the devices appear to be full, or does full mean full ( and no further transactions are possible? )

Any help would be great

Thanks.

View 2 Replies View Related

Detaching A Replication Databse

Mar 17, 2004

I am trying to detatch a database that is set up as a publisher. I have desabled the replication tasks on both the publisher and subscriber db and am still unable to detach the db. Any ideas?

The image below is an example of the message I receive. I have tried after hours so at that time the users are 0.

Thanks.

View 3 Replies View Related







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