Forum Replies Created

Viewing 15 posts - 9,586 through 9,600 (of 13,460 total)

  • RE: Insert Column Default Values

    but your @student table does not allow nulls for the lunch; that is the constraint failure;:

    ,LunchPeriod INT DEFAULT(4) ...

    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: Insert Column Default Values

    i think i had to change my data; you had one class with a null lunch:

    SELECT '10-B', NULL

    which i changed so it would work; i was kind of assuming...

    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: Data Type for fixed-length number?

    000, 052, 020, <--those are not numbers. 0 is zero, there are no preceeding digits for real number types like integers, so you are right, you'd want to consider a...

    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: Table to Table with SUM

    ahh...exactly my point... a view never needs to be updated. you might think of it as self-updating.

    technically, it is a saved query, that is run on demand.

    if you run 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: Insert Column Default Values

    how about selecting from the @Class table?

    INSERT INTO @Student(FirstName, LastName, ClassID, LunchPeriod)

    SELECT 'John', 'Smith', @ClassID, isnull(@LunchPeriod,LunchPeriod) from @Class where ClassId = @ClassID

    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: Opening tables via SSMS right-click

    yes it does; at a minimum, i followed your steps and got a shared lock on the table; you can check it yourself by doing as you described, and then...

    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: Table to Table with SUM

    good; just create a superview then, that contains everything you need, and select from that;

    CREATE VIEW vw_SuperView AS

    SELECT

    [Fault],

    COUNT([Occurred]) AS [Occurances],

    sum(datediff(ss,0,[Duration])) AS [DTDuration]

    FROM Table1

    GROUP BY [Fault]

    UNION ALL

    SELECT

    [Fault],

    COUNT([Occurred]) AS [Occurances],

    sum(datediff(ss,0,[Duration]))...

    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: Table to Table with SUM

    can you change the "duration' column to be an integer with the number of minutes or seconds or something?

    or do it inline int he view?:

    CREATE VIEW vw_Table1 AS

    SELECT

    [Fault],

    COUNT([Occurred]) AS...

    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: xp_cmdshell says executing but nothing happens

    sunshine-587009 (4/28/2010)


    xp_cmdshell is enabled I run the following and it says executing but nothing actually happens it just continues to say executing when via cmd prompt it works and only...

    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: Table to Table with SUM

    Alan, don't put the summary results into a table. Always create a VIEW, which gets the data you want on demand instead...the view would be correct at all times, 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: Grouping question

    nearly the same as ms65g's reply:

    SELECT

    col0,

    min(col1),

    sum(col2),

    max(col3)

    from #Example

    Group By col0

    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: connecting to Oracle on a 64 bit server 2008 windows

    the 64 bit drivers are not named odbcad32; I'm very sure they have a different name,and contain "64" in their name.

    that's the issue i think; trying to use 32...

    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: Slow Database Backup & Restore

    does your server have a lot of free space? if it does not, it might be taking a long time trying to find 3.8 gig of space to restore the...

    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: connecting to Oracle on a 64 bit server 2008 windows

    there is a seperate download for 64 bit Oracle drivers from Oracle; so it might be true the oracle 32 bit client tools are installed on the server, and they...

    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: Grouping question

    ColdCoffee is so right; giving us the tools to help you is critical. with 180 posts, I'm sure you've seen the request more than once.

    as a freebie, here's the CREATE...

    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 - 9,586 through 9,600 (of 13,460 total)