Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I make custom table in my DB?

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-05-23 : 04:06:17
Hi All,

I don't know,is it correct question or not,but if it is doable,it will be useful in my database Design.

I want to store Cuboid dementions in my databse table,each cuboid dimention format is in following below.

{{xmin,ymin,zmin},{xmax,ymax,zmax}}.

I have 30 dimentions,all are same format what I mention above.

I want to create Table for this type of data.For this I tried with following code.after evaluation below code,it returns (1 row(s) affected)

CREATE TABLE DimentionsTable (Xmin int,Ymin int,Zmin int,Xmax int,Ymax int,Zmax int);
INSERT into DimentionsTable values(10,20,30,40,50,60)

Know,I connected DB through WolframMathematica.I fetching data from DB.but I am getting output like {10,20,30,40,50,60},Indirectly it returns first row values in list form.But I want the format {{10,20,30},{40,50,60}}.for this How can I make table.

I hope you understood,what I am trying.

is it doable?

Thank you.



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-23 : 04:15:55
you can store them in separate rows if you want
fields will be

ItemID DimensionID XVal YVal ZVal
1 1 10 20 30
1 2 40 50 60


then based on dimensionid value you can get various coordinates

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

shettybhas
Starting Member

3 Posts

Posted - 2013-05-23 : 04:18:44
quote:
Originally posted by grandhi

Hi All,

I don't know,is it correct question or not,but if it is doable,it will be useful in my database Design.

I want to store Cuboid dementions in my databse table,each cuboid dimention format is in following below.

{{xmin,ymin,zmin},{xmax,ymax,zmax}}.

I have 30 dimentions,all are same format what I mention above.

I want to create Table for this type of data.For this I tried with following code.after evaluation below code,it returns (1 row(s) affected)

CREATE TABLE DimentionsTable (Xmin int,Ymin int,Zmin int,Xmax int,Ymax int,Zmax int);
INSERT into DimentionsTable values(10,20,30,40,50,60)

Know,I connected DB through WolframMathematica.I fetching data from DB.but I am getting output like {10,20,30,40,50,60},Indirectly it returns first row values in list form.But I want the format {{10,20,30},{40,50,60}}.for this How can I make table.

I hope you understood,what I am trying.

is it doable?

Thank you.






Create your Table Structure as below with flag of Min & max Seprately.
XValue - x Value
YValue - y Value
ZValue - z Value
Flag - 0 For Min and 1 For Max

Insert the rows seperately for Min and Max, so you will get seperate rows for Min & Max as you desired.
Go to Top of Page
   

- Advertisement -