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 + ', ' +...
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...
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...
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
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.