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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by atiaran

  1. atiaran

    Date into SQL from MySQL via linked server

    Thank you very much everybody. I really appreciate your help. Atia
  2. atiaran

    Importing Active Directory with DTS

    Hi there This is the kind of queries I used and it actually loads the data more than 1000 records. You just need to amend it slightly for the company involved. You can use this in a stored procedure and the store procedure to run as a sql job. SELECT TOP 100 PERCENT Rowset_1.*, sn + ', ' +...
  3. atiaran

    SQL: Column populated by other table column names

    Hello people I've got this question. I have a view which has a column referring to the names of different columns in different tables and of different types. view: vw_call_history HISTID CALLNO COL-NAME PRE-VALUE CURR-VAL 50620 22038 OWNERID 16220 <NULL> 50620 22038...
  4. atiaran

    Date into SQL from MySQL via linked server

    hiya there It does not really matter in what format it appears even in day:hour:min as long as it can be used again for calculation. If I follow your code: Select Hours = Cast((DatePart( dd, (Select dateadd(ms,422611000, '1969-12-31'))) * 24) + (DatePart(hh, (Select dateadd(ms,422611000...
  5. atiaran

    Date into SQL from MySQL via linked server

    Seen on the front end 16016000 is actually equivalent to 4hrs 26mins I wanted to ask why it is divided by 60? is that because 1hour=60mins? I've got a different digit: 422611000 (shown as equal to 117hrs 23min) but when I use your code: Select Convert(Char(8),(dateadd(s,((16016000 /...
  6. atiaran

    Date into SQL from MySQL via linked server

    Hi This is actually for r937 but would be very grateful if other people could answer as well. This code that r937 gave further up is as follow: select dateadd(s,1170430556294/1000,'1970-01-01') as t1 , dateadd(s,1126644967922/1000,'1970-01-01') as t2 ...
  7. atiaran

    Date into SQL from MySQL via linked server

    It is actually called MySQLServer And this is what I run: SELECT s.table_name FROM information_schema.tables s left OUTER JOIN MySQLServer.information_schema.tables m ON s.table_name = m.table_name WHERE (m.table_name IS NULL)
  8. atiaran

    Date into SQL from MySQL via linked server

    when i run the code I get the following error message Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'MySQL.information_schema.tables'.
  9. atiaran

    Date into SQL from MySQL via linked server

    Hi SQLDenis Maybe I did not explain correctly. I've got a MySQL database. We've created a linked server to that MySQL database and used a store procedure to get the data from that MySQL database into the SQL. In the store procedure I had to specify which tables I wanted to import. But...
  10. atiaran

    Date into SQL from MySQL via linked server

    Hi SQLDenis But SELECT table_name FROM INFORMATION_SCHEMA.TABLES [WHERE table_schema = 'db_name'] would just show all the tables that have been taken across from MySQL to SQL via the linked server. What happens is, I suspect that there are more tables in the MySQL database that should be...
  11. atiaran

    Date into SQL from MySQL via linked server

    Hi chaps It's kind of following from the question before but slightly in a different direction. How can you check what are the tables names in the MySQL database when you use linked server to get the data from MySQL across to SQL. Thanks a lot for your help Nina
  12. atiaran

    Date into SQL from MySQL via linked server

    Thank you very much everybody, I've got it now. A big appreciation to all of you. :-)
  13. atiaran

    Date into SQL from MySQL via linked server

    I am absolutely sure about the values. Thanks r937 and thanks SQLBill for the suggestion. I would do that. Atia
  14. atiaran

    Date into SQL from MySQL via linked server

    Thank for replying r937. The thing is, I am doing everything already in SQL rather than in MySQL, so can the FROM_UNIXTIME function still be used when say creating views I dont seem to find any syntax of it at all when used against a table taken into SQL. Cheers Atia

Part and Inventory Search

Back
Top