SCHEMA -- 1000 Products With Different Attributes

Jul 20, 2005

[crossposted]

Hi, I wonder if anyone might lend me a brain.

I have a stock database to build that covers over 1000 products, which
might be said to exist in around 50 product families.

Obviously, just to be awkward all the types of stock will have
different attributes. So one product might be a tube with
inside/outside diameter and length and another a T shaped cable joint.

All I can come up with is a separate table for each stock type family
and store the table name and product code in the main stock table, so:

Tables:
ProdAProdBProdCStock

Stock attributes:
ProdId
ProdTable
Amount
Date
etc..

ProdA attribute:
ProdId
AttributeX
AttributeY
AttributeZ
etc..

Then use code to parse the table and product ID to select the correct
query to get the product details. BUT This seems awefuly inelegant and
potentially wrong so I'm loathe to continue down this route.

Can anyone tell me the "right" way to do this, I feel sure it must be
a classic db design exercise, but unfortunatly one they didn't teach
us at University -- or maybe I was asleep...

Thanks!

View 4 Replies


ADVERTISEMENT

Schema Properties/attributes Not Transferred By Transactional Replication

Jun 15, 2004

Apart the IDENTITY property, what other properties or attributes are not transferred to the target schema?

I know that one can use NOT_FOR_REPLICATION for identities, but I am interested in a (complete?!) list of metadata objects that transactional replication *prefers* not to transfer across to the target by default.

TIA

View 2 Replies View Related

XML Source: String Types Lose Length Attributes In XML Schema?

Jan 25, 2007

I'm having a problem with the XML Source data flow component not transferring the length attributes from an XML Schema to the column attributes of the output table.

An example schema that I have is:

<?xml version='1.0' encoding='UTF-8'?><data xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><xsd:schema> <xsd:simpleType name='NameType'> <xsd:restriction base='xsd:string'> <xsd:minLength value='0'/> <xsd:maxLength value='50'/> </xsd:restriction> </xsd:simpleType> <xsd:element name='Name' type='NameType' nillable='true'/> <xsd:simpleType name='FamilyType'> <xsd:restriction base='xsd:string'> <xsd:minLength value='0'/> <xsd:maxLength value='50'/> </xsd:restriction> </xsd:simpleType> <xsd:element name='Family' type='FamilyType' nillable='true'/> <xsd:element name='row'> <xsd:complexType> <xsd:sequence> <xsd:element ref='Name'/> <xsd:element ref='Family'/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name='data'> <xsd:complexType> <xsd:sequence> <xsd:element ref='row' maxOccurs='unbounded'/> </xsd:sequence> </xsd:complexType> </xsd:element></xsd:schema> <!-- data follows --> <row><Name>Fred</Name><Family>Jones</Family></row></data>
When I reference file in the XML Source data control, it correctly infers that there are two columns, but the length of the strings in the columns are set as 255.

This behaviour appears to be at odds with the SSIS documentation (SQL Server Integration Services/Integration Services Object and Concepts/Data Flow Elements/Integration Services Sources/XML Source), which states (highlighting mine):

When the data is extracted from the XML data file, it is converted to an Integration Services data type. The XSD or inline schema may specify the data type for elements, but if it does not, the XML Source Editor dialog box assigns the Unicode string data type (DT_WSTR) to the column in the output that contains the element, and sets the column length to 255 characters. If the schema specifies the maximum length of an element, the length of output column is set to this value. If the maximum length is greater than the length supported by the Integration Services data type to which the element is converted, then the data is truncated to the maximum length of the data type. For example, if a string has a length of 5000, it is truncated to 4000 characters because the maximum length of the DT_WSTR data type is 4000 characters; likewise, byte data is truncated to 8000 characters, the maximum length of the DT_BYTES data type. If the schema specifies no maximum length, the default length of columns with either data type is set to 255. Data truncation in the XML source is handled the same way as truncation in other data flow components. For more information, see Handling Errors in Data.

Has anyone had any luck in getting string lengths automatically extracted from an XML document? If so, where I am going wrong?

Regards,

Michael

