Make A Backup Of A Table

Apr 27, 2007

What is the best way (short of backing up the entire DB) to make a copy of a Table so that It can be easily restored. We have a table that we want to make some serious changes to, but I want to make sure I can restore if if I need to (if the changes don't work)

View 10 Replies


ADVERTISEMENT

Make A Backup With T-sql

May 5, 2007

Hello!

I would like to backup a database through t-sql into a file.

I do this :

EXEC sp_addumpdevice 'disk', 'mydb','c:mydb.bak'

it tells "Command(s) completed successfully."
but I can not find the file c:mydb.bak ...

but if I do it again I get :

"Msg 15026, Level 16, State 1, Procedure sp_addumpdevice, Line 74
Logical device 'mealmanager' already exists."

:-(

Any idea? I simply want to get a .bak file of the db, that's all.

Thanks a lot for any feedback!

Regards,
Fabianus



my favorit hoster is ASPnix : www.aspnix.com !

View 12 Replies View Related

Can We Make A Backup Programmatically

Oct 27, 2006

Hi ,Can we make a backup from a SQL-server 2000  database programmatically, using asp.net and then restore this backup programmatically ?

View 4 Replies View Related

Is It Possible To Make A Backup From MSDE ?? (Y/N)

Jul 19, 2004

Hi all;

Is it possible to make a backup from MSDE ?? (Y/N)

The problem: I am going to develop an application for a small company and it don't like to spend more $$ rather than some $$ for the App.

So, I don't know if it is possible to do a backup from MSDE or not?

BTW: How much MS SQL Sever200 will cost per a PC? (any idea even approx.)??


Thanks in advanced!

~~CS4Ever~~

View 2 Replies View Related

How To Make Backup Of Database To URL

Aug 3, 2015

There is a need to make a backup of a database to URL. how to do this.

View 2 Replies View Related

How To Make Self-backup Log In Msde?

Jul 20, 2005

Hi.I am trying to automatically backup transaction log when error 9002happened. So i have created appropriate job and alert to catch this error.I have two instances of sql server under Windows 2000. One of them is fullSQL Server, another is msde.When transaction log is full in full SQL Server error 9002 severity 17state 2 is logged in sql server log and in Windows Application log. Myalert firing my job. All is fine.But when transaction log is full in MSDE error 9002 severity 17 state 6 islogged only in sql server log. It is not logged into Windows Applicationlog so my alert does not work.So here is my questions:1. Why MSDE does not log error into Windows Application log?2. Why error 9002 has severity 19 in sysmessages table but is generatedwith severity 17?3. Why state of error 9002 differs under sql server and msde?Thank you.--Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

View 5 Replies View Related

Stored Procedure To Make Backup Of Database...

Dec 11, 2006

Can anyone point me to the right direction with the stored procedure on making a backup of the database. I am not looking for a scheduled backup. I'm looking for when the stored procedure get executed, the backup start right away. I believe it also require a username and password as well.

Thanks...

View 1 Replies View Related

How Do I Make A Backup Device File Smaller ?

Apr 9, 2008

HiI have a backup device file ... ".bck" whick has grown pretty large.Is there any way I can reduce its size ?ThanksDavid Greenberg

View 4 Replies View Related

Whqt Is The TSQL Statement To Make A Backup Of A Specific Databese??

May 10, 2008

i have a database names "students" in SQL server 2000. is there any TSQL statement to make a backup of the student databse in to a sspecific location ??????????

pls help

View 4 Replies View Related

Make A Horizontal Table Into A Vertical Table

Nov 19, 2004

Hi All,
Any assistance would be greatly appreciated.

I have a current table which I create on a regular basis from a text file with a layout similar to this:
TypePolicy #AmountRider 1 AmtRider 2 Amt
B1112H24.341212.34

This text file is brought into a staging table with each field (even the amount field) as a varchar (12). I then assign types in a later step in my DTS package.

What I need to do is stack the riders under each policy so for each policy where there is a rider, there is a new row for every rider.
So in the example I've given, there would be 2 additional rows for the original first row since there are two riders.
TypePolicy #Amount
B1112H24.34
R11112H12
R21112H12.34

I plan on doing this by first creating a table with just the Type, Policy #, and Amt fields, and then using a series of insert queries where I take the rider (if there is one) and append it onto the table.

However, I'm getting the following error message when I try:
Server: Msg 213, Level 16, State 4, Line 1
Insert Error: Column name or number of supplied values does not match table definition.

Basically, it wouldn't let me put an 'R1' in the Type column.
How can I get this to work!?!?

Thanks in advance for your help

View 6 Replies View Related

Naming A New Table From A Make Table Query

Mar 25, 2004

I want to use a Make Table Query to generate a new read-only Table. This I can do but my problem is that I want to be able to name the new Table containing only the records from a calendar year; e.y. Rents2001 and the next year another new table would be created and called Rents2002 and next year Rents2003 ...............

I require the Table to be generated yearly. I know I could do this in other ways but I really require the Table as once I have it I will be doing other things with it to give the final report.

Any suggestions how I can generate the Table with the YEAR being in the Table Name as part of running the Make Table Query? Thanks

View 4 Replies View Related

Make Table Unreadable

Sep 19, 2007

Hi all, I have a problem. I need a query that blocks table and makes it unreadable. I decided to use WAITFOR to long blocking.


BEGIN TRAN myStopReadTrans

USE MyDatabase
SELECT * From dbo.AB with(readpast,updlock)

WAITFOR DELAY '1:00:00'

COMMIT



USE MyDatabase
Select name from dbo.Clients

View 10 Replies View Related

How To Make Table Name Dynamic

Dec 31, 2007



Hi,

In my application i need to access mutiple table. I'm writing a stored procedure
in which i need to access tables such as TB01,TB02 .. Basically TBFY
where FY is parameter.

I tried for OPENQUERY, but that needs me to add a linked server, which i don't
think is a good idea.

Can anyone suggest on how can i do so?


I'm using SqlServer2000.

Thanks.

View 6 Replies View Related

How To Make Table Name Dynamic

Nov 19, 2007

Hi,

I have a requirement where i need to build the table name dynamically in the following queries.


declare @REF_DATA_TYPE nvarchar(20)

set @REF_DATA_TYPE='COUNTRY'



these are 4 cases where i need to use the table name dynamically

1. IF exists(select 1 from 'MD_REF_'+@REF_DATA_TYPE where code=@code_T)

2. Update 'MD_TB_REF_'+@REF_DATA_TYPE

3. from @ACTUAL_DATA p join 'MD_REF_'+@REF_DATA_TYPE T on T.code=P.code

4. INSERT INTO 'MD_REF_'+@REF_DATA_TYPE(Code,[Name],Description)


But i am getting error when i do this.

Please let me know what to do to solve this

Thanks in advance

View 5 Replies View Related

Procedure Or Query To Make A Comma-separated String From One Table And Update Another Table's Field With This String.

Feb 13, 2006

We have the following two tables :

Link  ( GroupID int , MemberID int )
Member ( MemberID int , MemberName varchar(50), GroupID varchar(255) )

The Link table contains the records showing which Member is in which Group. One particular Member can be in
multiple Groups and also a particular Group may have multiple Members.

The Member table contains the Member's ID, Member's Name, and a Group ID field (that will contains comma-separated
Groups ID, showing in which Groups the particular Member is in).

We have the Link table ready, and the Member table' with first two fields is also ready. What we have to do now is to
fill the GroupID field of the Member table, from the Link Table.

For instance,

Read all the GroupID field from the Link table against a MemberID, make a comma-separated string of the GroupID,
then update the GroupID field of the corresponding Member in the Member table.

Please help me with a sql query or procedures that will do this job. I am using SQL SERVER 2000.

View 1 Replies View Related

Execute A Vb.net File When I Make Some Changes In A Table

Mar 7, 2007

I want to execute a vb.net 
file

When I make some changes in a table.

 

How can I handle this situation?

 I am using sql server
2005 express edition sujith 

 

View 1 Replies View Related

How To Make Or Add A Table With A Field With Default Value

Nov 7, 2007

 I am doing a shopping basket type demo.I have difficulties going from table with fields like (Name,ProductCode) to table(Name, ProductCode, NumberOfItems). One way could be adding just Name and ProductCode fields and let NumberOfItems come automatically. It could have some common value like 1.  How should I do this with VB. 

View 1 Replies View Related

How Can I Make A Script Out Of A Table Data ?

Aug 30, 2003

Hello,

I want to take a table (SQL server) and show all it's data in a form of INSERT... (text file)
so that I can show it on a web-page and just paste the INSERT text into a MyTableData.sql
and then I can just run this script on the Query analyzer and fill my table with data

I need it so I can backup my DATA both in English and other languages...
(a replacement for the DTS packages that gives me hard time with the LOCALE / UNICODE translation)


did anyone already made such program ?
where can I find something like this ?

View 3 Replies View Related

How To Make Table Relations Using Query.

Mar 18, 2004

.

Hi,

How can I make relations between two tables using query? Tables are already there with data.

Regards

View 3 Replies View Related

How Do I Make A Autonumber Field In My Table!

Mar 28, 2006

Hiim new to ms sql server, having previously used mysql.  How do i make a auto number field? What datatype shall i use for it? like autonumber for mysql.  Ive tried setting my primary key field to uniqueidentifier data type but then i still need to manually add a guid key in there.  i want it so it automatically generates a unique key everytime i add a new row.  is this possible?!hope someone can help!thanks

View 2 Replies View Related

Most Performant Way To Make Pivot Table Available

Jun 27, 2007

We have what I think is a pretty common setup for records with a dynamic set of descriptive fields. Something like:

People
PersonID PersonType
1 Consultant
2 Partner

PeopleFieldDefs
FieldDefID FieldName
1 FirstName
2 LastName

PeopleFields
PersonID FieldDefID FieldValue
1 1 John
1 2 Smith
2 1 Alice
2 2 Johnson

Of course, we need to be able to search and display this data in a tabular format like:
PersonID PersonType FirstName LastName
1 Consultant John Smith
2 Partner Alice Johnson

We have been building dynamic queries based on which fields are needed (users can select the fields), e.g.:

SELECT p.PersonID, p.PersonType, pf1.FieldValue AS 'First Name', pf2.FieldValue AS 'Last Name'
FROM People p
LEFT JOIN PeopleFields pf1 ON (p.PersonID=pf1.PersonID AND pf1.FieldDefID=1)
LEFT JOIN PeopleFields pf2 ON (p.PersonID=pf2.PersonID AND pf2.FieldDefID=2)

This is very flexible but slow. We've done lots of optimization but can't get this below 5 seconds for common scenarios.

So I'm back to the drawing board now trying to figure out a better way to approach this.
I'm wondering if it would be better (if even possible) to break this out into some sort of view or table UDF that would contain a full representation of all person data, pre-joined. Problem is, this is almost certainly going to have to involve dynamic SQL since we can't know anything about what fields are defined. I think that rules out any sort of view or table UDF, no?

Does anyone have a suggestion for a good approach? Thanks.

View 4 Replies View Related

UPDATE/INSERT To Make One-to-Many Table Become One-to-One

Jul 23, 2005

I have a scenario where two tables are in a One-to-Many relationshipand I need to move the data from the Many table to the One table sothat it becomes a One-to-One relationship.I need to salvage the records from the many table and without goinginto detail, one of the reasons I can't do the opposite asthere are records in the ONE table that I need to keep even if theydon't have any child records in the MANY table.Below I created the code to create the sample tables:1- tblProducts is the ONE side table2- tblProductDetails is the MANY side table3- tblProductsResult is the RESULT I expect to get after runningsome T-SQL code4- tblProductComponents is another MANY side table to tblProducts5- tblProductComponentsResult is the RESULT I expect to get...Some of the points to consider:6- Normally all UniqueID columns are to be IDENTITY. Forthis sample i am entering the UniqueID values myself.7- I don't want to create new tables like tblProductsResultand tblProductComponentsResult. I want to update the real tables.I have created the tblxxxResult tables only for this post.8- The goal is to update the name of the Product by giving it thename of the first matching Name from tblProductDetails.9- If there are more than one entry in tblProductDetails for eachProduct, then I need to create new Products inheriting the originalProduct's information including its child records from tblProductComponents.If you run the code and open the tables it will be much clearerto visually see what I want to achieve.CREATE DATABASE MyTestDBGOUSE MyTestDBGOCREATE TABLE [dbo].[tblProducts] ([UniqueID] [int] NOT NULL PRIMARY KEY ,[Name] [varchar] (80) NULL,[TagNo] [int] NULL) ON [PRIMARY]GOINSERT INTO tblProducts VALUES (1, 'ABC', 55)INSERT INTO tblProducts VALUES (2, 'DEF', 66)INSERT INTO tblProducts VALUES (3, 'GHI', 77)INSERT INTO tblProducts VALUES (4, 'JKL', 88)CREATE TABLE [dbo].[tblProductDetails] ([UniqueID] [int] NOT NULL PRIMARY KEY ,[Name] [varchar] (80) NULL,[ProductID] int) ON [PRIMARY]GOINSERT INTO tblProductDetails VALUES (1, 'ABC1', 1)INSERT INTO tblProductDetails VALUES (2, 'DEF', 2)INSERT INTO tblProductDetails VALUES (3, 'GHI', 3)INSERT INTO tblProductDetails VALUES (4, 'GHI2', 3)INSERT INTO tblProductDetails VALUES (5, 'GHI3', 3)INSERT INTO tblProductDetails VALUES (6, 'JKL2', 4)INSERT INTO tblProductDetails VALUES (7, 'JKL', 4)INSERT INTO tblProductDetails VALUES (8, 'JKL3', 4)INSERT INTO tblProductDetails VALUES (9, 'JKL4', 4)CREATE TABLE [dbo].[tblProductComponents] ([UniqueID] [int] NOT NULL PRIMARY KEY ,[ProductID] int,[Component] [varchar] (80) NULL) ON [PRIMARY]GOINSERT INTO tblProductComponents VALUES (1, 1, 'ABCa')INSERT INTO tblProductComponents VALUES (2, 1, 'ABCb')INSERT INTO tblProductComponents VALUES (3, 1, 'ABCc')INSERT INTO tblProductComponents VALUES (4, 2, 'DEFa')INSERT INTO tblProductComponents VALUES (5, 2, 'DEFb')INSERT INTO tblProductComponents VALUES (6, 2, 'DEFc')INSERT INTO tblProductComponents VALUES (7, 2, 'DEFd')INSERT INTO tblProductComponents VALUES (8, 3, 'GHIa')INSERT INTO tblProductComponents VALUES (9, 4, 'JKLa')INSERT INTO tblProductComponents VALUES (10, 4, 'JKLb')CREATE TABLE [dbo].[tblProductComponentsResult] ([UniqueID] [int] NOT NULL PRIMARY KEY ,[ProductID] int,[Component] [varchar] (80) NULL) ON [PRIMARY]GOINSERT INTO tblProductComponentsResult VALUES (1, 1, 'ABCa')INSERT INTO tblProductComponentsResult VALUES (2, 1, 'ABCb')INSERT INTO tblProductComponentsResult VALUES (3, 1, 'ABCc')INSERT INTO tblProductComponentsResult VALUES (4, 2, 'DEFa')INSERT INTO tblProductComponentsResult VALUES (5, 2, 'DEFb')INSERT INTO tblProductComponentsResult VALUES (6, 2, 'DEFc')INSERT INTO tblProductComponentsResult VALUES (7, 2, 'DEFd')INSERT INTO tblProductComponentsResult VALUES (8, 3, 'GHIa')INSERT INTO tblProductComponentsResult VALUES (9, 4, 'JKLa')INSERT INTO tblProductComponentsResult VALUES (10, 4, 'JKLb')INSERT INTO tblProductComponentsResult VALUES (11, 5, 'GHIa')INSERT INTO tblProductComponentsResult VALUES (12, 6, 'GHIa')INSERT INTO tblProductComponentsResult VALUES (13, 7, 'JKLa')INSERT INTO tblProductComponentsResult VALUES (14, 7, 'JKLb')INSERT INTO tblProductComponentsResult VALUES (15, 8, 'JKLa')INSERT INTO tblProductComponentsResult VALUES (16, 8, 'JKLb')INSERT INTO tblProductComponentsResult VALUES (17, 9, 'JKLa')INSERT INTO tblProductComponentsResult VALUES (18, 9, 'JKLb')CREATE TABLE [dbo].[tblProductsResult] ([UniqueID] [int] NOT NULL PRIMARY KEY ,[Name] [varchar] (80) NULL,[TagNo] [int] NULL) ON [PRIMARY]GOINSERT INTO tblProductsResult VALUES (1, 'ABC1', 55)INSERT INTO tblProductsResult VALUES (2, 'DEF', 66)INSERT INTO tblProductsResult VALUES (3, 'GHI', 77)INSERT INTO tblProductsResult VALUES (4, 'JKL', 88)INSERT INTO tblProductsResult VALUES (5, 'GHI2', 77)INSERT INTO tblProductsResult VALUES (6, 'GHI3', 77)INSERT INTO tblProductsResult VALUES (7, 'JKL2', 88)INSERT INTO tblProductsResult VALUES (8, 'JKL3', 88)INSERT INTO tblProductsResult VALUES (9, 'JKL4', 88)I appreciate your assistance on this.Thank you very much

View 6 Replies View Related

Make A Validate Rule In A Table

Nov 11, 2006

Hi

In access i can make a rule
like if i have a Coloumn to date
i can make a rule to say that this fields data
shall be > date

can i do this also in sql and how?

regards

alvin

View 1 Replies View Related

How To Make Sure No Other Table Writes Happen Between 2 SQL Statements ?

Nov 25, 2007

Ok, here is my situation.....
When someone navigates to a user's profile page on my site, I present them with a slideshow of the user's photos using the AJAX slideshow extender.  I obtain the querystring value in the URL (to determine which user's page I'm on) and feed that into a webservice via a context value where an array of photos is created for the slideshow.  Now, in order to create the array's size, I do a COUNT of all of that specific user's photos.  Then, I run another SQL statement to obtain the path of those photos in the file system.  However, during the time of that first SQL query's execution (the COUNT statement) to the time of the second SQL query (getting the paths of the photos), the owner of that profile may upload or delete a photo from his profile.  I understand this would be a very rare occurrence since SQL statements 1 and 2 will be executed within milliseconds of each other, but it is still possible I suppose.  When this happens, when I try to populate the array, either the array will be too small or too large.  I'm using SqlDataReader for this as it seems to be less memory and resource intensive than datasets, but I could be wrong since I'm a relative beginner and newbie.   This is what I have in my vb file for the webservice.....Public Function GetSlides(ByVal contextKey As String) As AjaxControlToolkit.Slide()     Dim dbConnection As New SqlConnection("string for the data source, etc.")     Try          dbConnection.Open()          Dim memberId = CInt(contextKey)          Dim photoCountLookupCmd As New SqlCommand _               ("SELECT COUNT(*) FROM Photo WHERE memberId = " & memberId, dbConnection)          Dim thisReader As SqlDataReader = photoCountLookupCmd.ExecuteReader()          Dim photoCount As Integer          While (thisReader.Read())               photoCount = thisReader.GetInt32(0)          End While          thisReader.Close()          Dim MySlides(photoCount - 1) As AjaxControlToolkit.Slide          Dim photoLookupCmd As New SqlCommand _               ("SELECT fullPath FROM Photo WHERE memberId = " & memberId, dbConnection)          thisReader = photoLookupCmd.ExecuteReader()
          Dim i As Integer          For i = 0 To 2               thisReader.Read()               Dim photoUrl As String = thisReader.GetString(0)               MySlides(i) = New AjaxControlToolkit.Slide(photoUrl, "", "")          Next i          thisReader.Close()          Return MySlides     Catch ex As SqlException     Finally          dbConnection.Close()
     End Try
End FunctionI'm trying to use the most efficient method to interact with the database since I don't have unlimited hardware and there may be moderate traffic on the site.  Is SqlDataReader the way to go or do I use something else?  If I do use SqlDataReader, can someone show me how I can run those 2 SQL statements in best practice?  Would I have to somehow lock writing to that table when I start the first SQL statement, then release the lock after I execute the second SQL statement?  What's the best practice in this kind of scenario.
Thanks in advance.

View 3 Replies View Related

T-SQL (SS2K8) :: Different Levels To Make Table Flat

May 6, 2015

I am trying to fill my table in different levels (hierarchy). The different levels are not properly processed. All layers now have the same value. It is intended that the layers are beaten flat. This implies multiple joins in order to be able to get the different levels.

'Ledgertableinterval' could be used to determine the hierarchy, but I did not come all the way out ...

So my suggestion is to fill with 1 character level 1, level 2 with 2 character and so on. If a level is not available anymore than filling up with higher level. For this you can use the replace function.

The DIM that I use;

USE [NJ]
GO

/****** Object: Table [DIM].[FA] Script Date: 05/06/2015 09:57:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [DIM].[FA](

[Code] .....

View 1 Replies View Related

Can I Make A Temp Table With A Union All Select?

Mar 26, 2008

I'm having trouble creating a temp table out of a select statement that uses multipe union alls.

Here's what I have, I'm trying to get the results of this query into a temp table...

select
parent,
(select cst_id from co_customer (nolock) where cst_key = Parent) as cst_id,
(select cst_name_cp from co_customer (nolock) where cst_key = Parent) as cst_name_cp,
(select org_total_assets_ext from dbo.co_organization_ext where org_cst_key_ext = parent) as Parent_Total_assets,
sum(own_assets) as Total_child_own_assets

from
(
Select parent,
Child,
(select org_own_assets_ext from dbo.co_organization_ext where org_cst_key_ext = child) as Own_assets

from
(Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,1) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,1) is not null
union all

Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,2) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,2) is not null
union all

Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,3) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,3) is not null
union all

Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,4) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,4) is not null
union all

Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,5) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,5) is not null
union all

Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,6) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,6) is not null
union all
Select Cst_key as Child,
dbo.return_org_parent(cst_key,0,7) as Parent
from co_customer (nolock)
where cst_type = 'Organization'
and cst_delete_flag = 0
and dbo.return_org_parent(cst_key,0,7) is not null )as c
) as d

group by parent

having sum(own_assets) <> (select org_total_assets_ext from dbo.co_organization_ext where org_cst_key_ext = parent)

View 8 Replies View Related

How To Make Table Row Invisible Based On Certain Condition

Apr 16, 2008



HI

I have the following scenario in my report.


-The data is displayed in a table
-The table groups by one field
-Each table row calls a subreport
-There is about 6 paramaters in the report
-The last paramater of the list of paramters is a multivalue paramater and based on what is selected in the list the corresponding subreport must be shown.
-So i use a custom vbscript funtion to determine if a specific value was selected or not.
This functionality is working fine.

My problem is if the user does not select all the values in the multi select then i want to make the row invisble
and remove the whitespace so that there is not a gap between the other subreports which is shown.

I can make the subreport invisible inside the row but there is still the white space which does not display very nicly.

How can i make the row invisible if the vbscript function that is called returns a false value?

Here is the funtion I call -> Code.InArray("ValueToSearchFor", Parameters!MultiValueDropDown.Value)

The Function returns a true or false.

Thanks.




View 3 Replies View Related

How To Make A Diagram From Data In A SQL Server Table?

Dec 19, 2005

Hi all,

Iīm a real SQL rookie and after two days of intensive research and reading of dozens of articles and web pages a bit confused about all that knowledge concerning database technology ... and I only want to do something very easy ...

Now, my question is, how can I produce a diagram from that data, that is stored in a table, maybe called "DiagData1"?

I have installed SQL Server Express 2005 and Visual Basic Express 2005 and did some first steps with it as where shown in an brilliant tutorial that Iīve found on a Microsoft (?) webpage. It shows the complete way building a database and connecting it to a form which was build with Visual Basic. So all what is left is find out how the database tables are connected to a diagram.

thanksīn greets,

  VBFan

View 3 Replies View Related

Cache Entire Table Then Make Filtered Queries Against It

Feb 11, 2008

Hello,
 I have a table that I want to cache. So, if this is my query "SELECT * FROM myTable" that I create the cache from, how can I filter the data?
I really need to cache the whole table, since there are a myriad of different statements being executed against the table, so just caching a specific query won't do.
I've found the best approach to make a question is writing it in code, so how can I do the following:
SELECT ColNames FROM MyTableWhichShouldNowBeCached WHERE whereColumns=someParams.
ColNames and someParams make up for a variation of about to 120 different queries. I use SQL 2005 express edition with advanced services.
Cheers!
/Eskil
 
 

View 2 Replies View Related

How To Make A Temp Table Using Info Fromtwo Tables

Mar 8, 2008

I have one database named StudInfo. It has two tables named StudentInfo, and GradeInfo.
StudentInfo conntains 4 columns. The 1st one is StudentID (PK) int, LastName varchar(10), FirstName varchar(10), and PhoneNumber int.

GradeInfo contains 4 columns also StudentID (FK) int, GradeID varchar(10), Grade int, Date Datetime.

What I would like to know is how using a T-sql query I could make a temp table with studentID, LastName, FirstName, and then the average of all the different types under GradeID. As of right now I have been limiting the names that are put into GradeID to Homework, Daily, Test, Quiz, and Bonus. When I say average I mean the average of all Homeworks under one studentID, and all Daily under one studentID... etc. I would like the info returned for each student in studentID. Allow Nulls has been turned off.

Never assume someone knows what you are talking about.

View 6 Replies View Related

Make A Bunch Of Rows From A Table Resemble A Column

Nov 23, 2005

Currently I'm using a UDF and a physical temp table to accomplish thisand I want to know if there's any way of doing it in a query orsubquery instead...In TableA there are a bunch of rows:InvitationID (PK) PartyID Partygoer1 1 Jim2 20 Bob3 2 Frank4 1 Robert5 1 PeteIn TableB are rows:PartyID (PK) PartyDate PartyName1 1/1/2000 WildParty2 1/1/2000 BoringPartyWhen a user runs a query to search for all parties on 1/1/2000 I wantthe result to look like:PartyID PartyDate PartyName Partygoer1 1/1/2000 WildParty Jim, Robert, Pete2 1/1/2000 BoringParty FrankI'm hoping there's a solution to this.Thanks,lq

View 9 Replies View Related

Stored Procedure Make String From Table Field

Jul 20, 2005

Hallo !I have a Table with a column "ordernumber"ordernumberA12A45A77A88Is it possible to create a stored procedure which makes a string of these column ?Result: string = ('A12','A45','A77','A88')Thanks !aaapaul

View 3 Replies View Related

Transact SQL :: Make Table Or Database To Be Case Insensitive?

Jun 30, 2015

If I make a search for instance

"Candy" in where statement I retrieve 12 hits however if I write "candy" I retrieve 0 hits.

Is it possible to make the database or table to be case insensitive?

View 2 Replies View Related







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