Forum Replies Created

Viewing 15 posts - 16 through 30 (of 97 total)

  • RE: Select Query - need optimization

    calibar2k (1/14/2012)


    Table_1(custid,store,amont)

    Insert into Table_1 values (1,store1,1000)

    Insert into Table_1 values (2,store2,2000)

    Insert into Table_1 values (3,store3,3000)

    Insert into Table_1 values (4,store4,4000)

    Table_2 (store,product,col3,col4...)

    Insert into Table_2 values(store1,prod1,value)

    Insert into Table_2 values(store1,prod2,value)

    Insert into Table_2 values(store1,prod3,value)

    Insert into Table_2...

  • RE: Removing commas and quotes from numeric fields in csv file using SSIS

    Hello,

    you can try to do it in Excel before loading data into SQL Server.

    For instance, copy this text and create a new csv file:

    a;1234.5;bbbbb

    aa;"1,234.5";bbbb

    aaa;1234.5;bbb

    aaaa;1234.5;bb

    aaaaa;1234.5;b

    When you open this new file with...

  • RE: CASE Statement in Where clause?

    Hello upstart,

    your use of datepart here is chaotic for me and I think there is a easier way to do it. You are interested only in compare the year/month, not...

  • RE: DELETE !!! soft ? or Hard ?

    Hello,

    first of all you should detect the sec_no to be deleted; you should do it with this query,

    SELECT sec_no

    FROM sec_returns

    GROUP BY sec_no

    HAVING max(ret) IS NULL

    Then you can...

  • RE: Best way of writing a query

    Hello,

    about your first question: yes, the second query is best than the first in terms of performance. The reason is that, when you code a subquery, the DB engine can...

  • RE: Convert Access function to SQL subquery

    Hello,

    It's neat, clean, and verbose, but it works.

    ha ha, sure that neat, clean and verbose are big defects, but despite of that it still works 😀

    Does anyone think using a...

  • RE: Convert Access function to SQL subquery

    Oops,

    I forgot two things:

    - the last query needs a GROUP BY clause.

    - GETDATE() is not equivalent to DATE() but to NOW(), you should take care of that. Surely it is...

  • RE: Convert Access function to SQL subquery

    Hello,

    yes, it can be done in a SQL statement, the problem is to obtain the date first and then sum.

    First of all you can do it using a function like...

  • RE: Dates for Criteria in a view

    Hello,

    what happens if you try to do the job inside Access?, you can construct your query in Access or you can code it and execute using VBA, maybe you don't...

  • RE: Excel Error

    Hello,

    http://technet.microsoft.com/en-us/library/ms141679(SQL.110).aspx

    maybe this link can help you to change the truncation behavior.

    Francesc

  • RE: How to execute Stored Procedure at specific time

    Hello,

    the way to do it is using SQL Server Agent, it allows you to program specific tasks to be executed at specific time.

    You should start SQL Server Agent and ideally...

  • RE: Excel Error

    Charmer (11/11/2011)


    in case truncation....what should i do?

    Hello,

    you must decide what is the answer to this question. You receive a very clear message: "Other" cannot be put into a CHAR(4) column....

  • RE: identify insert

    Hello,

    I see you received two error messages,

    Jpotucek (11/6/2011)


    Insert error. Row=1 error. 37000(128)[Microsoft][ODBC SQL Server Driver][SQL Server]The name "sortOrder" is not permitted in this context. Valid expressions are constants, constant...

  • RE: Query Optimization using Indexes

    Good morning,

    have you tried to run your query without the column "DBO.GETOETYPE(orderlines.oetype)"?, to see the impact of this function in the overall performance.

    Francesc

  • RE: Query Optimization using Indexes

    ChrisM@Work (10/18/2011)


    ...We're likely to confuse the OP here...

    Hello, I agree. Let's me simply put next my ideas about this problem:

    - I suppose [ordernumber] is a redundant identifier, I think about...

Viewing 15 posts - 16 through 30 (of 97 total)