Forum Replies Created

Viewing 15 posts - 256 through 270 (of 596 total)

  • RE: ISQL and Strange Characters

    When you run a batch file, you are running it with cmd.exe, which supports a specific character set that is most likely different from the collation you are using with...

  • RE: Permissions on view overridden by table permissions?

    It may have to do with the fact that you are creating a view in database B that references tables in database A.  Without seeing all the details, it tough...

  • RE: quotation syntax

    Wow..this is a lot harder than I expected.  Let's give it another try.

     I think the problem is that when you run xp_cmdshell, the command processor also parses the line -...

  • RE: How to copy database from server to local machine

    SQL Server 2000 Standard and Enterprise editions require a server operating system, so you cannot install either of those on Windows XP, for example. You'd have use the personal or developer...

  • RE: sp_update_jobschedule

    Hmmmm.  I just did some preliminary tests with sp_update_jobschedule, and it would not change the status of the job either way.  Alternatively, you could access the enabled column directly:

    DECLARE @myJob sysname

    SET...

  • RE: Monitoring windows process from a SQL job

    Unfortunately, it not simple. Check out this link: http://www.databasejournal.com/features/mssql/article.php/3500276

    The link above uses the undocumented extended stored procedure xp_sqlagent_enum_jobs, so it's probably not recommended for a production system.

    Another (brute force)...

  • RE: quotation syntax

    The problem is again with @cols_To_Include: @cols_To_Include='Ipsil','Contra'  is incorrect due to the quotation marks. What format does the sp_generate_inserts stored procedure expect for the @cols_To_Include parameter?

    I would think it would be...

  • RE: quotation syntax

    I'd do something like like this (remove the PRINT after you're satisfied that the format is correct):

    DECLARE @cmd varchar(8000)

    SET @cmd = 'osql -S. -E -dTest -Q "EXEC sp_generate_inserts...

  • RE: changing varchar datatype to text

    A better design might start with something like this:

    CREATE TABLE Contact

    (

      cid int IDENTITY(1,1) PRIMARY KEY

    -- some contact info, whatever you are collecting

    , clastname varchar(30)

    , cfirstname...

  • RE: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

    Style 101 is mm/dd/yyyy

    Style 103 is dd/mm/yyyy

    Only one of these will work by default for any given server installation, unless the SET DATEFORMAT statement is used to override it.

    My suggestion is...

  • RE: SQL query problem

    Karl previously identified what is most likely your problem:

    I ran the following code, which produced the output listed at the end of this post:

    --DROP TABLE SiteBehaviour

    --GO

    CREATE...

  • RE: Calculating age from birthday

    Actually, SELECT Floor(DateDiff(dd, @DOB, GetDate())/365.25) fails for most dates that are one day behind (see February 20 example - today is currently 2006-02-21). But it is fast otherwise.

    You could also...

  • RE: Storing 64 bit numbers in SQL Server 7

    Try:

    DECLARE @bigInt decimal(38,0)

    SET @bigint = 65536.0 * 65536 * 65536 * 65536

    -- or

    -- SET @bigint = Cast(65536 as Dec(38,0)) * 65536 * 65536 * 65536

    PRINT @bigInt

  • RE: Invalid schema definition

    Like Fred said, take out extra code. You've already moved the join condition to the WHERE clause. It should read:

    SELECT wo.WORKTYPE, wo.WONUM, es.DOWNTIME, es.CHANGEDATE, wo.WOEQ9, wo.WOEQ2

    FROM...

  • RE: Comparing CONTAINS and LIKE

    Yes, you have to create a full-text catalog and populate it before using Contains().  You'd have to do something along these lines:

    USE <your database>

    EXEC sp_fulltext_database 'enable'

    EXEC sp_fulltext_catalog '<your_FT_CatName>' , 'create'

    EXEC...

Viewing 15 posts - 256 through 270 (of 596 total)