Forum Replies Created

Viewing 15 posts - 721 through 735 (of 2,038 total)

  • RE: Passing DECLARED Variables between different DB in Stored Proc

    Hi

    Your problem is not the different database. The problem is the "GO". It finishes the complete batch and starts a new one. GO within scripts is equal to using two...

  • RE: Dates Between From date and To Date

    WILLIAM MITCHELL (6/7/2009)


    Sorry, did not read the entire question, missed the part where the dates come from another table.

    Nothing to apologize :-). I just intended to ensure that the OP...

  • RE: ObjectOriented DataBase in the SQL

    I have no experiences with any object oriented database. Since now I was able to handle every thing in simple RDBs ;-).

    As you wrote it sounds like a school project....

  • RE: Dates Between From date and To Date

    WILLIAM MITCHELL (6/7/2009)


    If the dates are sequential you could use this

    -- these would be your input parameters

    DECLARE

    @empno int,

    @start_date datetime,

    @end_date datetime,

    @project nvarchar(50)

    -- set them to some values for testing

    SELECT

    @empno = 1,

    @start_date...

  • RE: Counting Number of Foreign Keys in Query

    I suggest to use a GROUP BY instead of a sub-query in your SELECT clause. It performs better for many data:

    SELECT

    A.id,

    ...

  • RE: Export data to template

    I don't think this is possible with SQL. You can try to parse the RTF syntax and insert your data at the right position but I don't think SQL is...

  • RE: Dates Between From date and To Date

    You can use a Tally table for this:

    DECLARE @t TABLE (EmpNo INT, FromDate DATETIME, ToDate DATETIME, Project VARCHAR(30))

    INSERT INTO @t

    SELECT 1, '2009-10-01', '2009-10-04', 'abc'

    SELECT

    ...

  • RE: ObjectOriented DataBase in the SQL

    Hi Lynn

    Lynn Pettis (6/7/2009)


    Obviously you have already decided that you must have an object oriented database. SQL Server, Oracle, Informix, PostgreSQL, MySQL, are relational database management systems. They...

  • RE: ObjectOriented DataBase in the SQL

    For sure you can create a object oriented application with a relational database back end. I think this is the most common way to make larger software.

    Very simplified look from...

  • RE: How to update a large text field

    Hi dave

    This solution using PATINDEX should work.

    ; WITH

    cte ([domain], [rid], [zone], [moddate], [type]) AS

    (

    SELECT

    domain,

    ...

  • RE: How to update a large text field

    Okay, which criteria are assured?

    * "01 ; Serial" after your date?

    * " ; Serial" after your date?

    * Line 3 for your date?

    * Serial at the end of the...

  • RE: join

    Hi Tara

    In SQL Server 2005 the most simple way to handle this would be EXCEPT:

    DECLARE @a TABLE (Col1 VARCHAR(10), Col2 VARCHAR(10), Col3 VARCHAR(10))

    DECLARE @b-2 TABLE (Col1 VARCHAR(10), Col2 VARCHAR(10), Col3...

  • RE: dynamic SQL: Generate a variable from dynamic SQL

    Hi Clarie

    "EXEC" does not support variables within your sql, you have to work with "sp_executesql". Change your SQL variables from VARCHAR(MAX) to NVARCHAR(MAX) (required for sp_executesql) and try this:

    --Generate a...

  • RE: How to update a large text field

    Hi dave

    If your zone text has always the same syntax you can use this.

    I used the spaces in your Serial line to replace the date part and "mdocmx." + domain...

  • RE: How to toogle datas according to an attribute

    Hi

    Just another possible solution

    DECLARE @t TABLE (Attr INT, Lib VARCHAR(10))

    INSERT INTO @t

    SELECT 1, 'row01'

    UNION...

Viewing 15 posts - 721 through 735 (of 2,038 total)