Forum Replies Created

Viewing 15 posts - 166 through 180 (of 212 total)

  • RE: SET a local variable from a global variable

    Not quite sure what you mean by 'parameter 1' but:

    declare @bigvarchar varchar(1000)

    set @bigvarchar = @name_of_variable

     

    J

  • RE: Database name with special character(Urgent)

    try putting square brackets around the object names:

    select * from [ST_Rel_4.050_Test].[dbo].[sa_desk]

    You probably only need it around the database name but I have shown it around all levels.

     

    J

  • RE: Bookmark Operator

    A bookmark lookup is when the query uses a non-clustered index to finds rows matching and then uses a clustered index to find the row in the table.

    If you are...

  • RE: Flat File Normalization

    I would load the data into a single table and then write queries from that table to insert into the normalised tables.

    I'm not sure that you can do it all...

  • RE: Dates and parametes in views

    Have a look at http://www.w3schools.com/ado/

    set conn=Server.CreateObject("ADODB.Connection")

    conn.Provider="Microsoft.Jet.OLEDB.4.0"

    conn.Open "c:/webdata/northwind.mdb"

    set rs=Server.CreateObject("ADODB.recordset")rs.Open "exec stored_proce 'start_date', 'end_date'", conn
    There are other ways of doing it like using command type and adding parameters but I cannot...
  • RE: Mysteriously slow select

    It is doing a full table scan because there is no usable index.  AccountId is part of one index but it is not the first column in the index and...

  • RE: Dates and parametes in views

    Same as you would for return rows from a table:

     

    create procedure Myproc @start_date datetime, @end_date datetime

    select <columns>

    from vw_summary

    where sdate between @start_date and @end_date

     

    J

  • RE: Dates and parametes in views

    As far as the error message, there is no way round it.  Every column in the select has to be either in the Group By or part of an aggregate...

  • RE: Mysteriously slow select

    Have you got some data/ddl you can share with us?

    J

  • RE: Articles Picking and Orders

    Where do the running totals come in?

    J

  • RE: Mysteriously slow select

    Might be the cause of the problem!

    Any other way of getting the SentTo information?

     

    J

  • RE: Don''''t delete/load if the file 0 byte -DTS

    Check the size of the files first either using xp_cmdshell 'dir \\server\folder\*.txt'.  You can put these results into a table and query that to determine the size.  You could...

  • RE: Mysteriously slow select

    I guess that it is a 1 to Many between fn_getValidSubscriptions and tblcommunicationsSent. 

    The query is doing a distinct on tblCommunicationsSent.SentTo - and the number of Many in the relationship...

  • RE: Updating fields - Can this be optimized?

    With the ZIP data, why cant you load the character data into an int column - wont SQL Server will do an implicit cast during the load?

    J

  • RE: CHAR vs VARCHAR

    Would vertical partitioning be of any benefit as you cannot normalise the data?  If columns SN10 - SN60 are empty for most rows then you might not need to have...

Viewing 15 posts - 166 through 180 (of 212 total)