Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 3,544 total)

  • RE: Counting "incomplete" fields in tables

    If the number of columns and column names is not too large then you could try this

    declare @tablename varchar(50)
    
    set @tablename = 'tablename'
    declare @sql nvarchar(4000)
    declare @colct...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SQL Server Considerations

    Also consider placement, security and firewall(s).

    Do you realy want your Internet service accessing your sql server on your internal domain and your internal DB's?

    We have internal sql server, another in...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Relationships cause FK contsraint error

    I think your solution boils down to basic design and the use of one-to-one, one-to-many or many-to-many relationships.

    If a person or a company has only one address then the relationships...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Find second highest

    Jeremy fyi,

    To use dynamic sql you have to create a variable containg the sql and use sp_execuetsql

    ie

    declare @n int
    
    declare @sql nvarchar(1000)
    set @n = 76
    set @sql...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stored Procedure for running totals

    For a solution without cursors

    create the temp table (as above)

    select into the temp table (as per your select for the first cursor)

    update the temp table using

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ADO Code

    Alan,

    If you using the code as is, ie no error trapping, then it is unlikely that permissions being the problem as by default errors are shown. When you see the...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ADO Code

    Mine was a serious answer. I have found, via this forum, that I do too much by assumption and default which can lead to inefficiency.

    All I was trying to point...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ADO Code

    Hi Frank,

    Yes, laziness on my part. If you leave off 'Server.' it is assumed (bad practice ).

    I know ASSuME makes an ASS of you and ME and...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SELECT New_Life

    Many Congrats Frank,

    Don't forget good procedure

    DROP Dirty_Nappy
    
    GO
    SELECT Clean_Nappy FROM Nappy_Pile WHERE COUNT(Clean_Nappy) > 0
    INSERT Baby INTO Clean_Nappy
    GRANT ALL Smiles to Baby
    GO

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ADO Code

    Try

    <%
    
    Dim Conn
    Dim Com
    Dim Rs

    set conn = CreateObject("ADODB.Connection")
    set Com = CreateObject("ADODB.command")
    set Rs = CreateObject("ADODB.recordset")

    conn.provider="SQLOLEDB"
    conn.connectionstring="Data Source=(local); initial catalog=Pubs; user id=sa;...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Field Size on Query

    Do you mean this

    SELECT Distinct 
    
    TOP 100 PERCENT [vinnumber], CAST(REPLACE(LEFT([vinnumber], 8), ' ', '_') AS CHAR(8)) AS [Wild Card]

    Edited by - davidburrows on...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: need help -Stored Procedure -Incorrect syntax

    select @na = @na + cast([na] as varchar) + ',' FROM [xsisi] 

    Would'nt it be better to rewrite the query thus

    UPDATE...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Buttons and sprocs

    On desktop create new shortcut and type in the following

    isql -S server -U loginid -P password -d database -q "exec procname" 

    this will run in...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 3,181 through 3,195 (of 3,544 total)