View 10 Replies View Related

Master Data Services :: Change Order Of Attributes Using Arrows Jumps Over 24 Attributes

Jun 30, 2015

I am working in SQL Server Master Data Services  Version 11.0.5058.0 (SP 2).

I have been asked to group all the financial attributes together.  When I move one of the attributes up using the arrows, it works good jumping over one attribute at a time.  Then I reach a section of attributes where it leap frogs over 24 attributes.

It appears these 24 attributes are in a subgroup but there are no attribute groups and I removed the subscription view from the entity.  If I move one of the 24 attributes in the group, it moves it outside of the 24 attributes.

This is under leaf member attributes.  There are no collection or consolidated groups.

View 2 Replies View Related

Analysis :: Dimensions Attributes - Drag All Or Some Specific Attributes

May 24, 2015

I'm using a DW from Northwind database to build a cube to do some analitical taks. I already create the cube and now I am "cleaning" the dimensions. I'm having some difficults to understand the logical off this part. The reason is that When I create the Data Source View, I only import the Foreign Keys that connect the Dimensions to Fact_Table. I have to drag the attributes of Dimension from Data Source View to the tab attributes? 

Imagine this:

I have the following dimension:

Dim_Customer:
Customer_ID
Name_Customer
Job_Function
Date_of_Birth
Contact
Address
City
Country

When I create the cube only Customer_ID appears in attributes tab, it's normal? 

One more question:

I don't want to create a hierarchy like:

Customer ID -> Name_Customer
Customer ID -> Date_of_Birth
Customer ID -> Address
Customer ID -> City
Customer ID -> Country

My idea is to create the following hierarchy: 

Name_Customer -> Date_of_Birth ->  Address ->  City -> Country

But the first hierarchy that I show is always appears to me. Do you know what is happens?

View 2 Replies View Related

Car's Attributes Should Be &>= Spec's Attributes (was Help With Query)

Nov 11, 2004

Hello all-

I have a specification table that has some attributes defined.
SpecId - Id of the specification
Attribute - Attribute of the spec. (Like Color, HP etc)
Value - Is the value of the attribute
Then I have a car table that actually has information about the cars. Intention is to take each specification and match the cars that match the specification. If the car has more attributes than the spec, we ignore the extra attributes for the match. But if the car has less attributes, we don't even consider the car as a match (even if the attributes present, match). To summarize, the car's attributes should be >= spec's attributes.

The code I have below is bad because I am joining the same tables twice. In addition, it fails in the condition "the car's attributes should be >= spec's attributes"

Any help is greatly appreciated.




DECLARE @Specification TABLE
(SpecId VARCHAR(10),
AttributeVARCHAR(100),
ValueVARCHAR(100))

DECLARE @Car TABLE
(CarName VARCHAR(10),
AttributeVARCHAR(100),
ValueVARCHAR(100))

INSERT INTO @Specification VALUES ('S1', 'Type', 'Sedan')
INSERT INTO @Specification VALUES ('S1', 'Transmission', 'Auto')
INSERT INTO @Specification VALUES ('S1', 'HP', '220')

INSERT INTO @Specification VALUES ('S2', 'Type', 'SUV')
INSERT INTO @Specification VALUES ('S2', 'Transmission', 'Manual')
INSERT INTO @Specification VALUES ('S2', 'HP', '300')

INSERT INTO @Car VALUES ('Accord', 'Type', 'Sedan')
INSERT INTO @Car VALUES ('Accord', 'Transmission', 'Auto')
INSERT INTO @Car VALUES ('Accord', 'HP', '220')
INSERT INTO @Car VALUES ('Accord', 'Color', 'Black')

INSERT INTO @Car VALUES ('Escape', 'Type', 'SUV')
INSERT INTO @Car VALUES ('Escape', 'Transmission', 'Manual')
INSERT INTO @Car VALUES ('Escape', 'HP', '300')

INSERT INTO @Car VALUES ('Explorer', 'Type', 'SUV')
INSERT INTO @Car VALUES ('Explorer', 'Transmission', 'Manual')

