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

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

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

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

  • 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

     

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

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

    or

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

     

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

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

  • 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))

  • 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)

     

  • RE: Getting column headers

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

    Depends on what you want and...

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

  • RE: Silly question...

    That's OK then

  • RE: Silly question...

    Never said you were

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