Forum Replies Created

Viewing 15 posts - 61 through 75 (of 78 total)

  • RE: Data Import Automation

    I believe you can create a new table for each file to be loaded.  As long as you are running as the dbo, the table should be owned by the...

  • RE: PAGING? Is there something similar to MYSQL "LIMIT"

    1. If you are using an ADO Connection and Recordset from the web side, you can use the PageSize and AbsolutePage properties. Refer to MSDN Library at:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdpropagesize.asp

    Here's the description...

  • RE: How to find out a person is reached 21 years old?

    If your db column name is a date-field named: birth_dt, then this should work:

    SELECT birth_dt,

      DATEADD('yyyy',21,birth_dt) AS birthday_21,

      CASE WHEN getdate() >= DATEADD('yyyy',21,birth_dt)

        THEN '21 or over'

        ELSE 'Under 21'

     ...

  • RE: need advise how to import text file into sql server

    This is a very interesting question.  In order to access a text file directly from SQL Server, you first need to create a schema.ini file that describes the data in...

  • RE: need help on Update PROCEDURE with CASE

    1. When you say "table is empty", I think you mean that the WHERE condition returns 0 rows.  If so, then this is an easy way to do that logic:

     ...

  • RE: sql script for report

    Hello Paul,

    1. Referencing the Date Conversion documention from MSDN:

      Style Number  / Standard       / Input/Output

      20 or 120 (*) / ODBC canonical / yyyy-mm-dd hh:mi:ss(24h)

      (*) The default values (including...

  • RE: How create a table with all days ?

    Try this. Note that there are two levels of parentheses.  Working outward from the inner-most pair:

    - First you union the days to get the table [all_shifts]. 

    -Then you cartesian-join table...

  • RE: Combining records

    This might do it for you:

    1. Create a master list of order-number-type-lines:

    CREATE TABLE orderLines (

     order_number INT

     order_type   VARCHAR(10)

     line_number  INT

     all_refs     VARCHAR(255) )

     

    INSERT INTO orderLines

    SELECT DISTINCT order_number, order_type, line_number, ""

    FROM acknowledgements

    2. Append all the references:

    UPDATE orderLines

    SET...

  • RE: How create a table with all days ?

    First: Do you have a table of all trucks? That will make one of the steps below much more efficient.

    Table tripinformation:

    - shift_date

    - shift_num

    - truck

    - km

    - time

    Table alldays

    - date

    - datetype

    Table trucks...

  • RE: Dynamic Crosstab for any table

    Hello williamhoos,

    A quite good generic stored procedure is at this URL:

    http://www.johnmacintyre.ca/%5Ccodespct.asp

    Here is the complete code, with a slight annotation on my part:

    /************************************************************

    sp_JRMCrossTab - Dynamically creates a crosstab / pivot...

  • RE: One row or two?

    Here are two ideas for you -- neither one uses a NOT IN subquery:

    IDEA #1:

    Select P.PariticipantID from

    tblParticipant P

    WHERE P.PariticipantID IN (

     SELECT D.ParticipantID FROM tblDonorMailFlag D

     WHER ((D.MailPeriodCode = 'AUG' and...

  • RE: Converting Access to MSDE

     It sounds like your Access MDB has tables only in it.  If so, you can use the Upsize Wizard to convert the data tables from ACCESS 2000 to MSDE 2000. ...

  • RE: Converting Access to MSDE

    It sounds like your Access MDB has tables only in it.  If so, you can use the Upsize Wizard to convert the data tables from ACCESS 2000 to MSDE 2000.  Then,...

  • RE: TSQL Help

    If the flag/value fields could change, then add the flag/value condition to the UPDATE statement:

    declare @batchno int, @detailno int

    SELECT TOP 1 @batchno = d.batchno, @detailno = detailno

    FROM detail AS d

    INNER JOIN...

  • RE: A little SQL help, please?

    Assuming your table is named: table_reports, this SQL should insert into each other user_id the report_names in A's list that are not already in the other user_id's list:

    INSERT INTO table_reports

    SELECT...

Viewing 15 posts - 61 through 75 (of 78 total)