SELECT DISTINCT Spec.SpecId, Car.CarName
FROM @Specification Spec
INNER JOIN @Car Car
ON Spec.Attribute = Car.Attribute
AND Spec.Value = Car.Value
WHERE Spec.SpecId NOT IN (SELECT Spec.SpecId
FROM @Specification Spec
LEFT OUTER JOIN @Car Car
ON Spec.Attribute = Car.Attribute
AND Spec.Value = Car.Value
WHERE Car.CarName IS NULL)

View 2 Replies View Related

The 'System.Web.Security.SqlMembershipProvider' Requires A Database Schema Compatible With Schema Version '1'.

Sep 27, 2007

Locally I develop in SQL server 2005 enterprise. Recently I recreated my db on the server of my hosting company (in sql server 2005 express).I basically recreated the tables and copied the data in it.I now receive the following error when I hit the DB:The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'.  However, the
current database schema is not compatible with this version.  You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.I heard something about running aspnet_regsql.exe, but I dont have that access to the DB. Also I dont know if this command does anything more than creating the membership tables and filling it with some default data...Any other solutions/thought on what this can be?Thanks!

View 4 Replies View Related

My 'Products' Table

Aug 4, 2007

hello,
i have a Products table, and i want to make an image data type to one of his rows (Picture1 for example), i want to know, what is best, to store the picture in the database or store only the direction to the picture?
 if i store only the direction, i should take it from some output parameters of the Upload function of ASP and the add it to the Database? can i add it to a special folder for example MySiteUserName + file name?
and another thing: let's say i have Promotion - tinyint, to store the promotion value of this product..If i show products using DataList, i could order my products first after Promotion and then after date added? could i use a special CssClass(font weight or other background) for the products witch has the Promotion more than 10 for example?
how can i know the exact date time (yy/mm/dd/hh/mm) ? - it is taked from the Server date?
thank you

View 3 Replies View Related

Backup Products

Jan 11, 1999

For the last 2 years we have been using ArcServe for Windows NT (version 6.0 and 6.5) with the Backup Agent for SQL Server. We are now re-evaluating our backup software. Our primary issues with ArcServe are that it has been unstable, unreliable and it does not support the full SQL Server recovery functionality. ArcServe does not include the ability to do point-in-time database recovery. Nor does it support single table restores (when a full database backup was performed). These last 2 items are critical and necessary features at my installation.

What products do people recommend for performs Windows NT files and MS-SQL Server backups?

View 2 Replies View Related

Top 3 Of All Top Products (was Need Help With A Query)

Feb 25, 2005

Consider the below tables

Table: Products
----------------------------------------------------
| pid | pname | ranking | cat1 | cat2 | cat3 | mid |
----------------------------------------------------
| 1 | x1 | 20 | 2 | 3 | -1 | 1 |
| 2 | x2 | 40 | 3 | 2 | -1 | 1 |
| 3 | x3 | 80 | 2 | 4 | -1 | 1 |
| 4 | y1 | 40 | 2 | -1 | -1 | 2 |
| 5 | y2 | 60 | 1 | 3 | -1 | 2 |
| 6 | z1 | 50 | 3 | -1 | -1 | 3 |
| 7 | z2 | 70 | 1 | 3 | -1 | 4 |
----------------------------------------------------

Table: Manufacturers
---------------
| mid | mname |
---------------
| 1 | A1 |
| 2 | B2 |
| 3 | C3 |
---------------

Table: Categories
---------------
| cid | cname |
---------------
| 1 | I1 |
| 2 | J2 |
| 3 | K3 |
---------------

Say if I want to get the top 3 products that fall under category "J2" and have them ordered by ranking then I would use the

below query

ELECT DISTINCT TOP 3 mid, pid, pname, prank, mname
FROM Products, Manufacturers, Categories
WHERE Products.mid = Manufacturers.mid AND (cat1=2 OR cat2=2 OR cat3=2)
ORDER BY ranking


Now what if I need the top 3 ranked products that fall under category "J2" and have them ordered by ranking selecting only

one product from each manufacturer. So in order words I want the top ranked product from each manufacturer.

