Forum Replies Created

Viewing 15 posts - 12,856 through 12,870 (of 13,460 total)

  • RE: alter table and add defalut

    you could simply add the constraint to the table: you might need to update the table to the new value prior to adding the constraint

    update mytable set myNewColumn=50 where MyNewColumn...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Help from experienced Guru with the temp table

    so why not do SELECT * INTO #TEMPGE_ReservesFile FROM GE_ReservesFile.then change the name in your update statments to the temp table just created: #TEMPGE_ReservesFile

    why do you want to do it...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: scheduling SQL server to restart

    well...I assume that stopping and starting the services is a bandaid to resolve a memory leak or other performance issue...some effort should be put into investigating that;

    as far as repeating...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: populating a column by calling a function

    i believe you can use a calculated column as well; here's an example that uses a function:

    CREATE FUNCTION GetAge  (@BirthDate datetime, @CurrentDate datetime)

    RETURNS int

    AS

    BEGIN

      return  year(@CurrentDate) - year(@BirthDate)

                   ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Combo Box Limited to 36000 records or so

    i typically use a Msflexgrid or a vsFlexGrid (3rd part component) in order to display data that exceeds 3K in records, because of the performance and record number limitations that...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: scheduling SQL server to restart

    SQLRep:

    create a *.cmd file(notepad)  that contains these line items:

    net stop mssqlserver

    net start mssqlserver

    net start SQLServerAgent

    then go to Control Panel >>Scheduled Tasks for that file; then fiddle with...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trying to join two tables...

    it's actually pretty easy; you were almost there

    SELECT u.username, SUM(h.hour)

    FROM users u

    JOIN hours h ON (u.username = h.username)

    WHERE (h.entrydate BETWEEN getdate() -30 AND getdate()) OR h.entrydate is...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: stored procedure to constrain records of a certain type to a specified number

    need some more information... can you post the actual data structure of the table?

    do you want to keep the last 200 records per identifier, or just the last 200...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Linked Server - OLE/DB Provider ''''MSDAORA''''

    i'm venturing a guess here, but i've had trouble with issues where  the table being called contains oracle blob fields.

    the oracle 8/9 drivers, as well as the microsoft MSDBORA drivers will...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Updating multiple rows of a single column

    an update statement, without a WHERE statement, would affect every row for the field affected;

    ie:

    UPDATE YOURTABLE  SET MYCOLUMN='20202'

    UPDATE YOURTABLE  SET MYCOLUMN='20202' WHERE STATE='NY'

    typically, you never want to do this(update without...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Changing @@servername without a reboot

    you should not have to do a reboot, I believe simply stopping and starting the SQL service is all that is required. when the service starts, all the @@variables and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: replacing a strange character

    this might help: each of the characters can be used in a replace or something; SELECT char(169) returns ©

    for example.

    DEC

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Problem inserting into view

    Remi isn't it true that if one of the columns is aliased, like SELECT CUSTNO as CustomerNumber, an insert into a view will fail?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Simple statement

    just create a c# project and paste the code; no need to ask the question here.

    if it's not obvious, it's going to sort the array and print them line by...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How can I extract Blobs back to .jpg files

    here's a function that you can use in VB6, with minor adaptions.

    with 250 GIG database, you'll need to make sure your savepath has enough space.

    I'm assuming you have the filename...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 12,856 through 12,870 (of 13,460 total)