Forum Replies Created

Viewing 14 posts - 226 through 239 (of 239 total)

  • RE: Join Problem.... Help....

    Try taking out the "(nolock)" after the "as dm" and moving it to after the "LastMonthSales dm1"

    This works

    select *

    from  sysusers as Org (nolock) 

    inner join (select distinct dm1.UID as UID

         ...

  • RE: Need Help

    Do you have any more details about the table layouts?

    --Jeff

  • RE: Zero Count

    Hopefully this will work for you:

    create table TicketType

    (

    TicketTypeID int,

    TicketTypeDescription varchar(255)

    )

    create table Client

    (

    ClientID int,

    ClientName varchar(255)

    )

    create table Ticket

    (

    TicketID int,

    ClientID int,

    TicketTypeID int,

    TicketDate datetime

    )

    insert TicketType values(1, 'Ticket_1')

    insert TicketType values(2, 'Ticket_2')

    insert TicketType values(3, 'Ticket_3')

    insert Client...

  • RE: Date formatting problem

    This works if you need it as a character string

    declare @col_mm_no smallint

    declare @col_yr_no smallint

    select @col_mm_no = 5,

           @col_yr_no = 2005

    select right('0' + cast(@col_mm_no as varchar), 2) + '/01/'  + cast(@col_yr_no...

  • RE: Parsing a comma delimited string into multiple rows---Please Help!!!

    If you have a table containing the list of courses you can do the following:

    create table Course

    (

    CourseID integer,

    CourseName varchar(255)

    )

    create Table StudentCourse

    (

    StudentID integer,

    AllCoursesTaken varchar(1024)

    )

    insert course values(1, 'English')

    insert course values(2, 'Calculus')

    insert...

  • RE: Date Calculation and Querying multiple columns

    For question 2, instead of having a table with 26 columns each representing a value, it may be easier to store the data in tables like these:

    create table PersonAttribute

    (

    PersonID integer,

    AtttributeTypeID...

  • RE: Checking to see if Table is being processed

    I would optimize the insert/updates to not block the reads.  You could shorten or eliminate the use of transactions or allow the reads to not wait with the WITH NOLOCK...

  • RE: Checking to see if Table is being processed

    If someone is inserting or updating data into the system, why do you want to send your users away?  There query may take a little longer because of waiting for...

  • RE: Checking to see if Table is being processed

    I'm not clear what you mean by 'in process mode'.  If you mean the tables are being accessed via INSERT/UPDATE statement, then in a typical OLTP system, they will be...

  • RE: How to Populate the Datawarehouse

    You will need some sort of ETL process that runs at a regular interval.  The method that I use is something like the following.  For each table write SQL something...

  • RE: Checking to see if Table is being processed

    If you are concerned about getting back dirty data or some incomplete data, SQL Server normally prevents this.  Your select statement will wait for any inserts or updates that are...

  • RE: Convert Varchar to Bit

    In SQL, bits are represented by 0 or 1.  It doesn't translate the string 'TRUE' to a 1.  If the source data is a string 'TRUE', then a case statement...

  • RE: Trying to use field with 8000 characters - Are there limitations

    I think you are over complicating things.  A stored procedure can take a text field as an argument and insert it directly into the table.

     

    create table tblNews

    (

      NewsID int identity(1,1),

     ...

  • RE: basic transaction willl not roll back? help

    A "begin transaction" statement does not require an "end"

    The following works but I agree that its best to do the update by qualifying the balance in the where clause.

    create table table1 ...

Viewing 14 posts - 226 through 239 (of 239 total)