What would that query be?

I am having a really tough time and have already spent quite sometime on it unsuccessfully. I would appreciate any help.

View 8 Replies View Related

Different Products Of SQL Server

Nov 6, 2007

Hi guys, I am an absolute beginner to SQL Server, so please excuse my
simple questions. What is the difference between:

1) Microsoft SQL Server 2005
and
2) Microsoft SQL Server 2005 Express Edition
and
3) MSDE?

Do both the SQL Server and Express Edition have the same functionality?

Thanks,
Kon

View 1 Replies View Related

What Software Products Should I Use?

Sep 30, 2007

I want to have visitors to my website get price calculations from my database based on input variables which the visitor enters. I think I need the combination of Access, ASP.NET, and Sql Sever. Is this correct?

View 5 Replies View Related

1000 To 1,000

Aug 25, 2004

Does anyone know how to convert the number 1000 to appear as 1,000 in a SQL Statement?

View 4 Replies View Related

Transferring Objects Form Schema A To Schema B In One Shot....!

May 27, 2008

I have 35+ tables and 15+ stored procedures with SchemaA, now I want to transfer them to SchemaB.

I know how to do one by one...!

alter schema SchemaB transfer
SchemaA.TableA

but it will take long time...!

Thanks,

View 3 Replies View Related

Having A Problem Inserting Products

May 3, 2007

I am trying to write a bit of code that I can pass a brand name to. If the brand name exists I want to return the brandid to the calling middle tier. If the brand id does not exist I want to insert and then return the new brand id. The code below works unless the brand does not exist. Then it inserts, and I get an application exception. Next time I run the code it continues on until the next time it has to do an insert. So the inserts are working, but getting the value back is resulting in an application excetio.
 
