|
Yep - good point
|
|
|
|
|
instead of separate where condition use the condition in join statement only
select c.* ,t.name from tempdb.sys.columns c
INNER JOIN tempdb.sys.tables t
on (c.object_id = t.object_id
and t.name = '#tmp_table');
|
|
|
|
|
Same problem will apply for the same reason I gave earlier - the table name does not equal '#tmp_table' so for this suggestion to work the ON clause will need to have
and t.name LIKE '#tmp_table%'
or
and t.object_id = OBJECT_ID('tempdb..#tmp_table') (Credit to @Richard Deeming)
|
|
|
|
|
Try filtering by object_id :
select c.* ,t.name from tempdb.sys.columns c
INNER JOIN tempdb.sys.tables t
on c.object_id = t.object_id
where t.object_id = OBJECT_ID('tempdb..#tmp_table')
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I learn something most days, got my 5!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks .. It's working fine..
|
|
|
|
|
HI,
EveryBody
I am getting the following error when trying to do a contains search on an indexed table:
Msg 30046, Level 16, State 1, Procedure sp_fulltext_service, Line 163
SQL Server encountered error 0x80070218 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running. To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.
when i run the sp_fulltext_service 'restart_all_fdhosts' command, i get the same error as shown above.
|
|
|
|
|
Did you restart the SQL Server instance?
|
|
|
|
|
You're still getting this error four years after you first posted it?
I am getting the following error when trying to do a contains search on an indexed table:
Msg 30046, Level 16, State 1, Procedure sp_fulltext_service, Line 163
SQL Server encountered error 0x80070218 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running. To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.
select * from table1 where contains (MyText, 'fire')
i checked to see and my index service is running, it is also using "Local Account" to run (same as the SQL Server Agent)
when i run the sp_fulltext_service 'restart_all_fdhosts' command, i get the same error as shown above.
Edited by - xrum on 09/15/2011 09:52:27
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
sniff sniff ... methinks there is the odour of urine extraction around here somewhere. He's had me for a sucker
|
|
|
|
|
Wow did you remember this from the first time he asked? Elephant something (in the original use of the word)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No, my memory's not that good!
It just came up on a Google search for the error message.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi i want to convert msaccess pivot query to mssql server 2005 pivot query can anybody help me?
TRANSFORM Sum([Kartella1-meion].[m]) AS ΆθροισμαΤουm
SELECT [Kartella1-meion].[PEL_PRO_CODE], Sum([Kartella1-meion].[m]) AS meion
FROM [Kartella1-meion]
GROUP BY [Kartella1-meion].[PEL_PRO_CODE]
PIVOT Format([HME_PAR],"mmm") In ("Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ");
|
|
|
|
|
|
Thanks for the answer .
Issue resolved.
|
|
|
|
|
|
I am writing a utility to copy tables from one DB to another. This can be from MySQL, MS SQL Server, MS Access DB, or SQLite DB to another DB of one of the above types. The program handles any of the above combinations. For example, the user can choose to copy a table from MySQL server to an MS Access database. I am using ADO.NET to write this app.
Currently I create a DataReader using the query "Select * from ", and then call its GetSchemaTable() method to obtain the field info of the source table. This method returns a DataTable that contains each field's basic info such as field name, type, size, whether or not it is a key, etc. These allow me to do the data type match and create the fields in the target DB.
My question is how to obtain the source table's index info. The above DataTable object seems not sufficient for this purpose. Can you give me a pointer as to how this can be done? Thanks!
|
|
|
|
|
There's no unified API for that. You will have to implement it for each of those database systems individually. For SQL-Server you could either query the INFORMATION_SCHEMA or use SQL Server Management Objects (SMO). For MS Access there are also queryable schema-tables (MSys_xxx). No idea regarding the other database systems though, would have to ask Google.
|
|
|
|
|
Hi,
I have employee_benefits MySQL table with the following fields:
employee_benefit_id --- autonumber
employee_id
benefit_category
benefit_description
benefit_amount
I want to loop through all records in the above table and insert the values into salary_slips table which has the following fields:
salary_slip_id --- autonumber
document_id ---- forget this it's just UUID
employee_id -- from employee_id in employee_benefits
slip_month -- from SP variable param_slip_month
slip_year -- from SP variable param_slip_year
and then I want to insert data into salary_slips_details:
salary_slip_details_id --- autonumber
salary_slip_id -- the id from salary_slips table
slip_details_description -- benefit_description from employee_benefits table
slip_details_amount -- benefit_amount from employee_benefits table
How can I do this complicated query please?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
I can not create database when using Database Configuration Assistant (Oracle 12.1.0).
IMAGE ERROR DESCRIPTION
Help me! Please..
|
|
|
|
|
Do you have McAffee virus on you computer? Deactivate it!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
|
..and what does the log message say?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
sorry, where i can find log error file in oracle 12c?
|
|
|
|
|
Try the one mentioned in the error.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|