Forum Replies Created

Viewing 15 posts - 1,816 through 1,830 (of 2,038 total)

  • RE: Isues with Identity columns? Char as primary key

    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...

  • RE: Reading XML file

    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...

  • RE: Reading XML file

    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"

    ...

  • RE: SQL Query not running...

    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...

  • RE: Reading XML file

    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

  • RE: how to append the Leading Zero '0' + SSSIS

    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

  • RE: Create Table/Function to calculate costs

    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...

  • RE: Split comma seperated field into seperate fields to link with lookups

    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...

  • RE: Need a function to compare strings.

    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 =...

  • RE: Extracting specific data from a column

    Our pleasure!

    The main job was done by J+F! 🙂

    Greets

    Flo

  • RE: Update table on key words

    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...

  • RE: Update table on key words

    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...

  • RE: Update table on key words

    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...

  • RE: sql code question.

    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...

Viewing 15 posts - 1,816 through 1,830 (of 2,038 total)