Middle Tier Function (
private static int GetBrandForProduct(clsProduct o)
{
int brandid = -1;
// If the brand name comes in blank use the first word of the overstock product
o.BrandName = o.BrandName.Trim();
// if we do not have a brand for this product
if (o.BrandName.Length == 0) return -1;
Database db = CommonManager.GetDatabase();
;
try
{
// Get the brand id for this brand name
// If it does not exist we will add it and STILL return a brand id
object obj = db.ExecuteScalar("BrandIDGetOrInsert", o.BrandName);
string catid = obj.ToString(); *** FAILING LINE ***
return Convert.ToInt32(obj.ToString());
}
catch (Exception ex)
{
throw ex;
return -1;
}
return brandid;
}
Stored Procedure: -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
ALTER PROCEDURE [dbo].[BrandIDGetOrInsert]
-- Add the parameters for the stored procedure here
@brandnameparm varchar(50)
AS
BEGIN
-- SET NOCOUNT ON
SELECT brandid from brands
where Lower(brandname) = Lower(@brandnameparm)
-- If we found a record, exit
 
if @@rowcount > 0 return
-- We did not find a record, so add a new one.
 
begin
 
insert into brands (Brandname) values(@brandnameparm)
 
end
SELECT brandid from brands
where Lower(brandname) = Lower(@brandnameparm)
END

View 5 Replies View Related

ShoppingCart Products Relationships

Aug 8, 2007

Hi everyone,

This is probably a very easy question:

I have a shopping cart table and two products tables (legacy reasons...).

I need to create a relationship between the ShoppingCart table and the two products tables such that no products are entered in the Cart which don't exist in either product table 1 or product table 2.

Any ideas?

Thanks heaps,

LJ.

View 1 Replies View Related

Reporting And The Express Products

Nov 20, 2005

I have successfully downloaded and installed the VS C# 2005 Express, Web Developer 2005 Express, and SQL Server 2005 Express.

View 1 Replies View Related

Selecting TOP 20 Products Per Catagory

Mar 19, 2007

Hi

I'm trying to select the TOP 20 Products per Catagory out of my Star Topology Database
if someone would PLEASE be able to help me out.

Here is my Query: -

SELECT Distinct (SELECT TOP 20 DP.[Description]), DP.Mims_Sub_Cat, SUM(FD.Cost) AS 'Cost'
FROM DIM_Product DP, FACT_Dispensary FD, DIM_Time DT, DIM_Client DC
WHERE DP.Product_KEY = FD.Product_Key
AND FD.Time_KEY = DT.Time_KEY
AND FD.Client_Key = DC.Client_KEY
AND DT.[Year] = 2007
AND DT.[Month] IN (2)
AND Client_name LIKE '%Medicare%'
AND DP.Manufacture_Name LIKE '%Cipla%'
--AND DP.[Description] IN (SELECT TOP 20 [Description])
AND DP.Mims_Sub_Cat IN (SELECT Mims_Sub_Cat)
GROUP BY DP.Mims_Sub_Cat, DP.[Description], FD.Cost
ORDER by DP.Mims_Sub_Cat, SUM(FD.Cost) DESC

My other problem is that it keeps on selecting the same products although i have a distinct in my query
The query will select a product with the amount and then select the same product again with a different amount.

Example :-

Product Descripion Catagory Cost
ULTAK TABS 150MG 60 Acid Reducers 384.94
ULTAK TABS 150MG 60 Acid Reducers 85.54
ULTAK TABS 150MG 60 Acid Reducers 56.98

View 6 Replies View Related

Converting 1000 Into 10.00

Oct 17, 2005

I have been given a Product table whoes all column types are varchar(8000)
One of the column is Price and other is DecimalPosition. Price column includes price without any decimal place and the data in DecimlaPosition column determins where the decimal should be placed.
So for instance, if the Price column includes '1000' and DecimalPosision includes '2' >> then it means that the actual price for this product is '10.00' and NOT '1000'. Similarly, if the DecimalPosision includes '3' >> then it means that the actual price for this product is '1.000' and NOT '1000'My question is that when I am getting the price for a product from this table, how can I get the price in the correct format, e..g like '10.00' and not '1000'Should I use SQL statements to convert 1000 into 10.00 or should I use some sort of programming logic to convert 1000 into 10.00.kind regards

View 2 Replies View Related

First 1000 Rows In 6.5

Oct 15, 2001

How to select the first 1000 rows from the tbale in sql server 6.5..?

View 1 Replies View Related

1000 + Databses!!

May 22, 2001

I have started to install a 3rd party web-based product for our clients that uses SQL 2000 as its backend

However every time that they create a new 'topic' within the web app, it creates a new database, with a single table in it!! - There could/will be 1000's of these 'topics' created

I have told the company we buy this from that this is not acceptable - they have asked why!!

Can anyone point me in the direction of preferably a Microsoft document that I can send to them, as just saying 'you just don't do it that way' isn't working and I can't find anything easily myself

Many thanks

View 2 Replies View Related

How Can I Store More Than One Category In A Products Table?

Apr 16, 2007

How can I store more than one category in a products table?
For exampe: I have a dvd website where the admin can add new dvd's. On the website all the categories are listed with a checkbox. If the dvd is a action comedy the admin have to check these two checkboxes. But how do I store that in the sql database an retrieve it?
 Thanks
David

View 3 Replies View Related

Products To Monitor Database Availability

Nov 4, 2003

Are there any other products out there to monitor database availability
in SQL server 2000 beside Tivoli by IBM?

Thanks;
Lava

View 1 Replies View Related

Finding Products Code With A Table

May 29, 2008

Hi i've to table where i have a product code and a area code.

I want to insert the values from table 1 into table 2 if the product code and area code do not already exists in the table in table 2.

Am using this code below but it does not seem to be working.

select distinct p_code1, area_code
from table1
where not exists
(select p_code, area_code
from table 2 )

View 2 Replies View Related

Reporting Services :: Percentage Mix Only For Top 10 Products?

Oct 23, 2015

I got a stored proc which returns the result dataset.

My requirement is to sort the final output depending on a parameter value (which is dependent on 2 different amount column from the result dataset) , display only top 10 products and equate the % mix for those 10 products only. Basically the % mix column should sum up to 100% for those top 10 products.

How do I achieve it in SSRS ?

If I do

=Fields!ProductCurrentBalance.Value/SUM(Fields!ProductCurrentBalance.Value, "ds_Top10ProductMix")

Then it divides by the SUM for all products and not the TOP 10 products only.

View 5 Replies View Related

Comparing CASE Statement Products

Sep 11, 2007

The query I have written below works fine. However, I now want to uncomment the WHERE clause below to find entries where the PatientAge does not fall between the PAGBeginningAge and PAGEndingAge. However, when I uncomment the WHERE clause line I receive the following error message:


Msg 156, Level 15, State 1, Line 28

Incorrect syntax near the keyword 'FROM'.



SELECT ampfm.rpt_AdtVisit.PatientFullName, ampfm.rpt_AdtVisit.AdmitPriorityCode, ampfm.dct_AdmitPriorityType.AdmitPriorityTypeName,

ampfm.rpt_AdtVisit.AccountNumber, ampfm.rpt_PatientDemographics.PatientAge, ampfm.rpt_PatientDemographics.PatientAgeGroup,

ampfm.rpt_PatientDemographics.PatientSex,

CASE WHEN PatientAgeGroup = '0 - 14' THEN '0' ELSE

CASE WHEN PatientAgeGroup = '15 - 24' THEN '15' ELSE

CASE WHEN PatientAgeGroup = '25 - 34' THEN '25' ELSE

CASE WHEN PatientAgeGroup = '35 - 44' THEN '35' ELSE

CASE WHEN PatientAgeGroup = '45 - 54' THEN '45' ELSE

CASE WHEN PatientAgeGroup = '55 - 64' THEN '55' ELSE

CASE WHEN PatientAgeGroup = '65 - 74' THEN '65' ELSE

CASE WHEN PatientAgeGroup = '75 - 79' THEN '75' ELSE

CASE WHEN PatientAgeGroup = '80 - OVER' THEN '80'

END END END END END END END END END AS PAGBeginningAge,

CASE WHEN PatientAgeGroup = '0 - 14' THEN '14' ELSE

CASE WHEN PatientAgeGroup = '15 - 24' THEN '24' ELSE

CASE WHEN PatientAgeGroup = '25 - 34' THEN '34' ELSE

CASE WHEN PatientAgeGroup = '35 - 44' THEN '44' ELSE

CASE WHEN PatientAgeGroup = '45 - 54' THEN '54' ELSE

CASE WHEN PatientAgeGroup = '55 - 64' THEN '64' ELSE

CASE WHEN PatientAgeGroup = '65 - 74' THEN '74' ELSE

CASE WHEN PatientAgeGroup = '75 - 79' THEN '79' ELSE

CASE WHEN PatientAgeGroup = '80 - OVER' THEN '200'

END END END END END END END END END AS PAGEndingAge

--WHERE PatientAge NOT BETWEEN PAGBeginningAge AND PAGEndingAge

FROM ampfm.dct_AdmitPriorityType INNER JOIN

ampfm.rpt_AdtVisit ON ampfm.dct_AdmitPriorityType.AdmitPriorityTypeCode = ampfm.rpt_AdtVisit.AdmitPriorityCode INNER JOIN

ampfm.rpt_PatientDemographics ON ampfm.rpt_AdtVisit.RegNum = ampfm.rpt_PatientDemographics.RegNum

View 4 Replies View Related

Transact SQL :: Compare Products With Same Option?

Sep 11, 2015

i designed a database for eshop.

i have two table one of them is products and it has id,code,name columns and the other one is option with id,proid,option,optiondes column. and there is a relationship with id from products to proid in option table.

i want to make query that results is compare two or more products with the same option column.

View 2 Replies View Related

Database Schema Compatible With Schema Version '1'

Apr 12, 2008

Hello everybody!I'm using ASP.NET  3.5,  MSSQL 2005I  bought virtual web hosting .On new user registrations i have an error =(The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version. On my virtual machine it work fine but on web hosting i have an error =(What can you propose to me?

View 2 Replies View Related

Moving Data From One DB Schema To Another DB Schema Using SSIS

May 8, 2007

Hello,



I would like to use SSIS tool to move the data from one database schema to another database schema.



For example:



Source table has

1. UserName (varchar 20) (no null)

2. Email (varchar 50) (can be null)



Destination table has



1. UserID (uniqueidentifier - GUID)

2. UserName (varchar 50) (no null)

3. EmailAddress (nvarchar 50) (can be null)

4. DateTime



Questions:



1. What controls do I use in my Data Flow to make data move between databases with different data types and include new value in UserID as a new GUID and DateTime as a date (GETDATE)?

OLE DB Source, OLE DB Destination, Data Converson and .....

How do I insert Guid and Date at the same time?





2. I have many tables to do data moving. Any sugestions? How do I architect my project? If I create many data flows for each table - it will look complicated.



Please give me some advices here.



Thanks.

View 3 Replies View Related

Commit After 1000 Recs

Aug 22, 2002

if l want to commit the transactions after every thousand how would l build it into the script?

Begin Transaction

Select a.AccountNo,
a.TransactionNo,
a.TransactionAmount,
a.TransactionDate
Into dbo.test1

From Trans_May_14Aug2002 a,Reds_JuL_Trans_08Jul2002 b

Where ltrim(rtrim(left(a.AccountNo,20)))=ltrim(rtrim(lef t(b.AccountNo,20)))
AND
ltrim(rtrim(left(a.TransactionNo,20)))=ltrim(rtrim (left(b.TransactionNo,20)))
AND
a.TransactionAmount=b.TransactionAmount
AND
a.TransactionDate =b.TransactionDate
AND
ltrim(rtrim(left(a.Product,20))) IN ('PR060','PR061','PR091',
'PR096','PR111','PR121',
'PR122')

AND ltrim(rtrim(left(a.Transactiontype,20))) IN
('TR001','TR003','TR011',
'TR013','TR027','TR028',
'TR042','TR043','TR044',
'TR045','TR998','TR999')

AND ltrim(rtrim(left(a.journaltype,20))) NOT IN
('JT000','JT720','JT721',
'JT722','JT723','JT725',
'JT726','JT729','JT730',
'JT737','JT738','JT739',
'JT740','JT743','JT746',
'JT751')

OR ltrim(rtrim(left(a.JournalType,20))) IS NULL

AND a.TransactionDate > '2002-04-30'AND b.transactionDate < '2002-07-01'

Commit

View 1 Replies View Related

DB Table With 1000 Columns?

Feb 15, 2008

I was wondering if it is possible to have a DB table with 1000 columns?
The other way is of course to break these columns into 1000 rows and an ID which tells what exactly does it relate to.

I want to know the pros and cons of having 1000 columns/rows for one set of related data.
The reason to need 1000 columns in the first place is that there are about 1000 questions in a set whose answers need to be saved for one session (hence all should go together).

Can anybody shed some light on it? Has anybody tried something so crazy before?

View 1 Replies View Related

How Do I Add 1000+ New Users To ASPNET_DB?

Sep 25, 2006

Ok some company has handed me this .xls file containing a 1000+ users -- their emails (which are to be their user names), and their passwords. Both are in plain text format. I want to add these users to the ASPNET_DB, with the condition that the passwords and userids are encrypted, as they are in the table.

How should I do this?

Thanks very much.

View 3 Replies View Related

Database Design Where Some Products Are T-shirts With Different Sizes

Feb 27, 2007

Hello,
I'm wondering what would be the best approach to designing a database that will have different products one of them being T-Shirts of different sizes... for example 1 t-shirt design might only have 2 available sizes while another may have 4. I'm kinda stumped on how to approach this cuz there is multiple products like CD's, DVD's, Magazines etc which is pretty straight forward, but the T-shirts have this "variable" to it.
What i'm really wondering is should i have 1 main "Products" Table or should i have a separate table for the t-shirts? Should there be a column for each available size?
 Currently my database has a "products table" that has  foreign keys to "Product Type", "Artists", "Genre"
The database is basically for a record company
If anyone has designed a database similar to this i'd love any insight or even possibly to see a database diagram
Thanks 

View 1 Replies View Related







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