It looks like you are trying to support a 'many-to-many' relationship structure. I would go with the first choice as, even though it will require more 'relationship' tables, it will be cleaner to code against. I believe you will also find it cleaner to implement relational integrity with that...
Wow! And I thought I was pretty good at understanding TSQL code. Yes, this exampled does handle alignment. Now if I can just boil it down to something I can get my head around.
Many thanks,
Paul
Given the following example code from the MS docs, how would one force alignment on the SELECT td = .... elements? Is there some secret documentation mother load in the sky I haven't found yet documenting how this works?
Much thanks in advance,
Paul
DECLARE @tableHTML NVARCHAR(MAX) ;
SET...
Geoff,
Thank you for your response. I knew I could get there that way but I found some 2005 MS documentation that led me to believe it could be done the other way and, with painfull persaverance, I found that it could!
First of all, the somewhat helpful docs...
I have a data source to an MS SQL data base that returns an XML datatype column along with a number of other columns I'm using in my report. Is there an elegent way to shred this column with Reporting Services or will I best shred it on the SQL side and return it in a separate data set?
Best...
I have a need to schedule an SQL Job for the first 'business day' in a month. This would be Monday if the 1st fell on a Saturday or Sunday. Of course holidays also have the potential to mess this one up big time. My only thought was to create 12 '1st day of ...' schedules and update them...
OK, I got it working... now we just have a small Kerbos problem which my network guru says he can handle. I did run into a bit of quirkieness that everyone should know about. When using the aliases for Target (T) and Source (S) I found that the order of the fields in the WHEN MATCHED clause...
George, is this what you were suggesting?
IF DB_NAME() = 'MC_Live'
CREATE SYNONYM MFServer FOR [MobileFrame].[dbo].[PPTKTHD]
IF DB_NAME() = 'MC_Training'
CREATE SYNONYM MFServer FOR [MCSQL2008R2].[MobileDev].[dbo].[PPTKTHD]
MERGE MFServer AS T -- Target....
-- This is the record...
You might want to pass the player's names in as a CSV string and use a 'split' function to parse them into a table, inserting those values along with your other parameters into your DB.
[code]
/*
=============================================
Author: Paul Richmond
Create date: 02/06/2008...
I've done something like this using a Pivot Table and some dynamic SQL. This code is probably overkill but I am pressed for time right now so I offer it if it can help....
[Code]
-- =============================================
-- Author: Paul E Richmond
-- Create date: April 4, 2008
--...
I have an environment where our live database, (MC_Live), gets backed up and restored to a development environment, (MC_Training), periodically. In this database, there are some stored procedures that update a second database via a linked server connection. When working in MC_Live, we want to...
I have a development environment that talks to MSSQL through a 3rd party driver. The driver appears to be setting up a cursor and then 'Fetching' against that cursor. My problem is that I see these in the activity monitor but have no way of identifying the TSQL code that set up the cursor so I...
Hmmmmmm. I wouldn't have thought that adding a sub-select would improve performance. I tested your solution along with adding 'INNER' to my joins and using the Alias in the UPDATE statement and both solutions appear to be working much better. I can't tell any difference between them but I...
I have a number of tables with cascading relational constraints. When I update the parent table it cascades down through the whole relational tree perfectly however there is a field that is not part of the relationship that needs to be updated in the child tables ONLY if the related field...
I need a good set based solution to run a select statement that generates :
131234 2
134321 5
154234 3
I need:
131234
131234
134321
134321
134321
134321
134321
154234
154234
154234
I can think of several convoluted ways...
I have an Excel spreadhseet that is giving the following error when previewing:
TITLE: There was an error displaying the preview.
ADDITIONAL INFORMATION:
Index and length must refer to a location within the string.
Parameter name: length (mscorlib)
Anyone have any clue as to what the problem...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.