Showing posts with label schema. Show all posts
Showing posts with label schema. Show all posts

Wednesday, March 28, 2012

help for T-SQL code generator for DataMart

I replicated a table from DW to DM

but i filtered the table by month.

now i have several tables with the same schema on the datamart

the table has five keys. what i want to do is to write a

sqlwizard code that will automatically write an update statement from the replicated

table. What the wizard will do is read the fields of the DM table then identify the keys and

generate the source code for update.

lets name the proc sqlwiz

exec sqlwiz (DMtable1,dwtable1)

the sp should return the desired update statement like this

update dmtable1 set DM.nonkeyfield1= dw.nonkeyfield1,

DM.nonkeyfield2= dw.nonkeyfield2,

DM.nonkeyfield3= dw.nonkeyfield3

from dwtable1 dw where

dm.keyfield1=dw.keyfield1 and

dm.keyfield2=dw.keyfield2

pls use any of the northwind table with composite pk.

my DM is sql2k5.

the sp can also be used for generating update codes for vb.net

thanks,

joey

1. You will need to use Dynamic SQL
2. Make use of INFORMATION_SCHEMA.COLUMNS

Monday, March 26, 2012

Help for database schema

Hello All,

My project uses MS SQL server database and is not too big database (have aound 200 table).

Now I have to create Database schema for my database as my project needs to be integrated with some other product.

I don't know much about database schema and how to start with it.

Can someone please give me some inputs on following:

1) What exactly database schema should include?

2) How should I start creating the schema for my database?

3) Are there any tools for doing this?

Thanks in advance1) CREATE TABLE statements, plus INSERT statements
2) Enterprise Manager will script the CREATE TABLE statements (but not the INSERT statements, i'm afraid)
3) tons of 'em -- do a search for SQL Server admin tools|||if your database is already built and you are looking to reverse engineer it, check out the link in my sig.|||My project uses MS SQL server database and is not too big database (have aound 200 table).I've never seen a database with 200 tables that needed 200 tables. It is indicative of poor design.|||I've never seen a database with 200 tables that needed 200 tables. It is indicative of poor design.That's a bit absolute isn't it?

EDIT - misinterpreted indicative on my first pass.|||Well, he states my project, and a one mans project with 200 tables? Well that clearly indicates poor design.|||Over egging it a bit aren't you? Do you even know what he is modelling?

BTW - I doubt (but do not know) that this has been his project from inception. I suspect it is purchased\ inherited. But as I say I don't know so I won't go so far as to say it is "clearly indicated".|||here's a project i worked on (as the sole data modeller) for an insurance company

i'm happy to report that it came in at just under 200 tables

thank $deity, eh, because i know now that as soon as it goes over the 200 table limit, it's b0rked|||Yeah, I know about data modelling. And I do know that a project with some 200 tables is quite complex, and I do think that more than one person should be involved in the data modelling. In smaller projects, one man can do the whole job, but in projects of the size we are talking about here, I would definitely not be comfortable as the only modeller. With so high complexity i feel pretty safe when I state that the project should involve at least two persons working as a team. One single man increases the chance of some issues being overlooked.

Edit: As I understand the word indicates, it does not mean it has to be that way, just that it's very likely. If you would use a different word for this, please let me know, as English is not my native language :)|||That's a bit absolute isn't it?
I have absolutely never seen a 200 table database that was a good design. I'm merely stating a fact.|||Thanks for all your comments.

Ya i do agree that its a poor design.

Anyways I have created the schema for the DB.

Thanks.|||Ya i do agree that its a poor design.

but how and why do u all of a sudden agree that the design was poor?|||Well, he has the advantage of being able to look at it.sql

Wednesday, March 7, 2012

Help - Schema provided by Microsoft NOT ONLINE anymore

Hi
we are currently using a schema referring to
http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservice
for System.Web.Services.Protocol.SoapDocumentMethodAtrribute an
referring to
http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/creat
for Subscription.RequestNamespace from Reference.cs whil
programmatically creating a subscription
However, when we check for either of these URLs, they are no
available on Microsoft's site anymore. Can anyone possibly provid
some information on how to get to these schema files? :?
Many thanks in advance
MichaeWe have the same problem for these references:
System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Cancel"& _
"Job",
RequestNamespace:="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices",
ResponseNamespace:="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
This is from the system provided:
Public Function CancelJob(ByVal JobID As String) As Boolean
We are having the same problem with the Web References for function
ListJobs()
Have you had any luck with this?
"mhamach" wrote:
> Hi,
> we are currently using a schema referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices
> for System.Web.Services.Protocol.SoapDocumentMethodAtrribute and
> referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/create
>
> for Subscription.RequestNamespace from Reference.cs while
> programmatically creating a subscription.
> However, when we check for either of these URLs, they are not
> available on Microsoft's site anymore. Can anyone possibly provide
> some information on how to get to these schema files? :?
> Many thanks in advance!
> Michael
>|||I'm also experiencing the same problem.
Has anybody found a sollution to this?
"mhamach" wrote:
> Hi,
> we are currently using a schema referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices
> for System.Web.Services.Protocol.SoapDocumentMethodAtrribute and
> referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/create
>
> for Subscription.RequestNamespace from Reference.cs while
> programmatically creating a subscription.
> However, when we check for either of these URLs, they are not
> available on Microsoft's site anymore. Can anyone possibly provide
> some information on how to get to these schema files? :?
> Many thanks in advance!
> Michael
>|||Is there anything at http://schemas.microsoft.com/sqlserver/ that helps
you?|||I could'nt find anything at http://schemas.microsoft.com/sqlserver/.
Is there any other way of rendering reports, other than using Reporting
Service.vb
"timseal" wrote:
> Is there anything at http://schemas.microsoft.com/sqlserver/ that helps
> you?
>