Where To Find Info On The Concept Of SQL Tables

Feb 7, 2006

i would like to know where can i find information on the concept of SQL like Base Table , View Table and Search Table as now i am using VS.Net 2005 and SQL Server 2005 to write a addressbook program and i am just a newbie to Sql and c#... i wish to write my sql commands in c# side before passing it into sql and may i know how to do it?

View 20 Replies


ADVERTISEMENT

How To Find Version Info.?

May 12, 1999

How do I determine which version of SQL Server I have? In other words, I don't mean
6.5 or 7.0, rather, am I using the standard version, the desktop version, the enterprise, etc.?

Thanking you in advance.

Regards,
Michelle Turner

View 1 Replies View Related

Where To Find Encryption Key Info?

May 29, 2008



Hi There

If a package is encrypted with user key, where can i find out what user key it is encrypted with ?

Thanx

View 6 Replies View Related

How To Find Service Pack Info

Jun 16, 2004

how would i find out which service pack was applied to a specific sql 2000 server?

Thanks in advance!!!

View 2 Replies View Related

Writing Expressions - Where Can I Find Info?

May 10, 2007

Hi,



I realize that I need to learn how to write expressions for conditional splits, etc. Frankly, I don't even know what "language" expressions are written in. They look a lot like excel functions to me.



I tried searching the internet for some documentation, but it is sparse.



Can anyone point me to some links, etc that can teach me how to write my own expressions?



Thanks much

View 4 Replies View Related

I Need To Find Out Info On How To Schedule A Stored Proc To Run In Sql 7 Every Few Hours?

Aug 24, 1999

I have 2 stored proc's that i want to run an append query every 4 or 8 hours.
how does a person do this in ms sql 7?

View 2 Replies View Related

Where Can I Find Info About How To Backup Sql Server 2005 Using A .bat File?

Aug 30, 2006

Where can I find info about how to backup Sql Server 2005 using a .bat file?

Is it possible doing it this way?

If so, can anyone direct me to some links how how to do this?

If not possible using a bat file... then how can I make schedueled backups? What tool to use and hopefully free.

View 2 Replies View Related

Need Info From 2 Tables

Sep 18, 2007

Here's my string.  I know it's way wrong right now  SELECT binbox_receipt.partner_code    ,binbox_receipt.link_id ,binbox_receipt_archive.partner_code,binbox_receipt_archive.link_id     FROM binbox_receipt, binbox_receipt_archivewhere binbox_receipt_archive.link_id = binbox_receipt.link_idand binbox_receipt.partner_code = '1154' and binbox_receipt.link_id = '2684'and (binbox_receipt_archive.partner_code  = '1154' and binbox_receipt_archive.link_id  = '2684')I need to check 2 tables if in the first table the link_id and partner_code exist or the second table link_id and partner_code existany help would be greatly appreciated I'm a little new at this but having fun trying 

View 11 Replies View Related

Anything That You Find In SQL Object Scripts, You Can Also Find Them In System Tables?

Jul 26, 2005

I tried all the INFORMATION_SCHEMA on SQL 2000 andI see that the system tables hold pretty much everything I aminterested in: Objects names (columns, functions, stored procedures, ...)stored procedure statements in syscomments table.My questions are:If you script your whole database everything you end up havingin the text sql scripts, are those also located in the system tables?That means i could simply read those system tables to get any informationI would normally look in the sql script files?Can i quickly generate a SQL statement of all the indexes on my database?I read many places that Microsoftsays not to modify anything in those tables and not query them since theirstructure might change in future SQL versions.Is it safe to use and rely the system tables?I basically want to do at least fetching of information i want from thesystem tables rather than the SQL script files.I also want to know if it's pretty safe for me to make changes in thesetables.Can i rename an object name for example an Index name, a Stored Procedurename?Can i add a new column in the syscolumns table for a user table?Thank you

View 4 Replies View Related

Combining Info From Two Tables?

Oct 18, 2004

Hello, I'm having some problems trying to access two tables in a SQL database at the same time and making some results out of them. Let me explain further: the first table has some information in that I'm going to be doing a select query on and reading out, but one of the columns in this table is a set of codes, the second table contains the codes in one column and their meanings in the other.

