...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 + ', ' + givenName AS FULL_NAME
FROM OPENQUERY(ADSI,
'SELECT title, sAMAccountName, givenName, telephoneNumber, facsimileTelephoneNumber, sn...
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...
...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, '1969-12-31')))) As VarChar(16))
+ ':' +
Cast((DatePart(minute, (Select...
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 /...
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
...
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)
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'.
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...
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...
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
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
It came from a MySQL database and I havent got a clue how I'm gonna convert it so that it is acceptable by SQL. Any help would be very much appreciated.
Atia
Hi kittyyo
Thanks for replying. I actually did not put any code to create the linked server. I did it within the Enterprise Manager (Right Click on Linked Servers under Security)
Atia
Hi chaps
I created a linked server within sql2000 to access data from a MySQL database. When the dates came across, they have a format of 13 digits that I cannot find anywhere on how to read it or how to convert it.
Please can somebody help I am a bit desperate as I've looked everywhere...
Thanks Artie
Sorry, I was not explaining myself clearly.
I've got this database, unix based, which can be accessed via odbc.
I need to do reporting on it, and the only way is, to use odbc and look at the data somewhere else outside the db (for example using sql db).
My way of accessing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.