Complex Data Structures

Oct 5, 2001

A point for general discussion maybe.

I've just read Jeff's query regarding passing an array to a stored procedure, and it seems to be a question that hits the message board quite frequently. There often seems to be the case where you have some block of data in one location, and want to process it somewhere else, and there just isn't an easy way to do it (or is there?). Passing a cursor is possible, but getting data back out of a cursor is painful.

The ways I have used in the past are:

Using a cursor
Using a global temporary table
Using a "permanent" table, but declared with a unique name (using a timestamp) and passing the tablename as a parameter.

Has anybody any suggestions for a future SQL release which we could suggest to Microsoft?

Suggestions from myself:
-Having a single TSQL command to copy a cursor back into a table, to make cursor parameters less cumbersome
-Being able to pass a pointer to a temporary table as an SP parameter
-Allowing variables to be declared with more complex structures (such as arrays, or classes)

Regards,
ChrisH

View 1 Replies


ADVERTISEMENT

Data Structures

Nov 14, 2006

(Wow; surfing this site has really illuminated what a lowly hack-programmer I am to this field of SQL and relational processing :S )I am creating a temp table, doing an Bill of Material explosion for a single Order Line Item.(note: SQL Server 2000)I used blindman's "accumulator method (click here) (http://www.dbforums.com/showpost.php?p=6239109&postcount=6)" to generate the entire potential BOM tree.So; step 1 works wonderfully! :beer: Cheers blindman!Now; I want to remove unwanted nodes (and all their children) from the temp-table. I have a bunch of functions (0 to 1 for each node) that return a Yes or No. If "No", then flag-to-eliminate immediately that branch and don't revisit anything on it (and therein lies my problem). This will leave me with a temp table of only valid nodes.Since this is recursive, and since it will involve Dynamic SQL (the function name varies), all I can come up with is using a Cursor in a WHILE loop. Even at that; since a CURSOR is point-in-time (ie: values don't change once selected), I'll have to re-check the current temp table values (or create of 2nd temp table of only deleted nodes and repeat a SELECT with NOT EXISTS in it, hmmm).Since blindman's method generates a table ordered by level, the sequence of processing is pre-determined - unless I can re-order it into a more traditional hierarchy (1 entire branch at a time) and number the levels, in which case the cursor could just skip to the next branch of equal or higher level.Note: The thought does occur to me I could have an intermediary function (static name) that in turn does the Dynamic SQL. These functions contain the Business Logic that looks at a myriad of column values and relationships in the database and there's no one-size-fits-all decision tree so Dynamic SQL is necessary.The max cursor size will be maybe 300, and on average 100. Number of levels will normally be 3 or 4, but conceivably could be up to 10. Given the average 100 potential components/sub-assemblies, the final assembly will be about 30. As a periodic background process; it will do 3,000 Order Line Items a day, so I'm figuring 1 second response time per build is adequate (ie: the user's not waiting on it so it doesn't have to be blinding fast) - however why waste?Anyhow; I thought this might be a fun problem for some Data Structure genius who wants to give a lesson in Relational Programming.Thanks for looking.Here's what I have so far:CREATE PROCEDURE dbo.sp_ExplodeTest1 (@recID int = 1) AS/* tbTestH is a table containing an assembly hierarchy. Assemblies with no parent are Builds.Assemblies with no children are Components.It's columns: MyID int, ParentID int, (other descriptive columns)*/declare @t table (TempNodeID int identity(1,1),MyID int)-- Seed the tree with the Build's ID.insert into @t (MyID) values (@recID)/* This populates the temp table with the entire Assembly for the given build. It is Ordered By the level in the assembly. Number of assembly levels is infinite.For example: Level 1 = the Build. It comes firstLevel 2 = all parents are level 1. Is next (no particular seq)Level 3 = all parents are level 2. Is next (no particular seq)etc.*/while @@Rowcount > 0insert into @t (MyID)select tbTestH.MyID from tbTestHinner join @t rList on tbTestH.ParentID = rList.MyIDwhere not exists ( select *from @t CurrentList where CurrentList.MyID = tbTestH.MyID)-- now to display the results so far.select t.*, tbTestH.* from tbTestH inner join @t t on tbTestH.MyID = t.MyID order by t.TempNodeIDGO

View 8 Replies View Related

SQL Data Structures

Aug 9, 2007

What is included under SQL Data structures? Could anyone refer me to some good tutorials on that material?

View 2 Replies View Related

'Diff' For Tables *structures* Rather Than Data

Jul 20, 2005

If I have two sql server databases that started out with identicaltable/key/index structures, but were not properly kept in sync, isthere any way I can generate a table change script to essentially'diff' the two databases and come up with table change scripts tobring one in line with the other?An answer to this age-old question of mine would make me veryhappy...!Brian

View 2 Replies View Related

Copy SQL Data Structures From One Server To Another

Oct 17, 2007

Hello,
I have a sql database server (let call it server A) which has SQL program files installed on C:, and SQL data structures MSSQL (include subdirectories BAckup, DATA, FTDAT, JOBS, LOG, REPLDATA) on F:. A new server (call it server B) was cloned of server A but only at the C: partition. I still need to manually copy the SQL data structure on F: drive from A to B. The purpose of setting up server B is to test the restore of backup of server A and eventually want it to serve as the standby server should server A crashes. My questions are
1. Can MSSQL directory be copied from A to B without stopping the SQL server service on A first?
2. I will use robocopy for copying data over, what switches should I use to retain all database file security, permission, etc..
3. Currently I can not start the SQL service on server B because part of MSSQL directory is missing from the F: drive. so theorically, after I manually copy that folder over, I should be able to start the sql service. Am I right? Is there any steps that I might have overlook here. Any errors I might encounter doing it this way

Once I can get the sql started, I can take care of the restore part.
Thanks for any insights or suggestions you can provide on this.


View 7 Replies View Related

Complex DB Search Forms (Store Proc Vs. Complex Where)

Nov 12, 2003

I have web forms with about 10-15 optional search parameters (fields) for a give table. Each item (textbox) in the form is treated as an AND condition.

Right now I build complex WHERE clauses based on wheather data is present in a textbox and AND each one in the clause. Also, if a particular field is "match any word", i get a ANDed set of OR's. As you can imagine, the WHERE clause gets quite large.

I build clauses like this (i.e., 4 fields shown):

SELECT * from tableName WHERE (aaa like '%data') AND (bbb = 'data') AND (ccc like 'data%') AND ( (xxx like '%data') OR (yyy like '%data%') )

My question is, are stored procedures better for building such dynamic SQL clauses? I may have one field or all fifteen. I've written generic code for building the clauses, but I don't know much about stored procedures and am wondering if I'm making this more difficult on myself.

View 7 Replies View Related

If Else Query For A Complex Data Set

Jan 4, 2007

I am creating an application which uses logic similar to J.D.Edwards (for those of you are familiar with its wildcarding data structure). 
 
Basically, a customer purchases a particular house, with a particular elevation, in a particular community.  This data is stored in a Customer table. From the customer’s selection (community, plan, elevation) criteria, I need to create a unique list of options from data stored in an optionmaster table.
 
A customer’s data looks similar to this in the customer table:
 





CustomerID

CommunityID

Community Name

PlanID

Plan Name

ElevationID

ElevationName


1234567

7

Hickory Hills

25

Allen

3

C
 
The Optionmaster table is structured like this (there are actually about 1000 records):
 





Option #

Option Name

CommID

Community Name

PlanID

Plan Name

ElevID

Elevation Name

Price


4567

Optional Window

0

+

0

+

0

+

250


1234

Optional Door

0

+

0

+

0

+

100


1234

Optional Door

7

Hickory Hills

0

+

0

+

0


4567

Optional Brick

0

+

25

Allen

0

+

250


9101

Optional Dormer

0

+

25

Allen

2

B

50


9125

Optional Tub

8

Smithville

0

+

0

+

800


9125

Optional Kitchen

0

+

0

Lori

0

+

2500
 
 
 





First. Based on the customer’s table I need to first select all options = to their community, as well as those available to communities everywhere (+).  In some cases the same option is maintained for both at both levels.  In that case the community specific option must be selected. 
 
To do this I think I need an if else statement to select those records:
 
In this case, if CommID =7, select record, else select 0.  This eliminates the other Smithville community and pulls the correct option # 1234.
 
The result would look like this:


 

 

 

 

 

 

 

 

 


Option #

Option Name

CommID

Community Name

PlanID

Plan Name

ElevID

Elevation Name

Price


4567

Optional Window

0

+

0

+

0

+

250


1234

Optional Door

7

Hickory Hills

0

+

0

+

0


4567

Optional Brick

0

+

25

Allen

0

+

250


9101

Optinal Dormer

0

+

25

Allen

2

B

50


9125

Optinal Kitchen

0

+

0

Lori

0

+

2500


 

 

 

 

 

 

 

 

 


Second, from this dataset, I need to select all options equal to the plan ID, and those which apply to all plans (+).  So, the Lori Plan data goes away.
 
Something like,  If the plan ID = 25, select record, else 0.  the result would be:


 

 

 

 

 

 

 

 

 


Option #

Option Name

CommID

Community Name

PlanID

Plan Name

ElevID

Elevation Name

Price


4567

Optional Window

0

+

0

+

0

+

250


1234

Optional Door

7

Hickory Hills

0

+

0

+

0


4567

Optional Brick

0

+

25

Allen

0

+

250


9101

Optinal Dormer

0

+

25

Allen

2

B

50


 

 

 

 

 

 

 

 

 


Third and finally, based on that dataset, I would have to select any elevation specific options for that plan or options for all elevations of that  plan (+). 
 
Something like this: If the Elevation ID = 2, select record, else. 0.  Note the elevation B data goes away.
 
The final result would be for this customer is:


 

 

 

 

 

 

 

 

 


Option #

Option Name

CommID

Community Name

PlanID

Plan Name

ElevID

Elevation Name

Price


4567

Optional Window

0

+

0

+

0

+

250


1234

Optional Door

7

Hickory Hills

0

+

0

+

0


4567

Optional Brick

0

+

25

Allen

0

+

250
 
Any assistance anyone can provide in coming up with a sql statement to do this would be appreciated.
 
 

View 5 Replies View Related

Exporting Complex Data To CSV

May 12, 2007

I want to export data to CSV that is nested.
eg.Poll 1,val1,val2
Question1,Q1val1,Q1val2
AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1
AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2
Question2,Q2val1,Q2val2
AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1
AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
AnswerQ2A3,Q2A3val1,Q2A3val2, TallyQ2A3
 
Best practices-wise, what should my data end up like?
Since it's nested surely it can't be simply a list of identically-formatted rows, one for each answer:
Poll1,val1,val2,Question1,Q1val1,Q1val2, AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1,Poll1,val1,val2,Question1,Q1val1,Q1val2, AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2,Poll1,val1,val2,Question2,Q2val1,Q2val2, AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1,Poll1,val1,val2,Question2,Q2val1,Q2val2, AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
Do I end up with three separate tables?
Poll1,val1,val2
Question1,Q1val1,Q1val2, Question2,Q2val1,Q2val2
AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1,AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2,AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1,AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
If that's so, do I simply concatenate them in the final file? Or do I have three separate files? And do I label them uniquely such as Poll1Main, Poll1Questions and Poll1Answers so that I can export several polls side-by-side without overwriting each other?
 

View 1 Replies View Related

Complex Data Forms

Aug 14, 2004

I could really use some suggestions on the best way to get the results of a pretty complex aspx form. There are a whole bunch of search criteria. Most of the criteria are ranges of numbers such as a starting number and ending number but other criteria need to search text fields for keywords. Most fields are optional which means that many values will not be submitted. Not that there is a right and wrong way to do it, but what typically works out better for these things, an aspx procedure that puts together a highly complicated select statement or writing a highly complicated stored procedure? Either way I see a ton of if statements, or am I making this a lot harder then it needs it needs to be?

Thanks.

View 2 Replies View Related

Slightly Complex Data Ordering

Jul 18, 2006

I'm a SQL noob still and need some help figuring out a weird problem. I have directory information I am trying to pump out in the correct order, no big deal except some entries need to be categorized based on a simple hierachy. So for example, there is an entry for a company division, and then there are all the subdivisions, and then a few offices. So it goes like this:

Divsion=Computing
Subdivision=Networking
Subdivision=Development
Subdivision=Support
Office=Desktop
Office=Application

In other words, Desktop is an office in Support which is a part of Computing.

Now what I want is to basically pump all that data out via SQL in that exact order. So I have 3 fields that I am using and then trying to arrange it using Order By - except it doesn't come out correctly.


Code:


SELECT Division, Subdivision, Office
FROM directory
ORDER BY Division, Subdivision, Office



What happens with this is that I end up with all my Divisions in order only. So for example, the main entry for Computing has "Computing" as it's Division and Office, but I want it to appear first in the list so I set Subdivision to be "A" - Instead of it appearing first it appears second below an entry for a different Division that also has it's Subdivision set as "A". I end up with Divisions mixed into the wrong cluster of subdivisions and offices.

Anyone have any ideas? It seems like this should be fairly simple and yet somehow it isn't. Thanks in advance for any help!

View 7 Replies View Related

Is Sql Server Able To Handle Complex Data

Feb 16, 2006

hey
is sql server able to handle complex data compared to oracle ,mysql or access

View 10 Replies View Related

Transact SQL :: Complex Query And Insert Data

Sep 1, 2015

I have three tables and all three are linked. Looking for query so that I can get the desired result. Notes for Table_A and Table_B:

ROW Data are given in the variables to insert the Row data. If these Row data are already exist with the exactly same sequence in the row of table then don't need to INSERT data again.If these variable date doen't exist then need to add this row.

Notes for Table_C:

Seq_id_Table_A is a Seq_id of #table_A. Seq_id_Table_B is a Seq_id of #table_B.

--Table_A----------------------Variables for Table_A--------------------
Declare @table_A_Y char(4)='TRC'
Declare @table_A_Y1 char(2)='1'

[code]...

View 6 Replies View Related

Web Service Data Source Complex Parameters

Feb 8, 2007

I am building a report that takes a web service as data source. This web service does not take primitive types as parameters. The signature is something like this:

<soap:Body>
<GetXml xmlns="myreports.ws">
<root >
<TP Name="string">
<B Name="string" Surname="string">
<SA xsi:nil="true" />
</B>
<B Name="string" Surname="string">
<SA xsi:nil="true" />
</B>
</TP>
<TP Name="string">
<B Name="string" Surname="string">
<SA xsi:nil="true" />
</B>
<B Name="string" Surname="string">
<SA xsi:nil="true" />
</B>
</TP>
</root>
</GetXml>
</soap:Body>


My question is: how do I pass the xml to the web service from reporting services.

I have seen examples with simple types. They do it with this query:

<Query>
<SoapAction>myreports.ws/GetXml</SoapAction>
<Method Namespace="myreports.ws" Name="GetXml"></Method>
<Parameters>
<Parameter Name="Parameter1">
<DefaultValue>some value</DefaultValue>
</Parameter>
</Parameters>
<ElementPath IgnoreNamespaces="True">
GetXmlResponse{}/GetXmlResult{}/diffgram{}/NewDataSet/Element{@Attribute1,@Attribute2}
</ElementPath>
</Query>

But there are no example on using xml directly instead of parameters. Can anyone help me? Where do I put my xml?



View 3 Replies View Related

Data Reader Source As ODBC / Complex Sql

May 30, 2007

Hello All,



How do I get columns to output when I have a data reader source? My connection is an ODBC and does complex sql. I am connection to a Netezza database and I would like to execute a very complex query, but in essence does



Create newtable as

(select day, sessionId)

from source

// lots of other joins and unions



select day, sessionId from newtable





drop newtable



I have an ODBC connection and I have a Datareader source, I cannot connect this source to my SQL Server destination because no output columns are available. What am I missing here?



Are there any good examples of this, taking data from a ODBC source into SQL server?



Thanks in advance.

View 5 Replies View Related

Consuming WCF Service With Complex Data Type In SSIS

Oct 9, 2007



Hi,

Need a guidance on consuming the WCF service with complex type in the SSIS package.
I have a WCF service with complex type inside the complex type (Nested complex type) in the web method as an argument. When I try to use this WCF service in the SSIS web service task, I get an error "The web method has unsupported arguments".

I am able to consume the WCF service with the web method having Complex type and simple/prmitive type in side that as argument.

For example:

The web method in WCF service which accepts the argument as comlex type say "Employee" whose structure is:

Employee
{
FName String;
LName String;
Age int
}

It is possible to consume this WCF service and pass the arguments.

But when the Employee complex type is changed to have one more complex type in side it it give the above mentioned error. The Employee type is modified as:

Employee
{
FName String;
LName String;
Age String
Type EmployeeType;
}


EmployeeType
{
type string;
}

Now I get the error Web Method has unsupported arguments.

Can this be done in SSIS?

Virendra

View 3 Replies View Related

SSIS Complex Joins From Seperate Data Sources

Oct 30, 2007



Hi,

I'm trying to replicate a SQL join across two seperate data sources in SSIS. If I were to write SQL to do this, it would be as follows:


SELECT Costs.CostRateEntryId,

Costs.UserId,

Costs.HourlyRate * 8 AS DailyCostRate,

Dates.DateKey,

Dates.ActualDate,

FROM Costs

INNER JOIN Dates ON Dates.ActualDate >= Costs.EffectiveDate AND Dates.ActualDate <= Costs.EndDate


Unfortunately, as the tables 'Dates' and 'Costs' are in two seperate SQL2005 systems, I can't really do this. I was hoping that it could be achieved in SSIS, but I cant seem to find any way that I can do a join that's <= or >=.

Can anyone help?

Thanks
Jeremy

View 7 Replies View Related

FileGroup Structures

Apr 14, 1999

I have 2 test database identical in size and table structure, only one resides on filegroups and one resides on a single file.
From everything I have heard filegroups are suppose to improve performance. I stop and start the server before each test to clean out
cache. When I run the filegroup test initially the first run averages 20 seconds slower then the database sitting on the single file. However
on consective runs there is a significant improvement in performance with filegroups verses single files. I have
the indexes sitting on a separate filegroup and 2 additional filegroups to spread the tables across. Does any one know what would be causing
the performance to degrade on the initial run of the test. (The test by the way is a stored procedure that runs a select statement against each table).

Any Info Will help Thanks
Barb

View 3 Replies View Related

Tree Structures In SQL

Jun 11, 2006

Hi,

i'm writing a app in c# and have to store Trees in a Database.

I'm working with Datasets for the exchange between the DB and the App.

The trees have the same options like the windows folders. If u delete a node, all subnodes should be deleted too.

But something a Foreign Key from ParentID references (Id) with the delete-Rule on cascade seems not to be possible, because of multiple cascade Paths or cycles. Do i have to add some xtra constarins:

Not Possible:

create Table tree (
Id varchar Not null,
ParentId varchar Not null,
Constraint pk1 Primary Key (Id),
Constraint fk1 Foreign Key (ParentId) references tree(Id)
On Update Cascade
On delete CAscade
)


Do i have to write triggers, which delete The subnodes too and set the Update-/deleterulr on NO Action

Greetz

View 1 Replies View Related

Tree Structures...

Oct 24, 2006

Does anyone know any good links for SQL tree structures and example queries and stuff... I cant really find anything part from the standard example of emplyee, boss, salary which explains how to create the tree table...(dun dis bit) I did notice a book but I live in a little village so cant go get it till wekend?

I'm desperate, reli need to work out how too do this.....

View 14 Replies View Related

Mining Structures

Aug 23, 2006

I am using the wizard to create a new mining structure and getting the error at the time of selecting the datamining technique like either microsoft decision tree or microsoft timeseries etc.,

"Unable to retrieve a list of supported data mining algorithms. Make sure you are connected to the correct Analysis Services server instance and the Analysis Services server named localhost is running and configured properly. You can continue with a default list of data mining algorithms."

What is that means?

Thanks in advance,

View 3 Replies View Related

Printing Out Table Structures......

Nov 15, 2000

I have a SQL 7 database with about 30 tables in. For documentation purposes I need to print out the structures of each table. I have tried using the diagram tools but no joy.

I have access to Access, Crystal Reports, if these are any use?

Please help!!

Tony Kavanagh

View 3 Replies View Related

Tools For Db Structures Comparision

Jul 10, 2002

Hi,Does any of u folks used any tools for database structures comparision??

I have used DBDIFF(from DKGAS.com) ChangeManager from Embarcadaro and SQL COMPARE from Redgate.

I did have have some problem in each of these tools AND am looking for some good tools which are economical also.

Thx in advance
Ravi

View 2 Replies View Related

Table Structures Script

Dec 11, 2006

I will soon be writting a script which will search threw all tables in my database and try to find how they may be linked to one another, and also which tables are called by which stored procedures, any suggestions or tips would be great.

View 1 Replies View Related

Rendering Directory Structures

Oct 31, 2005

Hi, I have a table of folders that I would like to be able to displayin a depth first manner, similar to what you would see in WindowsExplorer. the table is defined similar toCREATE TABLE Folders (folderID int,parentFolderID int,name varchar(32)).... I've left some things out of the definition for the simplicity ofexample.My desire is to quickly generate a record set containing the all childfolders of a specific folder along with the how many levels deep eachfolder is, in a quick and memory efficient manner. I have done someresearch through this group and found a few examples similar to what Ihave hypothesized, however I was hoping for some feedback on what Ihave decided to use.Since this database table is already created and I cannot modify theexisting schema, it would not be very feasible to use a nested setsmodel (unfortunately -- or if anyone has a suggestion?).I plan on using a stored procedure that recusively calls itself.something similar to the following:/* This is assuming the table #TempFolderTable has* already been declared globally*/sp_FolderDisplayRecurive @folder int, @level int ASIF @@NESTLEVEL > 31 RETURN;DECLARE @childFolder INTDECLARE folders_cursor AS CURSOR LOCAL FORSELECT folderID FROM FoldersWHERE parentFolderID = @folderIDOPEN folders_cursorFETCH NEXT FROM folders_cursorINTO @childFolderwhile @@Fetch_status = 0BEGIN-- Insert current folder into-- folder table (under parent @folder)INSERT INTO #TempFolderTable(FolderID, DepthLevel, ParentFolderID) VALUES(@childFolder, @level, @folder)-- Iterate over all of its childrenEXEC sp_FolderDisplayRecursive@childFolder, @level + 1FETCH NEXT FROM folders_cursor INTO @childFolderEND...Will this incure a large overhead for a deep directory structure? Arethere any other problematic issues? Any suggestions and/or commentsare very welcome. Thanks!

View 3 Replies View Related

How To Compare Database Structures?

Jul 20, 2005

Let us suppose that I have two similar databases and need to create ansql-script upgrating one database structure to another. For example, thesedatabases are from different versions of some software, first is from earlyversion, next is from current, and second one contains several new tables,sevelal new fields in old tables, several new or changed stored procedures,UDFs and so on.How to solve this problem using standard tools?

View 6 Replies View Related

Comparing Table Structures.

Oct 18, 2006

Hi all,

Could anyone let me know if there are any Scripts available for comparing the schema differences between two SQL server databases?

Thanks

DBAnalyst



View 2 Replies View Related

Compare Tables Structures

Apr 1, 2008



Hi All,

I have 2 tables in different database. I need to compare the tables structure and insert the fields if not existing.

Ex:

I have 3 fields in table1.(database name Pubs)

Table1
F1
F2

F3

I have 2 fields in table2.(database name northwind)

Table2
F1
F2


I need to insert the table1.F3 into Table2. Basically i need to compare all the fields with table1, if not exist in table1 i need to insert that field into table2. I am using SQL Server 2000. Please send me the code.

Thanks,
Mears

View 7 Replies View Related

Open Source DB Structures

Oct 27, 2006

I'm wondering if anyone knows of a good site to find open source database structures (such as ERD's, scripts, or something of that nature)?

