Forum Replies Created

Viewing 15 posts - 2,776 through 2,790 (of 3,543 total)

  • RE: Boolean Test

    You cannot use the words True/False as they are reserved words in SQL. The nearest you can get to your requirement is to check against character representation of True/False

    select *...

  • RE: Is there any way to use LIKE in JOINS?

    Same thing but using PATINDEX

    SELECT mt.description, kw.keyword

    FROM MainTable mt

    INNER JOIN KeyWords kw

    ON PATINDEX ('%' + kw.keyword + '%',mt.description) > 0

  • RE: Query Problem selecting records

    quotewill this work on MS SQL SERVER 2000?

    Yes, but change the first SELECT to

    SELECT b.[Client ID],b.[Course Date],b.[Course ID]...

  • RE: Query Problem selecting records

    What is [Course Code], is it meant to be [Course ID], if so then

    SELECT [Client ID],[Course Date],[Course ID]

    FROM [Course Bookings] b

    INNER JOIN (SELECT [Client ID],MAX([Course Date]) AS [Course...

  • RE: How to create sequence in SQL Server 2000??

    Identity columns can be one of decimal, int, numeric, smallint, bigint, or tinyint, a number by definition. They are normally assigned when a table is created, eg

    CREATE TABLE [tablename] (rowid...

  • RE: Question of the Day for 18 Feb 2004

    Thanks for the replies. Having never done log shipping I was interested to know. At least I know for the future. Never liked replication since had horrible time with 6.5,...

  • RE: Question of the Day for 18 Feb 2004

    Can someone explain how Log Shipping satisfies the 'you can lose no more than 15 minutes of data in a real disaster' requirement unless you are going to 'Log Ship' the database every...

  • RE: Bulk Insert from Excel to sql server

    Yes, use an Excel connection. When you apply the transformation sql will know whether yopu want to input or output. Several things to watch out for. The worksheet must exist...

  • RE: Bulk Insert from Excel to sql server

    bcp databasename..tablename in textfilename /c /t "," /r "\n" /S servername /U username /P password

    This will insert data from a standard comma separated text file

    For further info see BOL (Books...

  • RE: Create an Insert Statement for Table Records

    Try changing

    case when @ColOrder < @MaxCol then ', '

    to

    case when @ColOrder < @MaxCol then '+'',''+ '

  • RE: Bulk Insert from Excel to sql server

    Be careful with Excel inport with DTS. It does not like mixed data in the same column (ie numbers and text). It will take the first row data as indication of...

  • RE: Create an Insert Statement for Table Records

    SELECT 'INSERT INTO VALUES (' +

    CAST(intcol as varchar) + ',' +

    '''' + varcharcol + ''',' +

    '''' + CONVERT(varchar,datetimecol,120) + '''' +

    ')'

    FROM

    Or do...

  • RE: How to create sequence in SQL Server 2000??

    Add a IDENTITY column, sql will automatically increment the column when new rows are inserted.

  • RE: Need help with T-SQL syntax...

    Try this

    select 'sp_addlogin ''' + a.name + ''',@sid=',a.sid,',@passwd=',

    CONVERT (VARBINARY (32), a.password),',@encryptopt=''skip_encryption''' + char(13) + 'GO'

    FROM syslogins AS a

    INNER JOIN maxprod.dbo.sysusers AS p

       ON a.name = p.name...

  • RE: Y2K Strikes Again

    Mmmm. Must admit only done this in testing, mind you I would be happy if this was the only mistake I made, you should see some of my big faux...

Viewing 15 posts - 2,776 through 2,790 (of 3,543 total)