Forum Replies Created

Viewing 15 posts - 11,221 through 11,235 (of 13,460 total)

  • RE: Enumeration in SQL2005

    yes and no.

    you can create a table with the a primary key and the list of possible values.

    then in the main table, you store the key from that table 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: finding a whole number

    i did it the same way as Phil, just too slow to post.... i compared the value to the floor of itself:

    select

    mynum,

    case

    ...

    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: Search all stored procedures for a hard coded string

    good point; i have a handfull of big functions that cross the 4000 char limit, i wonder just where exactly they split in the code....

    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: instead of trigger on a view

    definition of the view?

    the more info you give us, the more we can help.

    what did you try so far? does the base table have a column with an updatedtime in...

    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: Search all stored procedures for a hard coded string

    this finds any object that references a specific string...just limit it to procedures int he where statement:

    DECLARE @PhraseToFind varchar(250)

    SET @PhraseToFind='syscolumns'

    select obj.name,obj.xtype,

    case obj.xtype

    when 'TR' then 'Trigger'

    when 'P' then 'Procedure'

    ...

    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: Cascade Delete

    also, depending on the business model, you might not want to DELETE rows that contain a reference to some parent record, but simply set the value to NULL in 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: Intermittent connectivity issue - how to diagnose and fix

    most connectivity issues I've run into has more to do with server name resolution or DNS than anything else;

    for the connection string, are they using the machine name, an IP...

    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: Reverse string without built in functions

    pshvets (4/14/2009)


    Hmmm...

    Does it mean that recursion cannot be used in this example? Or it should be implemented differently?

    Thanks,

    Pit

    recursion has it's place, of course, but it does not serve string manipulation...

    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: Reverse string without built in functions

    yeah, i think you'll need to use a loop from 1 to datalength(@inputstring), and appending the char in reverse order.

    recursively calling a string that fiddles with one or two...

    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: Unique index in sql server 2005

    a unique index is just that: a constraint and index that prevents duplicate values.

    unique means you can't have 2 nulls in the table., one NULL max.

    it is up to you...

    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 runs forever in sql 2005

    Grant's advice is important: bad statistics = bad execution plan.

    update your statistics on your SQL2005, and see if your old query performs better.

    if your UDF is doing the same code...

    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: Query slower via Management Studio?

    valuable info Grant; i did not know that about linked servers vs openquery... 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: Select query runs forever in sql 2005

    i'd need the real data to test, anything I say from here out is speculation.

    ok we know the server is trying to compare BIBAC to ACCOUNTNUM;

    we know that the server...

    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 runs forever in sql 2005

    Rowan try this method instead; I know a left join is my preference, but I think tat because you are doing 4 operations on the column BIBNAC, and 4 operations...

    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: Query slower via Management Studio?

    is the query using a linked server in SSMS to go to a MySQL Database used by PHP database?

    Is PHP Connecting to a SQL2005 database? I know PHP with MySQL...

    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 - 11,221 through 11,235 (of 13,460 total)