Alter Column Drop Identity in T/SQL?
I don’t think it can be done with a single t-sql command. If you look at the script Management Studio creates when you change the ‘Is Identity’ property of an identity column, you will see that it needs to create a temporary table, drop the original table, and then rename the temporary table. -CarlosDL —————— [...]

View Answer   |  February 6, 2010  8:09 PM
SQL Column Headings, SQL Server 2008, T/SQL
answered by:
64,520 pts.

SQL Server – SSIS
SQL Server Integration Services. Import/export data from/in different data sources.

View Answer   |  February 4, 2010  5:09 PM
SQL Server 2005, SSIS
answered by:
1,610 pts.

two dimentional output
If you are on SQL SERVER 2005 or above, you could use a query like this: <pre> SELECT * FROM (SELECT id,year,col1,col2,ddate, ROW_NUMBER() OVER (partition by year ORDER BY ddate DESC) rowNumber FROM yourTable) ordered_temp WHERE rowNumber = 1;</pre> If you are not using SQL SERVER, or you are using an older version, please provide [...]

View Answer   |  February 3, 2010  3:47 PM
SQL Query, SQL tables, Two-dimensional Output
answered by:
765 pts.

Difficult Select Statement in SQL
It sounds like you want all of the duplicates in A regardless of the duplicates in B <pre> select * from table1 where flda in( select flda from table1 group by flda having count(*) > 1) </pre> ————- If I understand correctly, I think you would have to add an additional condition to the query [...]

View Answer   |  February 3, 2010  3:36 PM
SQL, SQL Select, SQL Select statement problem
answered by:
765 pts.

sql server 2000 in server
That is normal. The user aaa doesn’t have the rights needed to see if the service is running or not. The user would need to try to connect to the SQL Server to see if it is running. In order to see if the SQL Server is running the user would need to have very [...]

View Answer   |  February 2, 2010  10:55 PM
SQL Server 2000, SQL Server administration, Windows Server 2003
answered by:
64,520 pts.

AS/400 to SQL Server Data Migration
Open the SQL Server Business Intelligence Development Studio and create a new SSIS project. Add a data pump task. Add a source object as being the AS/400 and a destination as being the SQL Server. Select the objects to copy. When you run the package the data will be copied to the SQL Server.

View Answer   |  February 2, 2010  8:34 PM
Data migration, SQL Server, SQL Server Data Migration
answered by:
64,520 pts.

problem in my pb11 application and sql2008
Are you trying to use ADO.NET to connect from PowerBuilder to SQL Server 2008? What’s the connection string that you are using?

View Answer   |  February 1, 2010  5:23 AM
ADO.NET, PowerBuilder, PowerBuilder 11, SQL 2008
answered by:
64,520 pts.

differences between SQL server 2000 & SQL server 2005
This <a href=”http://msdn.microsoft.com/en-us/library/ms170363%28SQL.90%29.aspx”>MSDN article</a> outlines the new items.

View Answer   |  January 29, 2010  8:34 PM
SQL Server, SQL Server 2000, SQL Server 2005
answered by:
1,855 pts.

