Creating Additional Instances
Feb 20, 2007How do I create additional instances of any MSSQL 2005 service(specifically database and analysis) given that a default instance is present?
View 4 RepliesHow do I create additional instances of any MSSQL 2005 service(specifically database and analysis) given that a default instance is present?
View 4 RepliesCurrently, I am running SQL Server 2000 with the default instance. I know SQL2K can run up to 16 instances simultaneously. I would like to add another instance but am unable to find documentation on how to add it. Books online tells me "about" multiple instances, but not how to set it up. I've obviously missed something somewhere. Can someone please direct me to a document that will help explain "how" to add another instance?
Thanks for your time and your help.
For a database, we have 4 data files in a particular file group and the file sizes are almost 70 GB each.
Do I come across any performance issues if I create/pre-allocate an additional data file in the same file group so that the existing files don't grow too much?
When I am in Visual Studio 2005, and I try to add an SQL database, I get the following error "generating user instances in sql server is disabled. use sp_configure user instances enabled to generate user instances." I am currently using SQL server 2005 Express. What do I need to do, to create an SQL database? Thanks in advance.
View 4 Replies View RelatedI had a server with SQL Server 7.0
I installed a named instance of SQL Server 2000 and then i passed all my DB
of the 7.0 instance to the 2000 instance.
Then i removed the 7.0 instance, that was the default instance.
So at the moment there is only the 2000 version, but it isn't the default
instance
Can the 2000 instance become the default instance? (So that clients can
connect to it simply through computer name, and not creating an alias)
thanks
Fede
Currently both of our servers have 1 gig of RAM. We are adding and additional 1gig of RAM to our local server but none to the remote server. Transactional replication is performed between both servers in both directions. SQL Server is configured to dynamically configure memory on both servers.
Are there any issues or concerns that I should be aware of?
Thanks
I have code on a website that does a search to an Access database based on what the person enters as the search criteria. My SQL code uses a like % statement for all the fields in the search criteria. The problem is that the first and third search fields do no return the search criteria that is asked for.....The 2nd search field (Description) returns whatever is asked for..... I did read up and found that the data must be character for the like statement. Anyone have any other clues or where I can read up on this???????HTML SEARCH CODE: <table ALIGN="CENTER" width="408" bgcolor="#FFFFFF" cellspacing="0" cellpadding="5"> <tr> <td width="400" bgcolor="#3366cc" colspan="2"> <form method="post" name="DaForm" action="Makeit.asp" align="center"> <div align="center"><center><table border="1" width="350" cellpadding="3" bgcolor="#3366cc"> <tr> <td align="left" width="189"><select name="TypeSearch" size="1"> <option selected value="PartNumber">Part Number</option> <option value="Description">Description </option> <option value="Mfg">Manufacturer</option> </select></td> <td width="310" align="right"><input type="text" size="30" name="DaInBox"></td> </tr> <tr> <td colspan="3" align="center" width="507"><div align="left"><p><input type="submit" name="B1" value="Search!"><input type="reset" name="B2" value="Clear"> </td> </tr> </table> </center></div> </form> </td> </tr></table>Makeit ASP COde:
<%@ LANGUAGE="VBSCRIPT" %>
<html>
<head>
<title>Your Search Results!</title>
<meta name="Microsoft Border" content="lb, default">
</head>
<body>
<%
Dim MySql
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open("parts")
MySql = "SELECT * FROM parts"
If Request.Form("TypeSearch") = "Part Number" Then
MySql = MySql & " WHERE PartNumber LIKE '%" &_
Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Description" Then
MySql = MySql & " WHERE Description LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
Dim rs
Set rs = new Server.CreateObject("ADODB.Recordset")
rs.Open MySql, cn, 0,1
%>
<% If rs.BOF and rs.EOF Then%>
<h2 align="center">We did not find a match!</h2>
<%Else%>
<%If Not rs.BOF Then%>
<h2>Here are the results of your search:</h2>
<table BORDER="0" width="100%" cellpadding="3">
<tr>
<th bgcolor="#0366cc"><font face="Arial" color="#000000">Part Number </font></th>
<th bgcolor="#3366cc"><font face="Arial" color="#000000">Description </font></th>
<th bgcolor="#3366cc"><font face="Arial" color="#000000">Manufacturer </font></th>
<th bgcolor="#3366cc"><font face="Arial" color="#000000">Qty </font></th>
<th bgcolor="#3366cc"><font face="Arial" color="#000000">Condition </font></th>
</tr>
<%
Do While Not rs.EOF
%>
<tr>
<td><%=rs("PartNumber")%>
<%=rs("Description")%>
</td>
</tr>
<% rs.MoveNext
Loop
%>
</table>
<%End If%>
<%End If%>
<%
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
%>
<p> </p>
</body>
Hi,
What are all the performance parameters to be analyzed, in an existing production server, to accommodate an additional database.
Regards
Kalyan
I have two tables that I am pulling data from to insert into a third table.
Table 1:
Organization Address Date
Name 404 St. 12/31/1999
Table 2:
Organization Software Type Quantity
Name SW1 5
Name SW2 6
Name SW3 7
Name SW4 8
My query looks something like this:
INSERT INTO Organization SW Reqs (Name, Address, Date, SW1 Quantity, SW2 Quantity, SW3 Quantity)
SELECT Table 1.Name, Table 1.Address, Table 1.Date,
(Select Table 2.Quantity Where Table 2.Software Type = 'SW1'),
(Select Table 2.Quantity Where Table 2.Software Type = 'SW2'),
(Select Table 2.Quantity Where Table 2.Software Type = 'SW3')
FROM Table 1, Table 2
WHERE Table 1.Organization = Table 2. Organization
Sadly, this query gives me four rows, one for each Software Type. I have tried putting DISTINCT after my SELECT, but that narrows it down to two rows only. I would really like to have just a one row result per organization.
Part of the code as follows:
SELECT
ARDoc."Cpnyid", ARDoc."Custid", ARDoc."CuryOrigDocAmt", ARDoc."DocBal", ARDoc."DocDate", ARDoc."Doctype", ARDoc."slsperid", ARDoc."Territory", ARDoc."RecordType", ARDoc."user7",
ARTran."CmmnPct", ARTran."CuryTranAmt", ARTran."DrCr", ARTran."ExtCost", ARTran."InvtId", ARTran."JrnlType", ARTran."Qty", ARTran."RefNbr", ARTran."Rlsed", ARTran."S4Future04", ARTran."S4Future05", ARTran."TranAmt", ARTran."TranClass", ARTran."TranDate", ARTran."TranType", ARTran."UnitDesc", ARTran."UnitPrice",
RptCompany."CpnyName", RptCompany."RI_ID",
Customer."Name",
Salesperson."CmmnPct", Salesperson."Name", Salesperson."SlsperId"
FROM
{ oj ((("SOLUSBS02APP"."dbo"."zARDoc_Comm" ARDoc INNER JOIN "SOLUSBS02APP"."dbo"."RptCompany" RptCompany ON
ARDoc."Cpnyid" = RptCompany."CpnyID")
INNER JOIN "SOLUSBS02APP"."dbo"."Customer" Customer ON
ARDoc."Custid" = Customer."CustId")
LEFT OUTER JOIN "SOLUSBS02APP"."dbo"."Salesperson" Salesperson ON
ARDoc."slsperid" = Salesperson."SlsperId")
LEFT OUTER JOIN "SOLUSBS02APP"."dbo"."ARTran" ARTran ON
ARDoc."Custid" = ARTran."CustId" AND
ARDoc."Refnbr" = ARTran."RefNbr" AND
ARDoc."Doctype" = ARTran."TranType"}
Currently, if a new rep takes over for an old ones invoices and accounts...he will also get credit on the report which this query is for. Instead I need to use a table SOShipHeader to be 'date sensitive'. SOShipHeader will have the correct 'SlsperID', but will still need to pull the name from Salesperson."Name"
My guess, would be that I need to wedge the SOShipHeader table between the ARDoc and Salesperson tables?
I have the following fields in table A:
GL_ID|GL_Name_VC| Amount |Period_TI|Year_SI|
===================================================
1000| Sales_HW| -20,000.00 | 01 | 2005
===================================================
1000| Sales_SW| -10,000.00 | 01 | 2005
===================================================
1001| Cost_HW | 5,000.00 | 01 | 2005
===================================================
1001| Cost_SW | 5,000.00 | 01 | 2005
the fields above have the following datatype:
Fields | Datatype
===================================
GL_ID | Integer
GL_Name_VC | Variable Character
Amount | Integer
Period_TI | TinyInteger
Year_SI | SmallInteger
The above database is running on Microsoft SQL Server 2000 and i would like to query
for a report that looks something as below:
Sales Category | Sales | Cost | Profit
=================================================
HW |-20,000.00 |5,000.00| -15,000.00
SW |-10,000.00 |5,000.00| -5,000.00
=================================================
Total |-30,000.00 |10,000.00|-20,000.00
The above report have 4 columns, with last column being a calculated field (Sales-Cost)
Guys, hope someone out there can help me with the sql command for the above report?
We are
looking for a solution for a client that we will make software for. We are a ISV. After
completion of the software, our client then wants to sell this software to their
partners, people in that business, etc. We do not want to add any additional cost, by means of them(client(s)) purchasing
a server, server software or licensing. Is there any solution
that will make this work? A runtime or embedded database solution? If there is a
license we need to purchase, what would that be? SQL Express Edition work?
Hi
I have a column in the db with serial number data, on a export that I am doing the data has to be 10 digits long the problem is not all of them are eg
12234
122334343
1234234567
how can i get it to look like this adding an 0 to the front to make the row 10 digits
0000012234
0122334343
1234234567
Thanks
Hi All,
I have developed a report using report viewer in asp.net web form. The report is generated based on the selection of Department. User have an option to multi select the departments so the department column grows. Lets say user select Business category first and generate the report then user decides to add another department say Engineering. No the report column headers will have addional column "Engineering". I have used the Matrix since I had to group by Name and dates. Everything is good so far.
Now I have to add an additional column "Notes" at the end of all the columns. If there is ony department is chosen then Notes column appears after that and if mulitple departments are chosen the Notes column should also appear after all the department column (at the very end).
I am really having hard time to accomplish this. Is there any suggestion or solution to finish this? I really appreciate your responses.
Thank you.
I am attempting to add additional fields and data to the default users database that is created as a result of enabling roles on my website. Is it possible to add additional data fields to this file? Where can I find the commands to do this?
View 2 Replies View RelatedHi, I use the FOR XML AUTO to retrive native XML from a database with:
SELECT [xml] FROM myxml WHERE id = 81 FOR XML AUTO, elements, root('ROOT')"
However it returns the database name and table name as parent elements. How can I return just my raw XML data without additional elements:
XML is Stored:
<ROOT>
<CHAPTER>
<TITLE>This is a test</TITLE> </CHAPTER>
</ROOT>
Returns:
<databasename>
<tablename>
<ROOT>
<CHAPTER>
<TITLE>This is a test</TITLE> </CHAPTER>
</ROOT>
</tablename>
</databasename>
I have a stored procedure which is used to search records in the database based on the data sent from the web page. There are several search fields and all of them are in one table (Table1) except the "CallerName" field which is in a different table (Table2). Since I had to show CallerName also in the gridview apart from other columns, I did a LEFT JOIN (using field CallerNumber) to show all the required fields from Table1 and CallerName from Table2.
Now heres the problem. Since CallerName is a search criteria, its supposed to be in the WHERE clause after the JOIN or in the JOIN clause itself. The problem is, if I put it in WHERE clause, the result set doesn't show records from Table1 which do not have a matching CallerNumber in Table2. SELECT T1.CallerNumber, T1.DateCalled, T2.CallerName
FROM Table1 T1
LEFT JOIN Table2 T2 on
T1.CallerNumber = T2.CallerNumber
WHERE T1.CallerNumber = 'some number' AND T2.CallerName = 'some name' If I put it in the JOIN condition, it works just like a LEFT JOIN is supposed to work, showing all the records in Table1 and also those which had CallerName in Table2. SELECT T1.CallerNumber, T1.DateCalled, T2.CallerName
FROM Table1 T1
LEFT JOIN Table2 T2 on
T1.CallerNumber = T2.CallerNumber AND T2.CallerName = 'some name'
WHERE T1.CallerNumber = 'some number'
1st SQL won't work for me because it doesn't show all the records in Table1, even when no search criteria is specified.2nd SQL won't work for me because it shows more than required when just CallerName is sent from the web page as search criteria. It will show all the records where CallerName is "some name" and also all the additional records (since it is a left join).
Can I get the goodness of both in one or do I have to create two separate Stored Procedures?
Thanks all,Bullpit
I added one crummy column to my table. I updated the stored procedure and added the thing to the aspx page which is my form for adding an article. I have a strong feeling that something is foul over here...Why is it that Visual Studio will not allow me to capitalize the word get and when I delete the () after ShortDesc they immediatlye reappear and the get statement is set to get. Every other one of them, and there are 9 others use GET and there is no () after the public property variable name. Does anyone know the reason for this?
Public Property Author As System.String
GETReturn _Author
End Get Set(ByVal Value As System.String)
_Author= ValueEnd Set
End PropertyPublic Property ShortDesc() As System.String
GetReturn _ShortDesc
End GetSet(ByVal value As System.String)
End Set
End Property
I have a DataGrid, it will return a table in SQL2000 server.
the problem is:
no data in the datagird, only a record "null" in all field.
I find a sample is add a "sqlDataAdapter1.Fill".
but if I add the code:
sqlDataAdapter1.Fill(dataSet21);
I got the error:
---------------
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
-------------
I have search this problem fix many many time, many people has this problem, looks like no result I can find.
Please help, thanks very very much.
Thanks.
I have a stored procedure that uses a dynamic order by statement. This statement works okay until I try to select ticket's by userEmail which is passed in to my stored procedure as a parameter. Here is the code that works for my dynamic sort order:
CREATE PROCEDURE [dbo].[SelectAllTickets]
@SortOrder varchar(250)
AS
SET NOCOUNT ON
Exec('SELECT a.TicketID, a.TicketDate, a.TicketName, a.TicketDescription, a.statusID, a.resolutionID, a.userID,
b.typeID, b.typeName,
c.userID, c.UserFirstName,
f.statusID, f.statusName
FROM Tickets a
LEFT OUTER JOIN Type b ON b.typeID = a.typeID
LEFT OUTER JOIN Users c ON c.userID = a.userID
LEFT OUTER JOIN Status f ON f.statusID = a.statusID
ORDER BY ' + @SortOrder)
I modied this procedure to create one in which I select tickets based on the userEmail as a criteria as well.. this one fails due to Incorrect syntax near the keyword 'BY'
CREATE PROCEDURE [dbo].[SelectTicketByUser]@SortOrder varchar(250),@userEmail varchar(50)
AS SET NOCOUNT ON Exec('SELECT a.TicketID, a.TicketDate, a.TicketName, a.TicketDescription, a.statusID, a.resolutionID, a.userID, b.typeID, b.typeName, c.userID, c.UserFirstName, c.userEmail, f.statusID, f.statusName FROM Tickets a LEFT OUTER JOIN Type b ON b.typeID = a.typeID LEFT OUTER JOIN Users c ON c.userID = a.userID LEFT OUTER JOIN Status f ON f.statusID = a.statusID WHERE a.statusID <> 40 AND c.userEmail = ' + @userEmail + 'ORDER BY ' + @SortOrder)
Any ideas on what syntax I should be using? Thanks!
We have a quad sql server that runs OLTP transactions at the rate of
100's per second (read & Write).
We used to have all the tables on 1 file but started to notice high contention on this file. We added 3 more files to match the processor number. The problem is that the 3 additional files are not filling with data. Does anyone know why this happens or can reccommend a fix?
--
will
I vaguely recall that there is a way to install a linked server or similar datasource on SQL 2005 without the need for ANY additional software... No drivers, no third party packages, just a moderately complex configuration issue.
Once the beastie was configured, you could assign linked server logins, build queries using four part names, etc with no significant restrictions.
Unfortunately, I don't remember the details of this feat of majik. Can anybody refresh my feeble memory?
-PatP
I have data as below:
columnA
D7 330 4/13/2014 0:0:0 KUL PVG 4/13/2014 18:35:0 4/13/2014 19:15:0 4/13/2014 23:45:0 4/14/2014 0:45:0
How can I separate it to 5 additional columns?
columnB: D7 330 4/13/2014 0:0:0
columnC: KUL PVG 4/13/2014 18:35:0
columnD: 4/13/2014 19:15:0
columnE: 4/13/2014 23:45:0
columnF: 4/14/2014 0:45:0
Hello,
I am unable to figure out how to proceed after trying for more than a day. Should I add a parameter to the stored proc? How do I proceed?
I need to be able to show data for EdgeID 2,3,5,6,20,21 and so on...Right now I am showing data for 1, 4, 19 and so on based on the ReltTotID based on the result set below. This is because the table that the query below is selecting from adds up all common EdgeIDs to give one row for example
EdgeID Desc TermType ReltTotID
1Global Edge Model w/ Fwd Earn II T 1
2Short Term Global Edge Model w Fwd Earn IIS 1
3Long Term Global Edge Model w Fwd Earn IIL 1
4Emerging Market Edge Model w Fwd Earn T 4
5Short Term EM Edge Model w Fwd Earn S 4
6Long Term EM Edge Model w Fwd Earn L 4
19SmallCap Edge Model w/ Fwd Earn T 19
20SmallCap Short Term Edge Model w/ Fwd EarnS 19
21SmallCap Long Term Edge Model w/ Fwd EarnL 19
35Global+EM Edge Model w Fwd Earn T 35
The final query result is :
EdgeID Description Short Desc PerID UnivID DefID
1Global Edge Global Developed 500622355938
4Emerging Market Emerging Markets 500632356039
19SmallCap Edge Small Cap Edge 500642364244
I would like it to be :
1Global Edge Global Developed 500622355938
2Short Term Global Developed NULL2355938
3Long TermGlobal Developed NULL2355938
4Emerging Market Emerging Markets 500632356039
5Short Term Emerging Markets NULL2356039
6Long Term Emerging Markets NULL2356039
19SmallCap Edge Small Cap Edge 500642364244
19Short Term Small Cap Edge NULL2364244
19Long Term Small Cap Edge NULL2364244
The stored proc query is as below:
SELECT
EdgeModelID = em.EdgeModelID
--, EdgeModelID = em.EdgeModelID
, Description = m.Description
, ShortDescription = ISNULL(emdn.ParameterValue, m.ShortDescription)
, ViewPermissionID = emdp_perm.ParameterValue
, EdgeUniverseID = univ.UniverseID
, EdgeDefinitionID = univ.MemberID
FROM OptMod..GO_EdgeModels em
JOIN OptMod..GO_Models m
ON em.EdgeModelID = m.ModelID
AND m.ModelType = 'E'
AND Status = 1
JOIN OptMod..GO_EdgeModelDisplayParameters emdp
ON emdp.EdgeModelID = em.EdgeModelID
AND emdp.ParameterName = 'NewEdge32 Screening'
LEFT JOIN OptMod..GO_EdgeModelDisplayParameters emdn
ON emdn.EdgeModelID = em.EdgeModelID
AND emdn.ParameterName = 'NewEdge32 Display Name'
LEFT JOIN OptMod..GO_ModelUniverses mu
ON em.EdgeModelID = mu.ModelID
LEFT JOIN OptMod..vUniverses univ
ON mu.UniverseID = univ.UniverseID
LEFT JOIN OptMod..GO_EdgeModelDisplayParameters emdp_perm
ON emdp_perm.EdgeModelID = em.EdgeModelID
AND emdp_perm.ParameterName = 'NewEdge32 Permissions'
WHERE em.EdgeModelID = em.RelatedTotalEdgeModelID
Thanks in advance!!!
sqlnovice123
I am looking for a best practice or any suugestion on the best way to install an additional Sql 2005 instance in a cluster environment. We have a production environment that is active/active/passive and need to install an additional instance with a little impact to the current production instances as possible. Ant suggestions or articles I can review?
View 1 Replies View RelatedIs there a way to add additional functionality to the report parameter boxes?
For example, when a user enters an invalid choice into a report parameter box, I want a popup balloon that tells them to try again.
I know how to do this for a regular Winform combobox, but can I implement an interface to override the default behavior of the report parameter boxes?
Hi there,
I have a case. I have 3 numeric fields and 1 category field to be displayed on bar chart reports. the problem is 2 of the 3 numeric fields have significant different scale value. so I need to add additonal scale at the right side of bar chart to represent 1 numeric fields + the 2 other numeric fields at the left side scale (Y). Please advice. Thanks.
R'gards
Toni
I am trying to use Reporting Services but is proving more difficult than I envisaged. Here's the problem, when I try to use management studio to change the Server type to a Report server, it is disabled. Hence I cannot change it. When I read msdn, it stated that this was caused by the fact that report services was not installed. However, when I look at SQL Configuration Manager, it shows that Report Services is running. Am I not understanding something? What am I doing wrong?
View 3 Replies View Related
I am looking to sum the dollar amounts spent by customer for their last five visits (actually looking for avg. spend in the last five trips).
So we are dealing with three fields: CustID, Date, Cost
I've had to do it the HARD way -- Crystal Report with running total fields numbering the five most recent trips (essentially rowID by group) and summing the $ figure; export to Access the entire report (1,000,000 records), and delete every record where the running rowID <> 5
There has to be a straightforward way to do this.
Any Top N query I've seen doesn't seem to be able to return a field other than the one sorting on. This is most annoying.
Anyone know how to place additional indexes on system tables?
View 1 Replies View RelatedI have this statement:
SELECT top 100 P.LastName ,
P.FirstName,
P.MiddleName,
P.PractitionerTypeID,
P.SuffixID,
A.Linenumber1,
A.LineNumber2,
Z.City,
[code]....
Seems like no matter which join type I choose i still get duplicates.
I wanted to remove an extra transaction log file that was no longer required, and ran the following against the database...
DBCC Shrinkfile (DB_Name_log2, Emptyfile);
go
alter database [Db_Name]
remove file DB_Name_log2;
go
I got a successful removal message. But if I go into the properties of the database, and click on files, it still shows up. Why is this and how can I get rid of it?
It shows up in sys.master_files as offline.
I have a stored procedure where I want to select all fields matchingthe query into another table. In addition, I want to add a commongroupID to each of the records that are being inserted into the secondtable.I can get the results that I want by using a temporary table but needto know if there is a way to do it directly..below is the code that uses the temporary table..CREATE TABLE #tempStore_DeliveryAddress ([AddressId] [int] IDENTITY (1, 1) NOT NULL ,[UserId] [int] NOT NULL ,[Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[FirstName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[SpouseName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[MiddleName] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[SpouseMiddleName] [varchar] (10) COLLATESQL_Latin1_General_CP1_CI_AS NOT NULL ,[LastName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[SpouseLastName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_ASNOT NULL ,[Suffix] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,[SpouseSuffix] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[Company] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[Address1] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[Address2] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[Address3] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[City] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,[State] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[PostalCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[Country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[ForeignFlag] [int] NULL CONSTRAINT[DF_Store_DeliveryAddress_ForeignFlag] DEFAULT (0),[Email] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[Greeting] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[FullName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[ShortName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL ,[OptOut] [int] NULL CONSTRAINT [DF_Store_DeliveryAddress_OptOut]DEFAULT (0),[Modified] [datetime] NULL CONSTRAINT[DF_Store_DeliveryAddress_Modified] DEFAULT (getdate()),[Modifer] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_Store_DeliveryAddress_Modifer] DEFAULT ('DBA'),[Created] [datetime] NULL CONSTRAINT[DF_Store_DeliveryAddress_Created] DEFAULT (getdate()),[Creator] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_Store_DeliveryAddress_Creator] DEFAULT ('DBA'),[MailListID] [int] NULL ,CONSTRAINT [PK_Store_DeliveryAddress] PRIMARY KEY CLUSTERED([AddressId]) ON [PRIMARY]) ON [PRIMARY]INSERT INTO #tempStore_DeliveryAddress([UserId], [Title], [FirstName],[SpouseName], [MiddleName], [SpouseMiddleName], [LastName],[SpouseLastName], [Suffix], [SpouseSuffix], [Company], [Address1],[Address2], [Address3], [City], [State], [PostalCode], [Country],[ForeignFlag], [Email], [Greeting], [FullName], [ShortName], [OptOut],[Modified], [Modifer], [Created], [Creator])(SELECT [UserId], [Title], [FirstName], [SpouseName], [MiddleName],[SpouseMiddleName], [LastName], [SpouseLastName], [Suffix],[SpouseSuffix], [Company], [Address1], [Address2], [Address3], [City],[State], [PostalCode], [Country], [ForeignFlag], [Email], [Greeting],[FullName], [ShortName], [OptOut], [Modified], [Modifer], [Created],[Creator]FROM [ntmportal].[dbo].[Store_AddressBook]WHERE [AddressID] in (Select AddressID From Store_AddressesForGroupwhere AddressGroupID = 322))UPDATE #tempStore_DeliveryAddress set MailLISTID = 422INSERT INTO Store_DeliveryAddress([UserId], [Title], [FirstName],[SpouseName], [MiddleName], [SpouseMiddleName], [LastName],[SpouseLastName], [Suffix], [SpouseSuffix], [Company], [Address1],[Address2], [Address3], [City], [State], [PostalCode], [Country],[ForeignFlag], [Email], [Greeting], [FullName], [ShortName], [OptOut],[Modified], [Modifer], [Created], [Creator], [MailListID])(Select [UserId], [Title], [FirstName], [SpouseName], [MiddleName],[SpouseMiddleName], [LastName], [SpouseLastName], [Suffix],[SpouseSuffix], [Company], [Address1], [Address2], [Address3], [City],[State], [PostalCode], [Country], [ForeignFlag], [Email], [Greeting],[FullName], [ShortName], [OptOut], [Modified], [Modifer], [Created],[Creator], [MailListID]FROM #tempStore_DeliveryAddress)
View 2 Replies View Related