in ms sql I have the following code:
ALTER PROCEDURE [dbo].[xmlDictamen_Alta]
@Xml text
as begin
declare @Id integer
declare @DocumentoId numeric(18,0)
declare @Descripcion varchar(300)
begin
set nocount on
exec dbo.sp_xml_preparedocument @Id output, @Xml
select
@DocumentId = DocumentId,
...
in ms sql I have the following code:
ALTER PROCEDURE [dbo].[xmlDictamen_Alta]
@Xml text
as begin
declare @Id integer
declare @DictamenId numeric(18,0)
declare @DocumentoId numeric(18,0)
declare @Descripcion varchar(300)
begin
set nocount on
exec dbo.sp_xml_preparedocument @Id output, @Xml
select
...
Hi everyone,
I have a .aspx page for adding new product include the following field:
ID, Name, DateTime, Price
and it run well at localhost but when I publish it and up to the server, then I get the following error:
System.Data.UpdateException: An error occurred while updating the entries. See the InnerException for details. ---> Sy...
For example, I need to change from
to
.
I know PIVOT is for that, but it requires an aggregate function; and for my case, I donot need to aggregate only need column to row.
You can use the following sample data:
CREATE TABLE[StudentScores]
(
[UserName] NVARCHAR(20),
[Subject] NVARCHAR(30),
[Score]FLOAT,
)
GO
INSERT INT...
Subquestioning "Unable to update sys.columns - any other approach?" vaguely mentioning the problems on deployment to server with a different collation.
The problem is that by default SQL Server collation is determined (during setup) by Windows Regional and Language Options --> Advanced --> "Select a language to match the language vers...
Hi,
does anyone know how to create one to one relationship sql server diagaram?
thanks
...
What is the usage of policy management in management part of sql server 2008??
...
After launching SSMS (2008 R2) on my dev machine, which I launch with
"D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash -S localhost -d testdata
without doing anything,
in Activity Monitor I observe some sessions (TestData is my default database)
Details of session 51:
select @@...
I have some negative integer values which are an offset from the default 1-1-1900 date. I have to get the datetime values from these. How can I do this.
Example:
If I do:
SELECT convert(datetime, 53691) as Calc
OR
SELECT cast(53691 as datetime)
I get: 2047-01-01 00:00:00.000
What I need is that If I do:
SELECT convert(datetime, ...
I have one solution where I insert rows where I use GUIDs instead of an Identity. The Guid is generated in c#.
I have another solution where the table, indexes etc are identical, but instead of GUIDs I use identities and let Sql-server generate them.
In the later case I get a performance issue.... Ideas?
//Daniel
EDIT
I really am so...
I am creating sql server 2008 Agent scheduler job form sql script.
Want to Log the details if failed in some case within Job > View Histroy.
Is there any way, so we can log custom text with Job > View Histroy?
...
Like the title says, in oracle you can issue the following command in SQL*Plus:
SQL> select something from anothertable; #sql
SQL> @{/home/me/somescript.sql}; #load sql from file and execute it
SQL> do something else in script; #other sql
Without having to file->open the sql script to load it to the UI.
Is there an equ...
CREATE TRIGGER ChangesTracker on [SearchEngine].[Urls]
FOR UPDATE, INSERT AS
UPDATE [SearchEngine].[Urls]
SET [IsNormalized] = 0
WHERE [AbsoluteUrl] NOT IN or <> or != (SELECT [AbsoluteUrl] FROM INSERTED)
What's wrong?
UPDATE
Thanks @codeulike for your help. I put correct trigger t-sql to an answer.
...
In a project on which I am performing maintenance, I am referencing a database stored on another server. This reference was previously pointing at a database on the same server, but my testbed server isn't large enough to store both databases, so I'm having to refer back to the live database.
Anyway, whoever created this application mad...
I'm about to convert a stored procedure from pl/sql to SQL Server. The procedure uses a cursor to loop through the results of a select query. Is there a SQL Server equivalent to the ORACLE rowtype construct?
...
Hello,
I am working on a website that has access data from a database (sql server). It will also be adding, updating deleting records in the database. It seems like there is an MDF file that gets created containing the database schema and all the records I guess? Once development is complete and I want to move this database to a real se...
Stored procedures are compiled on first use.
There are options to clear cache:
DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS
--To Verify whether the cache is emptied
--DBCC PROCCACHE
or to recompile or to reduce recompilations.
But is it possible to force frequently used stored procedures' execution plans be pre-cached and stay in...
I've got the following problem.
We have Development, Testing and Production environments for our system. All these environments will contain SQL Server 2005, but different editions. The Production will work with Standard Edition.
Now we would like to install Dev Edition on other servers (to save our money), but as far as I know, Dev Ed...
Hi everybody
I tried these two methods on Advantureworks and got different results.
select * from Person.[Address] where AddressLine1 like '%99%'
select * from Person.[Address] where contains(Address.AddressLine1,'"*99*"')
Any Idea?
...
SELECT au_lname, au_fname
FROM authors
WHERE au_lname = 'Green '
au_lname au_fname
---------------------------------------- --------------------
Green Marjorie
SELECT au_lname, au_fname
FROM authors
WHERE au_lname LIKE 'Green '
au_lname ...