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 bkrike 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: chaoma
  • Content: Threads
  • Order by date
  1. chaoma

    merging row on date

    Hi, I hope someone can help here. Here is a sample data: ID StartDate EndDate ZipCode 1 20080101 20080128 90815 1 20080129 20080315 90815 1 20080316 Null 90819 2 20080201 20080415 90801 2 20080416 20080601 90802 2...
  2. chaoma

    Enterprise Manager Looping for Login

    Hi, I just start learning Oracle 10g. I just finished installing Oracle 10g Personal Edition on Windows XP (evalution copy). I have already setup the database (ORCL, SID=ORCL). I typed: emctl status dbconsole It said ORACLE_SID not define. So I defined it as: Set ORACLE_SID=ORCL I...
  3. chaoma

    MDF file too big 45 GB: how to split?

    Hello, I have a single mdf/ldf file for my database. Now it grows to 45 GB. About once a week, I got log file is full message. I tried to shrink database, but it takes too long. Is there anyway to split the file into muliple files? I don't need to backup my tables because the data get...
  4. chaoma

    export to text file with char(13)

    Hello, I need to export this table to a text file. Here is how the table was created: Select row_id+ column1+ column2+ char(13)+ row_id+ column3 from my table With Char(13), it should split the data into 2 rows per record. However, after I export the...
  5. chaoma

    export to text file with char(13)

    Hello, I need to export this table to a text file. Here is how the table was created: Select row_id+ column1+ column2+ char(13)+ row_id+ column3 from my table With Char(13), it should split the data into 2 rows per record. However, after I export the...
  6. chaoma

    insert number 1,2,3,... into table

    This might be an easy question, but I cannot find help anywhere. I have a table and need to insert a sequential number starting from one for all rows in my table. I tried this but, it give some weird nubmer. Select newid() as row_id, Column1, Column2 into NewTable From...
  7. chaoma

    Job refuses to run after the 8th job

    Hello, Microsoft SQL 2000 Server Agent refuses to run after the 8th jobs already running. Is anyone know how to overcome this limitation. I am using Windows XP, MS SQL 2000 Personal Edition. Thanks
  8. chaoma

    Fetch Statement in Exec Statement

    Hi, I am having problem using FETCH cursor statement inside a EXEC statement. I need to use EXEC because there is a variable inside the FETCH statement. Thank you. Here is a sample data: SELECT 'A' AS LETTER INTO ALPHABET UNION SELECT 'B' UNION SELECT 'C' Here is a query I like to...
  9. chaoma

    how to Edit dts file?

    Hello, I designed DTS package using Enterprise Manager. Instead of saving the package in SQL Server, I saved the package as Structure Storage File. Does anyone know how to load it back to GUI so I can do the edit? Thank you for any assistance!! Chaoma
  10. chaoma

    5 consecutive month

    Hello, I need help on how to find ID (below) where Code=5 existed for 5 or more consecutive months from 11/2005 to 11/2006 and change to Code=2 immediately following the consecutive month. Here is a sample data: ID Code Beg_dt End_dt 1 5 20051201 20051231 1 5 20060101 20060131 1 5 20060201...
  11. chaoma

    parsing data

    Hello, I have the follow data: ID Begin_date End_date 1 20050701 20050731 1 20051101 20051231 2 20050801 20051130 I would like the number of occurrences in the month from 7/1/2005 to 5/31/2006. From the above example, the result would be: YYYYMM Count 200507 1 200508 1 200509 1 200510 1...
  12. chaoma

    Every 10th Rows

    I have about 100,000 records. My boss wants records every 10th rows (not random). Does anyone know how to do this. Thanks.
  13. chaoma

    self join not returning null

    Hello, I have a data like this: ID Program Status 1 Fed AP 1 Stt AP 2 Cal AP 2 Stt DN 3 Fed AP I want my data to be : ID Program Status Stt_Status 1 Fed AP AP 2 Cal AP DN 3 Fed...
  14. chaoma

    new connection with query analyzer.

    Hi, Let say if I need to change a database from Master to Northwind, I would type "Use Northwind" in query analyzer. Is there a similar command to change to another SQL server? Thank you for your assistance. Chaoma
  15. chaoma

    last record

    Does any one know how to get the very last record from the table? Table is not sorted. Thank you for your assistance. chaoma
  16. chaoma

    launch ms access from query analyzer

    This might be a simple question, but I can't do it. I would like to launch Microsoft Access 2003 from my query analyzer. I am using: exec master..xp_cmdshell '"c:\program files\microsoft office\office11\msaccess.exe"', NO_OUTPUT But it just hang and time out. Thank you for any help. Chaoma
  17. chaoma

    start access file by running macro

    Hi, I have a weekly report which SQL server export a text file. Then I used MS Access 2000 to prepare my report in PDF format. I have a macro to import the text file and convert the report to PDF format. My question is how do I run these macro automatically as soon as access open the...
  18. chaoma

    execute macro automatically when EXCEL file open

    Hi, Does anyone know how to execute a macro automatically when an excel file is opened? Thank in advance.
  19. chaoma

    Alter table without destroy variable

    I have query like: Declare @count int set @count=(select count(*) from table) Alter table table Add column1 int Update table Set column1=123 When I try to run this query, it complains that column1 does not exist. I can add a “GO” statement after Alter table table Add column1 int GO ...
  20. chaoma

    Transpose data vertical to horizontal

    Hello, could someone please help me with this problem. I have a data below: Type Color Quantity Cat Black 5 Cat Black 2 Dog Black 4 Cat White 3 Dog Red 2 Cat Blue 1 Fish Blue 11 Select...

Part and Inventory Search

Back
Top