Forum Replies Created

Viewing 15 posts - 11,986 through 12,000 (of 13,465 total)

  • RE: INSERTING VALUES IN A TABLE USING CHECK CONSTRAINT

    this sounds very much like a homework assignment....

    aside from that...

    you want to do a few things....

    you said only three specific values.... as you suspected, read about CHECK CONTRAINTS in you...

  • RE: Kindly help me in this simple query

    try something like this:

    select gpsdata_history.*

    from gpsdata_history

    inner join

    (SELECT

    REGISTRATIONNO, MAX(GPS_DATETIME)

    FROM ...

  • RE: Get number of records in a flat file

    here's how i would do it:

    first id read everything into a single string, instead of line by line.

    then i could use substring functions to find what we need instead.

    ...

  • RE: SQL Profiler

    there is a free open source project that is a 2005 profiler, independant of MS;

    I use it all the time and it is very good.: very small footprint and you...

  • RE: Query Analyzer sends 'Results to File'

    i have this code saved in my snippets hat might help you; it featues two of the things you might want: BCP of data, and appending multiple files together.

    the original...

  • RE: Script for changing the port number & disable Named Pipes protocol

    i've pasted a script below that shows how to get the listening port by reading the registry, and as the previous poster said, you could write to that spot as...

  • RE: Code to run for Databases compatible to 80 (or) sql server 2000

    something like htis might help:

    it detects the compatibility level...

    IF EXISTS(SELECT cmptlevel from master.dbo.sysdatabases WHERE master.dbo.sysdatabases.name =db_name() AND cmptlevel...

  • RE: restoring a backup from sql server 2008 to 2005

    a backup created on 2008 can only be restored on a 2008 instance; theactual format of the file is different due to the new features.

    this is true of all backups...while...

  • RE: SQL 2005 to SQL 2000

    compatibility level sets what set of syntax rules will be used for commands agains the database; it does not change "how" the data is stored or backed up. think about...

  • RE: How to Update a column in Table from the results of joining 2 other tables

    abstract examples are harder to help wiht, but here's an example:

    --does this return data?

    SELECT

    OtherDatabaseT2.RowID,

    OtherDatabaseT2.StaffID,

    OtherDatabaseT3.SSo_RowID,

    OtherDatabaseT3.LogonStaffNo

    FROM Otherdatabase.dbo.[Table 2] OtherDatabaseT2

    INNER JOIN Otherdatabase.dbo.[Table 3] OtherDatabaseT3

    ...

  • RE: Listing Indexes

    i've got this saved in my snippets of code; i added the bolded where statement to ignore clustered indexes:

    [font="Courier New"]

    SELECT TOP 100

    REPLICATE(' ',4000) AS COLNAMES ,

    OBJECT_NAME(I.ID) AS TABLENAME,

    I.ID AS TABLEID,

    I.INDID...

  • RE: Return all rows where one is a match

    looks like a simple IN() stamtent would do the job...you want the entire order if one of the porducts is 'Bike':

    Select

    oph.order_no,

    opd.order_line_no,

    opd.product,...

  • RE: Concatenate

    why not convert them to ints, then cast then as varchars together?

    CREATE TABLE T1(col1 varchar(30),col2 varchar(30) )

    insert into T1

    SELECT '1','09' UNION

    SELECT '02','01' UNION

    SELECT '01','1 '

    SELECT

    convert(varchar,convert(int,col1))...

  • RE: Identifying Obsoleted Database Objects

    I think you'd have to do this with a quick and dirty .net applacation, since it's obvious you can't on the server side:

    i would think that you'd have to recursively...

  • RE: Change columntype in a view

    try changing just the offending columns with CAST or CONVERT, and not the whole formula:

    CAST(beschikbaar * 60 AS float)

    changes to

    CAST(beschikbaarAS float) * 60

    I think that will solve your...

Viewing 15 posts - 11,986 through 12,000 (of 13,465 total)