Viewing 15 posts - 1,816 through 1,830 (of 2,038 total)
I've begun a new project and my predecessor used a char(10) field as the primary key in all tables. The key is generated by using the last 10 characters of...
March 19, 2009 at 5:24 pm
Hi Barry
Sorry for this... I'm currently on my track away from SQL Server 2000.
Just had a look for the new syntax:
DECLARE @xml XML
SELECT @xml = '<root><item>value1</item><item>value2</item></root>'
SELECT c.query('text()')
FROM...
March 19, 2009 at 5:16 pm
You can use OPENXML to use XPath for data access.
Sample from BOL:
DECLARE @idoc int
DECLARE @doc varchar(1000)
SET @doc ='
<ROOT>
<Customer CustomerID="VINET" ContactName="Paul Henriot">
<Order OrderID="10248" CustomerID="VINET" EmployeeID="5"
...
March 19, 2009 at 4:13 pm
Just a simple attempt...
If you execute the following script. Do you see the milliseconds? Maybe your SSMS does not show them in its output. Do you use grid or text...
March 19, 2009 at 3:53 pm
Have a look at http://msdn.microsoft.com/en-us/library/ms191184.aspx
March 19, 2009 at 3:33 pm
Hi
Yes you can load xml files:
DECLARE @xml XML
SELECT @xml = BulkColumn FROM OPENROWSET(
BULK 'C:\Users\Flo\Temp\Test\test.xml',
SINGLE_BLOB) AS x
SELECT @xml
Greets
Flo
March 19, 2009 at 3:31 pm
Hi Christine
Maybe you should change:
replace(space(@len),space(1),'0')
with:
REPLICATE('0', @len)
... to avoid to much memory copying in server.
Greets
Flo
March 19, 2009 at 1:46 pm
Hi
It seems that some of your specified columns do not exist.
Try only to execute the SELECT part without any function:
SELECT P.ProjectID ,
P.UserID ,
P.StartDate ,
P.EndDate ,
C.Quarter ,
P.UserCost ,
P.Percentage ,
COUNT(C.date) AS TotalDays...
March 19, 2009 at 1:39 pm
Hi trend
It completely bothered me what I gave you as solution. So I practiced my self to find a good way. 🙂
Try this (this should be a much better solution):
IF...
March 19, 2009 at 1:25 pm
Hi Bob
Forget my approach... I just made a performance test of both functions.
My Function
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time =...
March 19, 2009 at 10:50 am
Our pleasure!
The main job was done by J+F! 🙂
Greets
Flo
March 19, 2009 at 8:11 am
Yes, just take the DELETE (to remove previous information) and INSERT part and rename the example tables to your real names.
You can do this within a procedure or as plain...
March 19, 2009 at 8:08 am
Hi
Almost the same with some comments 😉
-- This is an example for your "jobs" table which will be filled by you
DECLARE @jobs TABLE (id INT, name VARCHAR(100))
-- This is an...
March 19, 2009 at 7:22 am
Hi
Maybe something like that?:
DECLARE @jobs TABLE (id INT, name VARCHAR(100))
DECLARE @job_hist TABLE (id INT, job_id INT, curr_date DATETIME, resolution VARCHAR(100))
DECLARE @jobs_failed TABLE (id INT, curr_date DATETIME, resolution VARCHAR(100))
INSERT INTO @jobs...
March 19, 2009 at 7:01 am
timothyawiseman (3/19/2009)
Bruce W Cassidy (3/17/2009)
[font="Verdana"]You can generally use object-level security to ensure that the only the stored procedure has rights to write to the table.[/font]
Technically true, but I have been...
March 19, 2009 at 6:34 am
Viewing 15 posts - 1,816 through 1,830 (of 2,038 total)