Hi all,
Recently we had an encoding problem in our system :
If we had the string "æ" in our db ,it became "æ" on our web pages.
Now this problem is solved, but the problem is that now we have a lot of "æ" in our database : users didn't see and validate pre-filled form with these characters.
I found that If you read in utf 8 C3A6 yo...
I have a SQL Server table full of orders that my program needs to "follow up" on (call a webservice to see if something has been done with them). My application is multi-threaded, and could have instances running on multiple servers. Currently, every so often (on a Threading timer), the process selects 100 rows, at random (ORDER BY NEWID...
hello guys.. ive got an error to fix. its:
[FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) could not be converted
when i use turkish characters to insert i get this error. my question is how can i disable that converting thing? im connecting to sql server via freetds and unixodbc.
than...
I'm making a parameterized query using C# against a SQL server 2005 instance, and I'd like to take a look at the SQL that is run against the database for debugging purposes. Is there somewhere I can look to see what the output SQL of the parameterized command is, either in the database logs or in the Visual Studio debugger?
...
I'm trying to get an idea of fulltext index growth and gauge its long-term memory needs.
Does it keep a cache of each search? (Knowing that the first search for a new keywords always takes slightly longer, and is subsequently faster) Will it grow indefinitely?
Or is its size pretty much finite after its creation?
Should I expect perfo...
I have to create a view from more than one table in MS Sql Server database, but i am not able to get the correct syntax for the same. need help.
thanks.
...
SQL Server 2000
Say if I have a table like
CREATE TABLE [Message] (
[MessageIdx] [int] IDENTITY (1, 1) NOT NULL ,
[Message] [varchar] (1024) COLLATE Latin1_General_CI_AS NOT NULL ,
[column1] ... ,
[column2] ... ,
... ,
[ValidUntil] [datetime] NULL ,
CONSTRAINT [PK_Message] PRIMARY KEY CLUSTERED
(
...
I have the following XML:
<tests>
<test>1</test>
<test>2</test>
<test>3</test>
</tests>
And I am trying the following query:
CREATE PROCEDURE [dbo].[test]
@Tests xml=null
AS
BEGIN
SELECT
doc.col.value('(test)[1]', 'nvarchar(50)')
FROM
@Tests.nodes('//tests') AS doc(col)
END
But it only returns me a v...
Hello, I recently migrated from a PostgreSQL database to a SQL Server database. To switch the data over I had to enable IDENTITY_INSERT. Well come to find out that I get all sorts of strange errors due to duplicate identity values(which are set as primary keys) upon doing an insert in any of the tables.
I have quite a few tables. What ...
I have the following query:
SELECT MAX([LastModifiedTime]) FROM Workflow
There are approximately 400M rows in the Workflow table. There is an index on the LastModifiedTime column as follows:
CREATE NONCLUSTERED INDEX [IX_Workflow_LastModifiedTime] ON [dbo].[Workflow]
(
[LastModifiedTime] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORE...
I'm using the MERGE statement to upsert rows in an sql server 2008 database. However, my sproc is a single-row operation, whereas in fact I'd prefer to batch these. Is this even possible and, if so, how do I do it?
...
I am looking for a reference for a SQL Server DBA who has to come up to speed on basic Oracle 11 DBA tasks: backup, recovery, user administration, etc.
There seems to be some material on the web for the reverse: Oracle -> SQL Server, but the only potentially useful resource I have found in a few searches is yet to be published: http://w...
This question is about what happens with the reorganizing of data in a clustered index when an insert is done. I assume that it should be more expensive to do inserts on a table which has a clustered index than one that does not because reorganizing the data in a clustered index involves changing the physical layout of the data on the di...
Hi
I have a stored procedure that declares a input parameter
@BatchNumber uniqueidentifier
This field in the table is set to not allow nullables.
When I drag in the stored procedure and it hooks everything up it says the parameter is nullable.
I don't understand why. Is this normal for it to think that the parameters are nullable?...
Based on following AreaState table
Area State
-------------------
A1 Active
A1 Active
A1 Active
A1 Proposed
A1 Proposed
A2 Active
A2 Proposed
I want to write a stored proc that returns count of state for each of the areas. Input to the stored proc is any valid State (in this case @state is the input parameter). I was hoping ...
I am storing images in a SQL database , right now I have images being stored in separate tables depending on the object the images belong to, is there any reason ( performance etc..) why I should keep it this way and not store all images in the same table?
...
id Ptypefield Value
1 1 D
2 1 E
3 1 F
4 1 G
5 1 H
6 2 FL
7 2 IF
8 2 VVS1
9 2 VVS2
10 2 VS1
11 2 VS2
12 3 0.50
13 3 1.00
14 3 1.50
15 3 2.00
16 4 Marquise
17 4 Round
18 4 Pear
19 4 Radiant
20 4 Princess
this table i want to get id no i give value like D and F
this is ...
I simply want a stored procedure that calculates a unique id (that is separate from the identity column) and inserts it. If it fails it just calls itself to regenerate said id. I have been looking for an example, but cant find one, and am not sure how I should get the SP to call itself, and set the appropriate output parameter. I woul...
Is there an elegant way in SQL Server to find all the distinct characters in a single varchar(50) column, across all rows?
Bonus points if it can be done without cursors :)
For example, say my data contains 3 rows:
productname
-----------
product1
widget2
nicknack3
The distinct inventory of characters would be "productwigenka123"
...
Hi,
I am trying to use SSIS to import data from a XML file. One of the element in the XML file contains binary data of a pdf file.
I created a SSIS package and setup the column properties of the XML source to DT_BYTES and also tried DT_IMAGE. But I get the following error.
Error: 0xC0209029 at Data Flow Task, XML Source [1253]: SSIS Err...