Query Calculation Part of Select Criteria
Try something like this: <pre>SELECT “T16.CPRP”.CP_DISTRICT_CODE, CASE “T16.CPRP”.CP_DISTRICT_CODE WHEN ‘xx’ THEN SUM(“T16.CMCL”.MC_TAX_AMOUNT) AS TOWN WHEN ‘yy’ THEN SUM(“T16.CMCL”.MC_TAX_AMOUNT) AS TOWN ELSE SUM(“T16.CMCL”.MC_TAX_AMOUNT/2) AS TOWN END, SUM(“T16.CMCL”.MC_TAX_AMOUNT/2) AS COUNTY</pre> (Replace ‘xx’ and ‘yy’ with the special district-codes which shall not be divided. And let the rest of your code remain. Happy coding ————————————— It could be [...]

View Answer   |  January 28, 2010  3:56 PM
iSeries Navigator, Query Calculation, SQL, Sql Script
answered by:
5,205 pts.

Need help executing MULTIPLE SQL extracts from a JCL
Sorry, I wasn’t reading closely. RUNSQLSTM is not a JCL command, I was thinking CL. ——— JCL & SQL & DB2 – are we talking MVS? To exec dynamic DB2 SQL statements in a batch job (JCL); try using DSNTEP2 : <pre> 001720 //** 001800 //STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=EVEN 001810 //SYSPRINT DD SYSOUT=* 001900 //SYSTSPRT DD [...]

View Answer   |  January 27, 2010  4:14 PM
DB2, JCL, SELECT statement, SQL
answered by:
5,205 pts.

Need help setting Transaction Log properties in SQL Server 2000
I would assume that at some point either there weren’t any log backups being taken, or someone did a lot of data moving one day. Either way, if you aren’t running low of space, don’t bother shrinking the log file. You won’t gain anything by having a smaller transaction log file. Change the growth from [...]

View Answer   |  January 26, 2010  9:12 PM
backups, SQL Server 2000, Transaction logs
answered by:
64,520 pts.

Data transfer from DB2 (AS400) TO SQL SERVER 2005
More information would be helpful. In a nutshell you’ll need to use SQL Server Integration Services (SSIS) to do the work. On your workstation (or the server) install the AS400 drivers. Then open the Business Intelligence Development Studio (BIDS) and create a new SSIS package. Then use a data flow task to copy the data [...]

View Answer   |  January 25, 2010  6:07 AM
AS/400 data transfer, DB2, DB2 Data Transfer, DB2 to SQL Server Data Transfer, send any detail help please, SQL Server 2005
answered by:
64,520 pts.

Synchronization of Windows Server 2008 Active Directory Users from a Sql Server table
Your answer is in <a href=”http://technet.microsoft.com/en-us/library/cc720671%28WS.10%29.aspx”>this</a> MS tech article.

View Answer   |  January 24, 2010  5:26 AM
Active Directory, Active Directory Users, SQL Server, Windows Server 2008
answered by:
1,855 pts.

how i do save picture in data base vb.net
<a href=”http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx”>System.Drawing.Image</a> <a href=”http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx”>System.IO.MemoryStream</a> <a href=”http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx”>System.Data.SqlClient</a> Use the Image class to get the file in to an image object. Use the Save method of Image to save it to a memory stream in jpeg format User memory stream’s .toarray function to convert it to a byte array. Assign your database command object a parameter with [...]

View Answer   |  January 23, 2010  8:16 PM
Access Database Attachments, SQL Express, Visual Basic
answered by:
1,855 pts.

vb.net 2008 and sql server 2008
Here is how you can store you connection string in the app.conf and retrieve it at run time. http://msdn.microsoft.com/en-us/magazine/cc163812.aspx

View Answer   |  January 23, 2010  7:33 PM
ADO.NET, SQL Server 2008, VB.NET, VB.NET 2008
answered by:
1,855 pts.

Constraints (MySql,tables,null,PK,FK etc)
I would take Carlosdl advise and read up. Here is how I would do this: CREATE TABLE department( departmentId INT NOT NULL PRIMARY KEY AUTO_INCREMENT, departmentNumber VARCHAR(16), departmentName VARCHAR(64) NOT NULL, isEnabled TINYINT NOT NULL ); CREATE TABLE course( courseId INT NOT NULL PRIMARY KEY AUTO_INCREMENT, departmentId INT NOT NULL, courseNumber VARCHAR(16), courseName VARCHAR(64) NOT [...]

View Answer   |  January 23, 2010  6:42 PM
constraints, foreign key, MySQL, NOT NULL, NULL, primary key, tables
answered by:
1,855 pts.

Email Notification
Here is the function I wrote and use in my code. You will need to Import System.Net and System.Net.Mail at the top of the page you put it in. Below the code is the link to the reference pages for these two classes. <pre> Private Function SendMail(Server As String, User As String, Password As String, [...]

View Answer   |  January 23, 2010  3:02 AM
SQL Server database, VB.NET
answered by:
1,855 pts.

SQL Server 2005 Legacy DTS fails when run as a job
Worked with microsoft. They found this: http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required Simply had to add this folder. C:WindowsSysWOW64configsystemprofileDesktop

View Answer   |  January 22, 2010  7:47 PM
excel, SQL Server 2005 (64-bit)
answered by:
15 pts.

How to connect asp.net with sql 2005
Imports System.Data.SqlClient Sub SaveData(Name As String, Surname As String, Email As String, Comments As String) Dim cn As SqlConnection Dim cmd As SqlCommand Dim intResult As Integer cn = new SqlConnection(“Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;”) cmd = new SqlCommand(“”, cn) cmd.CommandText = “INSERT INTO table_name(name, surname, email, comments) VALUES(‘” & Name & “‘, ‘” & Surname [...]

View Answer   |  January 21, 2010  8:53 PM
ASP.NET Web applications, SQL Server 2005 connectivity
answered by:
1,855 pts.

Can somebody provide me SQL questions based on various situation?
A little research into T/SQL on <a href=”http://itke.techtarget.com/sql-server/”>my blog</a>, or on <a href=”http://SearchSQLServer.com”>SearchSQLServer.com</a>, or on <a href=”http://SQLServerPedia.com”>SQLServerPedia.com</a> –msi77– You can find a lot of questions on <a href=”http://www.sql-ex.ru/”>SQL Exercises</a>.

View Answer   |  May 10, 2013  5:13 PM
SQL, SQL Database, SQL queries
answered by:
1,610 pts.