Forum Replies Created

Viewing 15 posts - 1,816 through 1,830 (of 3,543 total)

  • RE: Help with BULK INSERT?

    Gave up so soon Jeff

    And there I was looking forward to your solution

  • RE: Help with BULK INSERT?

    You cannot use LF (ascii 10) as a separator for either BULK INSERT or bcp, see 'terminating characters' under bcp in BOL, quote

    When you use bcp interactively and specify \n (newline)...

  • RE: Insert with exec and query

    Add dbname column to end of your #temptable and try this

    exec sp_MSforeachdb @command1 = 'USE [?]'

    ,@command2='insert #temptable (Owner,Object,Grantee,Grantor,ProtectType,[Action],[Column]) EXEC master.dbo.sp_helprotect @username = ''public'''

    ,@command3='update #temptable set dbname=''?'' where dbname is null'

  • RE: Hepl with Shortlist Tables

    E&OE

  • RE: Hepl with Shortlist Tables

    SELECT a.Applicant Name, a.Specialization

    FROM [ApplicantTable] a

    LEFT OUTER JOIN [ShortlistTable] s

    ON s.ApplicantName = a.ApplicantName

    WHERE a.Specialization = @Specialization

    AND ISNULL(s.EmployeeID,0) <> @EmployeeID

  • RE: Help required with SP

    Also

    Where is the table which intPickListItemType (FK) points to?

    What does strDescription contain? Is it relevant?

    How and what to, do you translate intSpecies, intAge, intHeight, intWidth, intLocality, intDistrict to?

  • RE: Help required with SP

    Please clarify 'best match' and 'worst match'.

    Is best where all parameters match (if so does blank/null param mean best?) and worst where no match. What about in between and/or different...

  • RE: how do I Change database context - using a variable

    You could use xp_execresultset to set database context, e.g.

    DECLARE @db varchar(255), @sql nvarchar(4000)

    SET @sql = 'SELECT ''SELECT [name] FROM sysobjects WHERE type = ''''U'''''''

    SET @db = ''

    WHILE...

  • RE: Stored Procedure

    One of the dates input to the proc contains invalid characters or is in the wrong format, ie dd/mm/yy when sql is expecting mm/dd/yyyy  or vice versa. Check the format...

  • RE: Decimal/float/etc.

    I have used both money rounded to 2 dec places and numeric to 2 dec places to hold money. Nowadays I prefer to use numeric so that it is clear...

  • RE: SQL SERVER ---- GROUP BY CLAUSE

    Please post (or edit the first post) the complete question

  • RE: Update data

    UPDATE

    SET Items = STUFF(Items,6,0,'D')

    WHERE Items LIKE '[0-9][0-9][0-9][0-9]AF'

    This will save you updating unnecessary rows

     

  • RE: Stored Procedure

    There are samples of a split function on this site, so you can do this

    CREATE PROCEDURE MyProc

    @ServiceTadId varchar(8000),

    @UserId int,

    @Duration int,

    @StartDate DateTime,

    @EndDate DateTime,

    @Comments char

    AS...

  • RE: Temp Tables in SQL Server

    quoteYou will see that you have a table #something. So table variables are not stored in memory they...
  • RE: Temp Tables in SQL Server

    Yes you can

    Or I sometimes declare it with the create table, e.g.

    CREATE TABLE #mytable (mykey int PRIMARY KEY CLUSTERED, mycol char(1))

    to let...

Viewing 15 posts - 1,816 through 1,830 (of 3,543 total)