So I want to bring back the information from the first table and then select the information for the codes shown from the second table and print their meanings alongside the information from the first table. Could anyone help me out in figuring out how my SQL in the ASP page for this would be written? Sorry if this is a little confusing but im having a hard time visualising how to do this.

View 8 Replies View Related

Retrieve Info From Two Tables

Aug 8, 2005

Hello;

I have two tables

Table 1 Rx
-------
RxNumber, RxId(no duplicates), RxDate, Name, Notes, Type, DOB

Table 2 Email
-------
EmailId, RxId(duplicates ok), Subject, Message, To, From, Type


I would like the result to be

Result Table
------------
Rx Id, RxDate, Name, Notes(or Subject), Type

Table 1 can be searched by date, or Name or DOB I want the result of this search to go through table 2 and return to me all emails that match thre previous results RxIds

For example Table 1
RxNumber, RxId, RxDate, Name, Notes, Type, DOB
1 99 1/1/2005 Person1 Note1 1 1/1/95
2 98 3/1/2005 Person2 Note2 1 1/1/96
3 97 5/1/2004 Person3 Note3 1 1/1/97
4 96 1/1/2004 Person4 Note4 1 1/1/98
5 95 6/1/2005 Person5 Note5 1 1/1/99

For Example Table 2
EmailId, RxId(dupl ok), Subject, Message, To, From, Type
1 100 S1 M1 T1 F1 2
2 98 S2 M2 T2 F2 2
3 101 S3 M3 T3 F3 2
4 95 S4 M4 T4 F4 2
5 98 S5 M5 T5 F5 2
6 95 S6 M6 T6 F6 2
7 96 S7 M7 T7 F7 2
8 98 S8 M8 T8 F8 2
9 100 S9 M9 T9 F9 2
10 100 S10 M10 T10 F10 2

If I do a search for Rxs that were prescribed from 1/1/2005 to 7/1/2005
I would like the resulting table to be
RxId RxDate Name Note/Subject Type
99 1/1/2005 Person1 Note1 1
98 3/1/2005 Person1 Note2 1
98 3/1/2005 Person2 S2 2
98 3/1/2005 Person2 S5 2
98 3/1/2005 Person2 S8 2
95 6/1/2005 Person5 Note5 1
95 6/1/2005 Person2 S4 2
95 6/1/2005 Person2 S6 2

I have tried a combination of inner joins and Union with no luck any suggestions

Thanks

Fernb200

View 2 Replies View Related

How To Move Info From 2 Tables To 1

Apr 7, 2008

Hello all,

Ive been tasked with writing a SQL query to move information from 2 tables(old1 and old2) into 1(new). table new already has all the information from old1, but also has some additional columns that are encompassed from old2. Also some of the columns in table new need to be assigned a 1 or a 0 if the information is present in old2. Here is what I came up with:

UPDATE new

SET new.IsRentalLocation = 1
new.IsMainCampus = 1
new.IsLearningCenter = 1
new.IsStudentResource = 1
new.AlternateStateDisp = 0
new.Directions = tbl_old2.Directions
new.Catering = tbl_old2.Catering
new.Lab = tbl_old2.Lab

FROM new, old1, old2

WHERE new.CampusID = old1.CampusID
AND old1.LearningCenterID = old2.LearningCenterID

Does this look right? or should I be using an insert command?

View 4 Replies View Related

How To Show All Tables Info In Task Pad?

Jun 17, 2004

In the table view in the Task Pad view, it lists the number of rows and size of each table, which is great, however it only lists the first 25 tables or so and there is no scroll function.

1. Does anyone know how I can see this info in Task Pad for all tables, without having to use the search function and look up 200+ tables one-by-one?

2. Does anyone know of another utility or statement to run against the DB which will return this info all at once for all the tables?

Thanks.

View 9 Replies View Related

Merge Tables And Collect Origin Info

Apr 29, 2015

