Forum Replies Created

Viewing 15 posts - 2,101 through 2,115 (of 3,544 total)

  • RE: insertion of a string

    What do you mean by two lines?

    SQL has no concept of lines it only stores data in rows.

    INSERT INTO [table) (col1) VALUES ('A' + char(13) + CHAR(10) + 'B')

    will insert...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: What is the best way to store PDF files in db?

    I do similar in several of my systems but use unc to access the pdf's from my web servers, do not have connection problems with server reloads.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SQL Insert

    You will have to do two INSERT/SELECT queries

    If company has a guaranteed unique column value (eg Comapny Name) then you can join the company table on the 2nd query to...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: UPDATE TABLE FROM ANOTHER

    noeld,

    your solution will not return zero if there is an end date of zero

    this should do it for the subquery

    Select Membernbr, Min(StartDate) as [SD],

    CASE WHEN Min(EndDate)=0 THEN 0 ELSE...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: DTS->Transformation Data Task->Destinaton Tab

    ooops forgot you may need another 'Execute SQL Task' to create the table using the sql you posted, so the order is

    DROP TABLE --> CREATE TABLE --> TRANSFORM

     

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: DTS->Transformation Data Task->Destinaton Tab

    Create an 'Execute SQL Task' using the excel connection and do

    DROP TABLE `utbl_salesinfo`

    and join it to the source connection with 'ON SUCCESS'

    not actually done this or tested it but I...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: i needed urgent help from MS-SQL GURUS

    or

    ISNULL(NULLIF(plannedminutes,-1),0)

     

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: creating Duplicate Records

    SELECT Customer, n.number AS [EntryNo]

    FROM [#table] c

    INNER JOIN master.dbo.spt_values n

    ON n.type = 'P'

    AND n.number BETWEEN 1 AND 5

    AND n.number <= c.[# of Entries]

    since spt_values...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SP Help

    CREATE PROCEDURE UpdEmp

    As

    SET NOCOUNT ON

    UPDATE e

    SET e.LastName = s.LastName,

    e.FirstName = s.FirstName,

    e.MiddleInitial = s.MiddleInitial,

    e.JobTitleID = s.JobTitleID,

    e.JobTitle = s.JobTitle

    FROM [Employees] e

    INNER JOIN [EmpSource] s...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Last Saturday in month

    SET DATEFIRST 1

    DATEADD(month,DATEDIFF(month,0,@DATE)+1,0)

        - 1

        - (CAST(SUBSTRING('2345601',DATEPART(weekday,DATEADD(month,DATEDIFF(month,0,@DATE)+1,0)-1),1) as int))

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: how do I call this procedure?

    declare @x varchar(2000), @sql nvarchar(4000)

    exec dbo.procJoinColuna 'rolename','14;0;-1;-2;',';', @x OUTPUT

    set @sql = 'select ' + @x + ', y from table'

    EXEC(@sql)

     

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Getting column headers

    quoteSo it sounds like T-SQL isnt useful for retreiving column headers then?

    Depends on what you want and...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to use variable table name and field name in select command

    DECLARE @tablename sysname, @sql nvarchar(4000)

    DECLARE tabcur CURSOR FAST_FORWARD

        FOR SELECT DISTINCT Table_Name FROM SV WHERE Column_Type LIKE '%char'

    OPEN tabcur

    FETCH NEXT FROM tabcur INTO @tablename

    WHILE @@FETCH_STATUS...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Silly question...

    That's OK then

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Silly question...

    Never said you were

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 2,101 through 2,115 (of 3,544 total)