Forum Replies Created

Viewing 15 posts - 7,531 through 7,545 (of 13,460 total)

  • RE: sql query issue

    check the data in ProductSuppliers.Margin; maybe the margin is stored as a percentage?

    so maybe it should be < 0.35 instead of < 35.00?

    also, check the datatype.. why are you comparing...

    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: Detached DB in Temp folder

    do you have an additional instance of SQL on that server? maybe the isntance is using that mdf and not the default instance?

    if you

    select * from master.sys.sysaltfiles

    do you see...

    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: Rounding rounding decimal values by 0.25

    Nice code Gianluca;

    I see how if you are rounding up, it works perfectly; I added that to my snippets for future use, thanks.

    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: unable backup to c drive

    also, the file path might have something to do with it; even with my windows login, I cannot write to the Root of the C:\ drive without "running as Administrator"...

    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: empty server side trace

    yep, it's scripted for one specific database id:

    exec sp_trace_setfilter @traceidout,3,0,0, N'60' -- AND DatabaseID = 60

    it's from this non-obvious snippet:

    set @intfilter = 60

    exec sp_trace_setfilter...

    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: UPDATE with WHERE clause frowned upon by OUTPUT?

    piece of cake, it's only syntax.

    the WHERE statement goes AFTER the output...not before it:

    CREATE PROC CarProductionStateUpdate

    @CarID INT,

    ...

    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: empty server side trace

    wierd; do you have any filters in the trace script that might not be the same, you know, like filtering for a specific databaasename or dbid, and it doesn't exist...

    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: Identity Table vs Identity Column

    Jason you are using C#.NET, right? why not take advantage of the typed data sets and the relations?

    for example, In .NET i can add parent and child records to any...

    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: Remove cursors without using while loop

    As stated, there's a lot of concepts you don't seem to be able to grasp;

    one of the ones that everyone mentioned that could help you turn this into a set...

    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: not able to execute stored procedures with dbo

    if you sp_help YourProc name, what owner/schema is it? you get results like this?

    sp_help sp_Test

    Name Owner Type ...

    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: Remove cursors without using while loop

    ...buth this random guy on the interwebz gave me the code to make this run faster ...what do you mean the numbers are off?...

    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: Retrieve employee data without using stored procedure and c

    odanwada (5/19/2011)


    without using stored procedure and temp tables

    I've been watching this one too...but the requirements scream "homework" to me, where the teacher wants you to use a specific set of...

    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: identity ??

    the max value of the column, whether it's inserted by the identity() or not, is the max value of the data type...int, bigint, whatever type you decide.

    an int is 2...

    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: Drop All Users in the Database

    can't you just add to the WHERE statement to exclude items you don't want to include? like AND issqlrole = 0 or something?

    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: Remove cursors without using while loop

    yep Ninja's right; the key is the procedure usp_generate_purchase_order and the code you commented out ; whatever it is doing to a single set of parameters needs to be moved...

    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 - 7,531 through 7,545 (of 13,460 total)