Right... this one had me baffled for a while today so maybe one of you SQL Server bright sparks can shed some light on this behaviour.
We have a table Phones. In it, the phone numbers are stored as nvarchars and it contains numbers in International format, in only numeric format... so a US number +1-(212)-999-9999 is stored as 121299999...
Hi
I am trying to update the value of a tag with Chinese characters. However it does not add the chinese characters. Instead it adds "???" .
e.g. update table set col.modify('replace value of (/tag/text())[1] with "我"') where ..
Any help is much appreciated
thanks
Ben
...
Can anyone recommend a tutorial on how to write a Java Servlet which connects to MS SQL server and manages data?
I'm trying to write something which pulls products out of one database and inserts them into a stored procedure located on another database.
Thanks in advance.
...
I am currently have a single SQL 2005 server. I would like to replicate to a SQL 2008 Web Edition server. Is it possible to setup replication from a SQL 2005 Standard Edition publisher to a SQL 2008 Web Edition subscriber. What is the best choose for replication type? Are there any major problems with this setup?
...
My database has a parent table with an auto-incrementing primary key identity 'ID', and a normal 'TIMESTAMP column'. I have child tables with a foreign key that refer to the parent 'ID' column.
I want to write a stored procedure that inserts a new column into both the parent and child databases. How would I set the child 'ID' column to...
in SQL Server, if I have an int variable, how can I write a query that returns the values 1 through the int variable's value?
So given:
declare @cnt int
set @cnt = 5
What query would return 1 - 5? Is this possible?
...
Hello, I have a database that I have created using SQL Server Developer 2008.
I want to script it to a file so that it can be recreated by anyone at any time.
Any Ideas?
...
In SQL Server, what are Instead Of triggers?
...
When running Reorganize Index and Update Statistics in MS SQL Server 2005's maintenance plan, our production web server is timing out. I know that Reorganize Index is an online operation and that is why we chose it over Rebuild Index so we're at a loss. It's run after a Database backup, in the same maintenance plan, but I've read that i...
I am looking for a LINQ equivalant for the following query:
SELECT UPPER(SUBSTRING(CompanyName, 1, 1)), COUNT(*) FROM MyTable GROUP BY UPPER(SUBSTRING(CompanyName, 1, 1))
Thanks in advance.
...
Hi
I'm trying to fix a legacy system. It's a VB6 app on a SQL DB. They have a database table that's over a gig. It doesn't actually have a lot of rows. The reason is a lot of text in RTF format that is stored in an ntext field. Is there any way to reduce the size of the table without major surgery to the app?
Thanks a lot
Mark
...
I'm trying to implement database source control.
the tool I need should create a separate file for each object in the database, preferably arranged in folders, like
stored procedures
functions
views
tables
and it would be great being able to also dump the results of certain queries, in order to keep track of the data changes in sever...
Is there a standard/convention for how the columns should be ordered in the definition of a database table, and if so what is the motivation for that standard? (pros/cons)
For example, should the primary key be the first column? Should the foreign keys directly follow the primary key or should they be placed at the far right of the tabl...
Following statement can reset seed
DBCC CHECKIDENT ('TableName', RESEED, 1)
but this time I have to change its increment .
...
Hi, is there someone out there who can help me select multiple records that were entered/updated on different tables on the same time in the SQL Server database. Do you think this is possible or not?
Your help is highly appreciated, thanks!
...
Hi community,
I am building a Winforms C# 2.0 application.
I have successfully been able to connect to my SLQ Server database using the following:
m_connexion = new SqlConnection("server=192.168.xxx.xxx;uid=...;pwd=...;database=...");
Because my company wanted to be able to use any database, I went on to use the Odbc driver and my com...
I have a database which is 6GB in size, with a multitude of tables however smaller queries seem to have the most problems, and want to know what can be done to optimise them for example there is a Stock, Items and Order Table.
The Stock table is the items in stock this has around 100,000 records within with 25 fields storing ProductCode,...
When running SQLCMD.exe and providing command-line arguments for scripting variables, I expect that the values provided on the command-line will override those defined in the SQL script file.
e.g.
Given the following SQL Script:
:setvar XXX "SQL script"
print '$(XXX)'
And the command line:
sqlcmd.exe -S <Server> -d <Database> -E -b...
I'm looking at educating a team on writing better SQL Server queries and was wondering what people's best hints were for improving performance.
For instance I once had a DBA who insisted that count(*) would perform worse than count(1) (I have no idea whether she was right or whether it's still valid against the latest query optimisers)....
hi
I need to work with sql server 2005, I need server and developer tools.
my database contain 2 million records, 20 tables and 30 users.
what version of sql server 2005 I need ?
...