Forum Replies Created

Viewing 15 posts - 12,511 through 12,525 (of 13,460 total)

  • RE: VBScript Object Required error

    sent you a PM, as we might be getting sidetracked in ASP code vs SQL for the forum. I hate posting huge volumes of code and examples which might side...

    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: VBScript Object Required error

    <script> tags are for client side usage, whereas stuff inside <% %> would be executed at the server.

    the connection does not exist on the clientn side of course.

    if your form...

    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: IP address retrieval

    damn I learned something new again. thanks Jeff;

    Here's some crappy sample code; you'd probably want to convert to int in order to store the data:

    declare @IP varchar(20)

    SET @IP = '192.168.1.65'

    select...

    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: IP address retrieval

    As Jeff and Sergiy have identified, your data type is doinked. you should have either kept the full IP address, or converted it to an int or big int.

    how do...

    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: SP RUNS ONCE THEN GETS STUCK IN A LOOP

    can you change your procedure to have the WITH RECOMPILE option in it? that would force it to build a new execution plan, and might fix the issue.

    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: select query as function parameter

    you could keep it scalar by doing something like this:

    select ID, dbo.functionName (name) from table where id=1

    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: SP RUNS ONCE THEN GETS STUCK IN A LOOP

    did you update statistics?(see BOL "sp_autostats")

    As I stated before, long running queries are often a result of bad statistics.

    two servers, even with the same data, can have different statistics (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: how do you secure SQL against everyone?

    yeah this is a common scenario in smaller shops as they get bigger....Jeff's suggestions are right on; you'll upset the apple cart so to speak , as the developers must...

    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: SP RUNS ONCE THEN GETS STUCK IN A LOOP

    I think the update is a little deeper, you name your views just like I do with "vw_" preceeding it,and that makes me think you need to take look 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: SP RUNS ONCE THEN GETS STUCK IN A LOOP

    it looks like you are actually updating a view, rather than directly accessing the underlying tables:

    UPDATE vw_CostPriceUpdate_Update

    SET Cost =[UK Cost]

     

    if you do sp_helptext vw_CostPriceUpdate_Update, i bet 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: Using Conn.Execute() in an ASP file

    this is a prototype example, because your field names, as welll  as other manditory (NOT NULL) columns are not mentioned here.

    you want to be able to insert a note from...

    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: Script to list all PK & FK keys?

    the script below will get you started; the core table you are looking for is sysforeignkeys

    typical results:

    CONSTRAINTNAMEREFTABLEREFCOLUMNFKTABLE

    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: GROUP BY

    here's how i would do it, there's probably a better way:

    [edited after posting: Mike Howell beat me to it...same solution i think]

    CREATE TABLE #TEST(

    SERVER_NAME VARCHAR(30),

    DATABASE_NAME VARCHAR(30),

    DBSIZE INT)

    INSERT INTO #TEST(SERVER_NAME,     DATABASE_NAME,      ...

    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: birthdate as a non date field

    speaking form the standpoint of a bit of experience, too many times I've encountered a situation where dates or partial dates were entered into say, a varchar field, It caused...

    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 help

    you have to group by the case statment in this situation..it's wordy, but that's how it works...only in the ORDER BY clause can you reference by alias, so it's like...

    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,511 through 12,525 (of 13,460 total)