Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rajeevnandanmishra
  • Order by date
  1. rajeevnandanmishra

    Grouping By Aggragate Function

    Kindly remove "Hours" from group by. And use "Order By 2" for sorting on Points column.
  2. rajeevnandanmishra

    Pass through query efficiency

    I agree, the linked server query (with 3 dot notation) will be more efficient, but only if you are having the link server pointing to some native databases (e.g. MS SQL Server). But if the link server is pointing to a ODBC DSN, then the pass through query will be more efficient. I am not...
  3. rajeevnandanmishra

    24:00 as a time

    And may be if you have DATE also stored in some column, then you need to add 1 day in case when the value of TIME field is 24:00 Just a thought after going through the thread...
  4. rajeevnandanmishra

    SUM problem with multiplier

    Can you put the result of following query here: SELECT SUM(r.entry_amt), SUM(r.entry_amt*.035), SUM(r.entry_amt)+SUM(r.entry_amt*.035) AS AMOUNT May be this helps in getting the cause of error.
  5. rajeevnandanmishra

    Constraint Question

    It looks that you require a composite primary key. You can use following statement to create this: alter table TABLENAME add constraint pk_TABLENAME primary key (cu_id, email_address) Though, consider that if any of these columns are nullable, then you first need to make them "not null". R
  6. rajeevnandanmishra

    subtotaling...

    Hello gjsaturday, The solution pointed above are able to solve your problem. But if you don't have a very large set of data then probably you can use the following query for the time being: ---------------------------------------------- select c.name,b.name, e.date, sum(e.bal) from table1 a...
  7. rajeevnandanmishra

    Error registering Com+ Application

    I have created a Com+ server application in the Windows 2003 server. When I instal the MSI file in windows 2000 machine it give me error that "error Registering COM+ application". While exporting the application i have checked the option "save the application in Com+ 1 format While creating the...
  8. rajeevnandanmishra

    Adding a new column in between existing Columns

    Suppose i have a table with following definition. CREATE TABLE myTable (col1 Int, col2 Varchar(10)) Now I want to add one more column colX (datetime) in between col1 & col2. So the new table structure should be like col1 Int, colX Datetime, col2 Varchar(10) Previously, i was doing this by...
  9. rajeevnandanmishra

    Variable Scope?

    Hi James, Can you tell us that what error message you are getting and on which line of this stored procedure? --- Raj
  10. rajeevnandanmishra

    Formatting Numbers

    Hi Robert, I am not sure if there is any inbuilt function to do this formating in T-SQL. But like your command the following can also be used: ---------- RIGHT('0'+CONVERT(VARCHAR, @intNumber1),2)+' / '+ RIGHT('0'+CONVERT(VARCHAR, @intNumber2),2) ---------- But you may like to check the...
  11. rajeevnandanmishra

    max date less than existing

    Hi Tim, swampboggie I am not sure about the above query's where clause. It looks to me something complex. What about the following query (if i have not understood the problem correctly) ----------------------------------------------- update ppd2002 set previoustestdate = (select...
  12. rajeevnandanmishra

    Returning smalest values in a query

    Hi mtl77, The query of jackfl give you the required results after you modify a little bit. That is just remove the DESC from the query and it will work. --- Raj
  13. rajeevnandanmishra

    Temp Tables + sp

    Hi Tim, Try using global temporary tables (## tables) or permanent temporary tables (created in tempdb). --- Raj
  14. rajeevnandanmishra

    Wildcard search without LIKE?

    Hi Leslie, I think that you have to use like operator. But i am sure that you will get what you want by using the like operator properly. e.g. starting with 'smit' ---- WHERE defnam like 'smit%' ending with 'smit' ---- WHERE defnam like '%smit' containing 'smit' ---- WHERE defnam like...
  15. rajeevnandanmishra

    How to drop ##temp_tbl?

    Hi Try this, ----- if exists(select * from tempdb..sysobjects where name = '##temp_tbl') drop table ##temp_tbl ----- --- Raj
  16. rajeevnandanmishra

    Returning smalest values in a query

    Thanks mtl77, i am not old here. So, just missed the syntax. Thanks again for correcting it. --- Raj
  17. rajeevnandanmishra

    Returning smalest values in a query

    Hi Try this: SELECT TOP 10 DISTINCT myColumn FROM myTable ORDER BY myColumn --- Raj
  18. rajeevnandanmishra

    Converting datatype Varchar to numeric

    Hi nread, I think that it is your connection settings, that why you are getting the wrong resulst. Otherwise the command is perfect. Just go to Connections tabl under TOOLS-->OPTIONS. And un-check the 'Use regional settings when displaying currency, number, dates, and times'. After doing this...
  19. rajeevnandanmishra

    Empty Field

    gust1480, Ooops! Sorry. First i was writing something and then end up with something else. just the line without datalength function will work. i.e. select * from table where (isnull(rtrim(myField),' ')) = ' ' But i feel that claire has given a better idea. Thanks claire. I have not...

Part and Inventory Search

Back
Top