• Searching for a T-SQL query to find data from multiple SQL 2005 servers

    I need a T-SQL query to find a list of all database names and sizes from multiple SQL 2005 servers that are connected in a local network. Does one exist?

    SQL Server Ask the Experts2,585 pointsBadges:
  • SQL Cursor to use or not to use

    Hi, I've been told to never use cursor in SQL, because of possibility of memory leak, etc. But I have no idea of how to implement my script without them. My script doesn't execute anything on the database, it simply use cursor to create another TSQL script that does the execution. EG. open cursor...

    Db23290 pointsBadges:
  • issue sp_helprotect

    if i give sp_helprotect on one table. it shows the list of access few tables permissions including given table. can i know why it is happens

    Sqlhnd30 pointsBadges:
  • Error in SQL Server 2005 with passing a variable

    In T-SQL code on SQL Server 2005, the variable :t_id is being passed from other pages and works in other statements, but it is not parsing within this statement: define("TF_T_INFO_INSERET", " insert into TFT (WG_ID,task_id,tf_id) SELECT (select WGID from LU_T where TID= :t_id ), :t_id , (select...

    SQL Server Ask the Experts2,585 pointsBadges:
  • How to enable a trace for SQL Server Analysis Services using T-SQL?

    Hi I want to enable a trace on analysis services Filter only the errors and notifications log them in a table and send a mail. I am right now doing using sql profiler, but i dont want to do this using profiler as i have to log on the server continuously. I need to do this in T-sql like an SP or a...

    GIG240 pointsBadges:
  • How to generate a column name in a table dynamically

    hi, I have to generate dynamic columns for a temp table. I have a temp table with column a, the column b should be generated based on a condition. B conditions are if value> 10 i have to genrate the column as 10 and if the value >20 the column name should be 20 etc....n values.... If i select...

    GIG240 pointsBadges:
  • T-SQL Query- how to explode XML fragment stored as NText into table?

    I'm using a commercial storefront software that offers "extension data" fields as NText to store custom data. I am storing an xml fragment that looks like this: <priceSplit xmlns="http://tempuri.org/priceSplit.xsd"> <split> <type>Credit Processing Fee</type>...

    Lambrite5 pointsBadges:
  • CASE sintaxis error in SELECT

    In the middle of a large storage procedure I have a working SELECT 01 (see below) which at a couple of points uses CASE statement. I need to expand the most inner CASE to get SQL Server check for several values instead of one. Currently CASE I am talking about looks like (it is in the middle of...

    Jzurbo775 pointsBadges:
  • Concatenate Two Fields t-sql

    I need to concatenate two fields one varchar(50) and the other varchar(12) The result I need is to see the full 50 characters of the first field even though all 50 may not be filled. Thanks

    Jp52825 pointsBadges:
  • Problem converting Access SQL query to T-SQL 2005

    I have a SQL Server 2005 database. One of my co-workers has put a MS Access front-end on it, because of the ease of designing queries in Access. I need to convert an existing query from Access SQL to T-SQL to put it into production. So far, I have removed all the obvious differences between the 2,...

    Chunkydrew15 pointsBadges:
  • help with t-sql recursion

    I have a table CREATE TABLE [dbo].[chart_hiera2](

    Ilay5 pointsBadges:
  • Using Case Statement Inside SQL Join

    Hi, I am trying to convert dynamic sql into static sql due to permission issue, I faced a challange when i am trying to convert this part of code given below -- join to ADDR_DETAIL SET @join_sql = 'inner join ADDR_DETAIL on ADDR_DETAIL.GRP_CONTACT_ID = pm.GRP_CONTACT_ID AND ' IF (@ChannelEntity =...

    Bmdayal5 pointsBadges:
  • Passing a database name as a stored procedure parameter

    I would like to be able to pass the name of a database as a parameter to a stored procedure. This db would be used for certain queries and may be different from the db where the stored procedure runs. Is it possible to specify a database name from within the T-SQL of the stored procedure? If so,...

    SQL Server Ask the Experts2,585 pointsBadges:
  • view and temp. table which one works better in T-SQL?

    please tell me which one performs better view or temp table ?

    HL5 pointsBadges:
  • SQL Server Connection

    I'm having a problem with one of my workstation which cannot connect to SQL server instance, while the other workstation can connect. The server is running on Window Server 2003 while the other client are running on window xp proffessinal. the fanny thing is i can ping the server but the...

    Gmmurage5 pointsBadges:
  • SQL Command

    I have created a stored procedure in SQL2000 like this : SELECT p.PO_code,p.Po_date, p.Supp_code + ' : '+ s.Sname as Supp_Nme,p.po_total,r.RC_code,r.Amount FROM PO_list p inner join RC_list r on r.PO_code = p.PO_code inner join Supplier s on s.supp_code = p.supp_code WHERE (p.Supp_code in...

    283036050 pointsBadges:
  • case when issue

    I recently came across behavior of a "case when" conditional expression that really confuses me. In this case: -- CASE when isnumeric('-10.00%') > 0 then convert(numeric, '-10.00%') end ---- the behavior is as I expected - the isnumeric() function returns 0 (cuz it ain't no number) so the "then"...

    Zhoover5 pointsBadges:
  • Using Local Variable as FILENAME in CREATE DATABASE Statement

    I am trying to use this statement in SQL Server 2000 :- CREATE DATABASE [Maintenance] ON (NAME = N'Maintenance', FILENAME = @TableName , SIZE = 2, FILEGROWTH = 10%) LOG ON (NAME = N'Maintenance_log', FILENAME = @LogFileName , SIZE = 1, FILEGROWTH = 10%) COLLATE Latin1_General_CI_AS GO The...

    TheHutt0 pointsBadges:
  • Sending Table Data From Oracle 9i To Sql Server 2005 using oracle 9i Trigger

    My aim is to send the data from oracle to sql server 2005 whenever there is data insertion, deletion or updation in the oracle table the same change needs to happen in the sql server having the same table structure as oracle.But I am not finding any way to accomplish this task.please help me. Have...

    Dhirendra100 pointsBadges:
  • Problem finding a column name.

    The following SQL is giving me the message: Server: Msg 207, Level 16, State 3, Line 1 Invalid column name 'ProductCode'. How can I correct this code. The column name does exist in the table. I also want to group by Product Code and not by Container Name. Thank you. SELECT a.ProductCode AS "Product...

    Captnskirk0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following