If you have 2 tables with the same columns and you would like to see all distinct records in a result of a select and also the information in the records which table the record comes from (for instance: from table A or from table B or bot tables contain it) what should you do?

View 5 Replies View Related

Database Size Info Without Cursors Or Temp Tables

Jan 22, 2004

I have seen a bunch of ways to get the size of all the tables within a database posted on this board. I decided to modify an older one I found here (http://www.sqlteam.com/item.asp?ItemID=282). I set it up so there is no cursors or temp tables. Pretty much just one select statement to return all the info you would need. It seems to be faster than anything I have seen so far. Take it for whats its worth. Thanks to the original creator.



/*
Original by: Bill Graziano (SQLTeam.com)
Modified by: Eric Stephani (www.mio.uwosh.edu/stephe40)
*/

declare @low int

select @low = low from
master.dbo.spt_values
where number = 1 and type = 'E'

select o.id, o.name, ro.rowcnt, (r.reserved * @low)/1024 as reserved,
(d.data * @low)/1024 as data, ((i.used-d.data) * @low)/1024 as indexp,
((r.reserved-d.data-(i.used-d.data)) * @low)/1024 as unused
from
sysobjects o

inner join
(select distinct id, rowcnt
from sysindexes
where keys is not null and first != 0) ro on o.id = ro.id

inner join
(select id, sum(reserved) reserved
from sysindexes
where indid in (0, 1, 255)
group by id) r on o.id = r.id

inner join
(select c.id, dpages+isnull(used, 0) data from
(select id, sum(dpages) dpages
from sysindexes
where indid < 2
group by id) c full outer join
(select id, isnull(sum(used), 0) used
from sysindexes
where indid = 255
group by id) t on c.id = t.id) d on r.id = d.id

inner join
(select id, sum(used) used
from sysindexes
where indid in (0, 1, 255)
group by id) i on d.id = i.id


where o.xtype = 'U'

order by reserved desc

View 3 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

How To Construct The Url Via Database Tables Info To Generate Report

Aug 17, 2007



Please help, i am really really struggling for a logic to handle 100's of reports we have via button click from asp.net webform.
in the button click i am constructing the url :
**************************************************************************************************************
http://localhost/reportserver?/MyReports/StatusReport&UserID=1&ContractID=1&subcode=null
*************************************************************************************************************

I have a table would like to maintain the parameters required for the chosen report:
when the user chooses from list box on the webform for StatusReport, immedeately it fetches the parameters related to Statusreport and gets everything which is stored with a space in between for each parameter, for this report i have 3 parameters:
UserID ContractID subcode

now how can i construct the string based on the above parameters , i am using vb.net as code behind for my webform(asp.net)

please any ideas will help me achieve the logic. please help thank you all very much.


View 4 Replies View Related

YTD Concept

Apr 15, 2008

Hi Friends,
Can anybody help in introducing the YTD Concept:

My Table[ Monthly_Highlights_tb ] schema should contain like below:
[Month] [Base_Amount] [YTD]
APR-07 1000.00 1500.00
APR-07 500.00 1500.00
MAY-07 2000.00 3500.00
jUN-07 5000.00 8500.00

WHEN I run the below query:

UPDATE t
SET t.ytd = (SELECT SUM(q.base_amount) FROM Monthly_Highlights_tb q WHERE q.[month] = t.[month] AND q.[month] <= t.[month])
FROM Monthly_Highlights_tb t

output is coming as:
[Month] [Base_Amount] [YTD]
APR-07 1000.00 1500.00
APR-07 500.00 1500.00
MAY-07 2000.00 2000.00
jUN-07 5000.00 5000.00

cAN anybody correct the query?

View 1 Replies View Related

Concept Hierarchy-

Jul 13, 2006

What are some strategies in categorizing items?

View 4 Replies View Related

MultiThreading Concept In Oracle

May 15, 2008

Hi all,

Please let me know the details of the following.
1.What is Multi-Threading?
2. How it is useful to increase the Performance of a SQL query.( How it is useful
in Optimizing the query.
3. How we'll use MultiThread concept in Partitions and Using Processors.( For Eg.. If I want to use MAX threads=14 and 16 processors in this situation how we use PArtition concept and how it will improve the bufffer size of the CPU)

Thanks in advance

View 6 Replies View Related

Basic Concept Clarification

Oct 2, 2007

The distinction between Entity and Relationship is obvious to me. But I am confused by Table. Table describes Entity, Relationship, or both?

Thanks for any input.

View 9 Replies View Related

SQL Server 2000 Concept

Jul 20, 2005

Before going in to details i like to understand more about concept anddesign of this database. Most books go directly in to details.Please, can a current admistrator gife me information on this?Thanks in advance,Dick vd Spek email: Join Bytes!

View 1 Replies View Related

Nested Table Concept In SQL Server

May 8, 2004

Hi all,

What is the equivalent for Oracle's nested table concept in SQL Server ?
Is there anything like TABLE( ) function to select from nested table as in Oracle ?

Eg in Oracle :

SELECT t.* FROM TABLE(nested_table_datatype) t;

( like the above query used in Oracle PL/SQL and 'nested_table_datatype' is a table datatype created in Oracle using 'create type ...' syntax )

Please give the equivalent for above...

Thanks,
Sam

View 2 Replies View Related

SQL 2012 :: What Is The Concept Of Smart Backup

Jul 6, 2015

what is the concept of smart backup in sql ?

View 1 Replies View Related

Is There A System Table With Timestamp Info Or DTS Job Info?

May 7, 2007

I want to be able to see when records have been added to a table. The issue is we have a DTS job scheduled to run every night. The developer who wrote it password protected it and doesn't work here anymore. I want to add a step to this series of DTS jobs and want to run it just prior to his job. Is there a way to see when the records are being added or when this job is being run? Thanks again, you guys are the best.

ddave

View 3 Replies View Related

How Can I Dynamically Build Sql SELECT Using ASP 1.0 Array Concept

Jun 6, 2007

The below code is ASP 1.0 to dynamically search a database and I want to use the same concept for a ASP.Net 2.0 solution.  Do I do this in the code behind or on the aspx page and if on the aspx page what controls do I use for the array split?  Basically where do I start.  It took me a long time to get this old code working, I am hoping it is simpler in 2.0.
Thank you
OLD ASP 1.0 code to dynamically build a Sql Select statement for searching a database using one or more search words entered by user.
If Request.Querystring("kwdSearch") <> "" ThenDim kwdString, ArrKwdString, iCountiCount = 0 kwdString = Replace(Request.Querystring("kwdSearch"), "'", "''")ArrKwdString = Trim(kwdString)ArrKwdString = Split(kwdString, " ",-1,1) For iCount = 0 to UBound(ArrKwdString) If iCount < UBound(ArrKwdString) Then  Criteria = Criteria & "tblLinkInfo.L_Keywords LIKE '%" & ArrKwdString(iCount) & "%' AND "  Else  Criteria = Criteria & "tblLinkInfo.L_Keywords LIKE '%" & ArrKwdString(iCount) & "%' " End ifNext    RS.Open "SELECT * FROM tblLinkInfo Where (" & Criteria & ") AND L_Enabled = 1 ORDER BY " & SortBy & "L_Rank", CNN, 3 If RS.EOF Then  If Rs.State Then RS.Close  RS.Open "SELECT * FROM tblLinkInfo WHERE L_Description LIKE '%" & Replace(Request.Querystring("kwdSearch"),"''","'") & "%' AND  L_Enabled = 1  ORDER BY " & SortBy & "L_Rank", CNN, 3  End If
  RESULTS --- Display results with Repeater1.DataBind(); etc
  Exit SubEnd If

View 3 Replies View Related

Enterprise Product Develepment (concept To Rollout)

Apr 2, 2004

Hi

I am involved in a product development and want to understand the current best practices from the conception to product rollout. I have few questions. Appreciate your help and suggestions

Our project in a nutshell: Our team has developed the apps. using GUI-Oracle Forms & DBMS-Oracle 8i/9i with weblogic, Corba, windows 2000 server environment. It’s meant for 1000s of users with million of data. We are trying to integrate additional services/capability - messaging (wireless, chat etc.). As per the initial plan we have a central database and users will be using a local footprint database. The deltas (the changes) will be synchronized with the central database at a frequency say daily or nightly... We are concerned that having the database at the users desktop could leave the door wide-open for others to take a look at our code/design...

Questions:

1. UML case tools-- What’s the best tool available in the market as we want to revisit the design phase and identify the things that have been missed out in the prototype-(which was developed by a third-party)?
So far we have used ERWIN to extract the data model...

2. How can we eliminate the need to have a local footprint database at the users desktop.?. Since there is a lots of data, retrieving the data via internet could be very slow for users? (hope this is the case!) That’s what led our team to think of having a local database at the users desktop. Someone suggested to use the data files or caching the data.. Appreciate if anyone shed some light on this.. Is there a better way to do it?

3. Client connectivity: What are the softwares needed at the users PC. Since we use Oracle Forms to develop the application, do we need to install the oracle clients at the users PCs? how to establish the connectivity from the Users PC to our server and to the database. IF we have to use the oracle client, does that require licenses for every User? What do we need to consider from the network connectivity stand point.

4. Application Rollout: how to package our finished product - application exe that is installable across wide array of environment. (we thought of install shield). how do we test it for accuracy etc.,

5. Database optimization: In addition to DBA help, is there any product or proceedures to ensure dataModel optimization, SQL query performance etc.,

Appreciate you sharing your valuable thoughts on this with us..

View 1 Replies View Related

DB Design :: Can Use Another Server / Disk To Store Files Using FileTable Concept?

May 11, 2015

I tried samples of FileTable in SQL Server 2012 to store files in database. I have following questions.

1. When I right click on FileTable, and say Explore File Table Directory, I was taken to a directory. But if I search the same directory in my server/machine, the directory is not available.

2. Can I use some external server/disk as a directory for FileTable?

3. How easy is to use FileTables using .Net web applications?

View 2 Replies View Related

Find A Key In All Tables

Oct 28, 2013

I have many tables that have as one of its keys POLICY_NUMBER is there a way to write a script that will look in all tables in a db for a certain POLICY_NUMBER

View 5 Replies View Related

Find Tables With No PK

Jan 27, 2004

I modified my origianl script (used a cursor) to use a looping method I saw in a different thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=30286 by Nigel Rivett. Since I used code on this board I though I would post back for the greater SQL Team script toolbox. Feel free to use it to catch those deliquent sql programmers who forget to create a PK. Enjoy.



declare @database varchar(128) ,
@maxdatabase varchar(128) ,
@cmd nvarchar(1000)

create table #pk (databasename sysname, tablename sysname)

select @database = '', @maxdatabase = max(name) from master.dbo.sysdatabases where dbid > 5
while @database < @maxdatabase
begin
select @database = min(name) from master.dbo.sysdatabases where dbid > 5 and name > @database

set @cmd = 'select ''' + @database + ''', o.name from ' + @database + '.dbo.sysobjects o join ' + @database + '.dbo.sysindexes i on o.id=i.id
where o.xtype=''U'' and i.indid = 0'

insert into #pk exec sp_executesql @cmd
end

select * from #pk

drop table #pk


- Eric

View 10 Replies View Related

Find Available Tables In A DB

Mar 20, 2008

I am brand new to using SQL. I created a DB with a bunch of tables there. What I would like to do is from my VB.NET application I would like to allow the user to see what tables are available in that DB.



Also I need a way to check if a table exists. I used the following:

strTemp = "IF EXISTS " & _
"(SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'simplesql') AND type in (N'U'))"
cmd.Connection = conncmd.CommandType = CommandType.Textcmdcmd.ExecuteNonQuery()

but I get an exception : Incorrect syntax near ')'

thanks for your help

View 4 Replies View Related

How To Find All The Tables Which Are In Database

Feb 24, 2008

 Hi......i want to find all the tables which are in database. is there any hint or code that can help meThanks in advance

View 4 Replies View Related

Find Tables With Column Name

Oct 16, 2006

How can I find all the tables with a specific column name?

View 3 Replies View Related







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