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 Mike Lewis 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: k01
  • Order by date
  1. k01

    Cumalitive Totals and Percentages for Ranking Inventory

    Hi Julie, Could you give me the sample data? Then I can give you the answer quickly. Thanks Koichi http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
  2. k01

    Making Inserts Faster

    Hi, This is the steps which I recommend. -Configure database size to avoid auto expansion -Create flat file of target data -Insert flat file with BULK INSERT Koichi http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
  3. k01

    Set Hours in DateTime variable

    Hi, You can get only date part by this SQL. SELECT CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, GETDATE()))) SELECT CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, CAST('4/8/2008 12:03:14 AM' AS DATETIME)))) Koichi http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
  4. k01

    Fields with Empty Strings

    Hi, If LoanNumber has no null,it will work. But if yes, SQL should be modified like this. SELECT CM.ControlID ,CM.LoanNumber FROM tblControlMaster CM WHERE ISNULL(CM.LoanNumber'')='' ORDER BY CM.ControlId Koichi http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
  5. k01

    date problem

    Hi baran121, You can get the result with this. select CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, sdate)))) from ab_date_def where sdate between '2008-01-01' and '2008-03-30' order by sdate By the way, You need to take care the condition too when you use the datetime. This SQL...
  6. k01

    Alternative to Query Analyzer

    Just for your information, CSE is famous SQL query tool in Japan. It is free software and very small package. You can connect SQLServer via ODBC,Oracle,MySQL and so on. CSE web site: http://www.hi-ho.ne.jp/tsumiki/ Screen shot: http://www.hi-ho.ne.jp/tsumiki/image_odbc.html However this tool...
  7. k01

    Create view with number range for summary levels

    How about this? Test data creation: CREATE TABLE [dbo].[TEST1]( [Loc] [varchar](50) NULL, [LocOrder] [int] NULL, [IsLocation] [char](1) NULL ) ON [PRIMARY] GO INSERT INTO [TEST1] ([Loc],[LocOrder],[IsLocation]) VALUES ('22XXX','19','N') INSERT INTO [TEST1]...
  8. k01

    Loop through all tables in DB and add column

    You would like to add new column on all tables of DB? koichi http://aboutabi.blogspot.com/
  9. k01

    delete statement takes time

    I recommend you check sqlserver log if the database log file is required to be expanded before that. If it is required, it is better to re-configure the database log file size to avoid auto expanse. koichi http://aboutabi.blogspot.com/
  10. k01

    Create view with number range for summary levels

    Is this what you want to get? SELECT LEFT(LOC,2) + 'xxx' AS SummaryGrp ,MAX(LocOrder) AS LocOrder FROM TEST1 GROUP BY LEFT(LOC,2) + 'xxx' koichi http://aboutabi.blogspot.com/
  11. k01

    SQL Export Application

    I'm not understanding your environment either... -Create DTS package to export .xls file. -Execute DTSRun to run this package (Or you can create SQL job to run DTS) If I don't understand what you want to do, please give me more detail. koichi http://aboutabi.blogspot.com/
  12. k01

    problem with dynamci sql

    There might be better way. But anyway I'll show you the sample with dynamic SQL. CREATE TABLE [dbo].[TEST]( [TableName] VARCHAR(255) NOT NULL, [NrOfRecords] [int] NOT NULL ) ON [PRIMARY] DECLARE @TABLE_NAME VARCHAR(255) DECLARE @SQL VARCHAR(8000) DECLARE C_TABLE CURSOR...
  13. k01

    Help with Cursor and Fetch

    You can get the result by this query. SELECT A.ReceiptNo ,A.ReceiptDate ,A.ItemNo ,A.WhseID ,A.QtyRecvd ,A.QtyOnHand FROM #Temp1 A INNER JOIN ( SELECT ReceiptNo FROM #Temp1 T1 WHERE QtyOnHand = (SELECT...
  14. k01

    Connecting to Database

    It is possible both. You can make users access the database directly. You can prepare some datamart for uses. Besides, You can also make users access the report which was saved. In this case, user does not access the database. koichi http://aboutabi.blogspot.com/
  15. k01

    what is wrong w/ join syntax?

    It will work on only SQLServer DELETE FROM table1 FROM table2 WHERE table1.BusinessDate = table2.BusinessDate koichi http://aboutabi.blogspot.com/
  16. k01

    help with grouping

    SELECT COUNT(Distinct id) as COUNT ,priority ,name FROM table GROUP BY priority ,name koichi http://aboutabi.blogspot.com/
  17. k01

    Ordering numbers first then strings

    serial : varchar(5) select serial from table order by right('00000' + serial,5)

Part and Inventory Search

Back
Top