• DATEDIFF – 1 year off

    I need to figure out age from a birthday. When I use the DATEDIFF function for year, the number of years is one year ahead if the birthday hasn't passed yet for this year. How can I get the accurate age based on the day and month of the birthday.

    Bananahead60 pointsBadges:
  • Drop Database Connections

    Hi,How can I drop all connections of a database through TSQL commands.(NOT SMO)

    Javad5 pointsBadges:
  • How can I correct sCaller errors in T-SQL?

    How can I correct generic sCaller errors in T-SQL?

    SQL Server Ask the Experts2,585 pointsBadges:
  • What is the difference between SQL and T-SQL?

    What is the difference between SQL and T-SQL?

    SQL Server Ask the Experts2,585 pointsBadges:
  • 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:
  • help on Bulk insert and xp_cmdshell rename

    Hi, I have a csv with only one field with multiple rows, when i am using bulk insert to insert into sql server table, all the rows are inserted in to single column instead of multiple rows.I dont have a delimiter. csv file: (First row is blank) apple bat cat doll when i used the below command BULK...

    GIG240 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:

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