I think I have a pretty good handle on database design, but it would be nice to have a resource like that so that I can compare the design of my DB to DB's that people (smarter and more experienced than me) have created for similar purposes.

What I'm thinking of is a site like Open Source Web Design (www.oswd.org) for Databases. Anyone know of anything?

View 1 Replies View Related

Changing Database Structures Through Code

Apr 28, 2006

I am having a hard time finding materials on this subject.  I am guessing I am using the wrong keywords to search.  Basically, I want to be able to modify database tables through a web form.  They can add columns and delete columns through the form.  I would just want to default the type of column and the length.  I am sure it has been done, I was just wondering if anyone had some resources they could throw my way.  I would appreciate it.  Thanks.

View 1 Replies View Related

Merging Two Databases With The Same Table Structures

Oct 20, 2000

Hi
I have a problem out here. I have two databases with the same table structure
and I want to merge data from both the tables . Please can anyone let me know.
Iam using Sql Server 7.0.

Thanks
Bye

View 1 Replies View Related

Printing Out Table Structures, Rows

Dec 5, 2000

Hello !! :O)

I have a SQL 7 database with some tables in. For documentation purposes I need to print out the structures of each table and all the rows in every table.

Please help!!

Thanks

View 2 Replies View Related

Copy The Table Structures Of All The Tables

Nov 16, 2006

CREATE TABLE table_name AS SELECT STATEMENT WHERE rownum = 0; this query will copy the table structure of one table without copying the data. I need to copy the table structures of all the tables in a particular database without copying the data.suggest me on this.

View 6 Replies View Related

Sql Server 2005 And Tree Structures

Mar 9, 2007

I am trying to traverse a tree structure like below,

1 Pets
--1.1 Cat
----1.1.1 Persian
----1.1.2 Bengal
--1.2 Dog
----1.2.1 Poodle
2 etc

I would like to be able to search by a keyword, i.e. Poodle, or the reference number, i.e. 1.2.1. I would prefer to do this all through a stored procedure if possible, it seems recursion is the way to go as the number of levels may increase in the future but i'm completely new to this. From what i've seen so far I would need a table structure with a parentID,NodeID,Name field and Primary key.

i.e,

ID...Name......Parent.....NodeID
1....Pets.........0............1
2....Cat..........1............1
3....Dog..........1............1
4....Persian.....2............1
5....Bengal......2............2
6....Poodle......3............1
etc

i've heard that SQL SERVER 2005 provides recursion through CTE, is this the recommended way/only way to achieve this?

Any tips on where to start would be really appreciated.

View 3 Replies View Related







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