• Automate TSQL Query Output

    I want to have a stored procedure run on a schedule that automatically creates a database output file as a result and saves it to a specific location on my network. Can someone please tell me how to do this?

    Eabouzeid175 pointsBadges:
  • Convert Oracle code to Microsoft SQL code

    I've been given an Oracle DB that has some triggers and "LOAD DATA" jobs. Is there a tool/utility to convert the triggers/loads from PL/SQL into T-SQL?

    VelameLaCosa110 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 don't have a delimiter. csv file: (First row is blank) apple bat cat doll when I used the below command:...

    GIG240 pointsBadges:
  • How do I subtract 3 days from current date only when current day = 2, so that I retrieve the previous Fridays date?

    I am new to using T-SQL, so there is probably an easy way to accomplish this, but I can't seem to get it right.  I want to retrieve the previous day's date (requires a weekday) to use as a comparsioin to a date field in the table, format is YYYYMMDD.  When the current date is a Monday, I need to...

    Kathyb6245 pointsBadges:
  • How to split a column into SQL data..

    I have table called  country having one column called complete_name (varchar(max)) which is as under   [table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0"> [tbody] [tr] [td style="border: medium none #d4d0c8; padding: 0in 5.4pt; background-color: transparent;...

    Anamika8315 pointsBadges:
  • Checking the version of SQL Server for a database using T-SQL

    Is there a way for me check what version of SQL Server I'm using for a database through T-SQL? Would there be some sort of stored procedure I can use? Thanks.

    ITKE351,865 pointsBadges:
  • How to write csv output files one per temp table in one query

    In one query I build four temp tables then I want to write the data from each temp table to its own filename. Is this possible?

    josephcampise335 pointsBadges:
  • I need help creating a delimitted string in DB2

    Over the past few days, I've been trying to create a delimited string from the results of a query in DB2 on iSeries. I was able to do it in T-SQL but am struggling here.Here's the code I used in T-SQL. I'm basically looking for the equivalent in DB2.DECLARE @a VARCHAR(1000) SELECT @a = COALESCE(@a...

    ITKE351,865 pointsBadges:
  • how can make this SQL Server query faster

    All, how can I make this query faster? Here is my code of stored procedure: ALTER procedure [dbo].[GetLMPReport] ( @typeId tinyint, @dataType varchar(2), @date date ) AS begin select distinct p.name, ISNULL (td24.price, 0) as '00', ISNULL (td1.price, 0) as '100', ISNULL (td2.price, 0) as '200',...

    Singhal120 pointsBadges:
  • SQL Server 2000/2005 – Creating Unique Constraints allowing multiple NULLs

    Hi there! I'm having a problem maintaining data integrity on a database table in MS SQL-Server 2000. To ensure maintaining the integrity I need to implement a Unique Constraint on one of my coloumns. The problem however is, that this coloumn also has to allow multiple NULL-values - but for every...

    LeChuck0 pointsBadges:
  • Did the Database Designer change for Visual Studio 2012?

    I've recently installed Visual Studio and SQL Server 2012 onto my machine. I've noticed the Database Designer isn't as 'friendly' as the old version. Here are some of the changes I've noticed:It creates .SQL scripts instead of automatically saving my changes.I have to update different things in...

    ITKE351,865 pointsBadges:
  • T-SQL: Split function

    I'm trying to split "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" into a table or table variable. Is there a function that returns each number in a row?

    ITKE351,865 pointsBadges:
  • Difference between SQL Server 7 & SQL Server 2000

    Hi, Can you tell me difference between SQL Server 7 and SQL Server 2000?

    Marshal0 pointsBadges:
  • SQL and T-SQL

    If you are used to programming in SQL, will there be any issues with switching to T-SQL?

    lprice230615 pointsBadges:
  • Count distinct rows on multiple columns

    I want to write a single query that counts each distinct Student ID from the following sample data. Sample Data: ID NAME PLAN DESCR --- ------- ---- ------------------- 101 Michael 010C Cafe- 10.00 Dollars 102 Adam 010C Cafe- 10.00 Dollars 102 Adam 05CC Cafe- 5.00 Dollars 103 Jane 010C Cafe- 10.00...

    Mjackson0 pointsBadges:
  • Referencing a calculated column in a SQL clause

    This is our SQL code: Select addrid,addrkey,addrline1,addrline2,addrline3,addrcity,addrplace,addrzipcod,addrtype,addrphone,jobsconame,addrmc1, CASE month(getdate()) WHEN 1 THEN addrjan WHEN 2 THEN addrfeb WHEN 3 THEN addrmar WHEN 4 THEN addrapr WHEN 5 THEN addrmay WHEN 6 THEN addrjun WHEN 7 THEN...

    SQL Server Ask the Experts2,585 pointsBadges:
  • SQL or T-SQL

    This question related to this thread: http://itknowledgeexchange.techtarget.com/itanswers/difference-between-sql-and-t-sqlmicrosoft-sql-server-2000/ So if I want to study SQL server, should I first study SQL and then T-SQL or just dive right in to T-SQL.

    BJ20125 pointsBadges:
  • How to add two timings in SQL Server 2008

    DECLARE @TIME1 VARCHAR(10),@DURATION VARCHAR(10) SET @TIME1='10:00' SET @DURATION='00:25' SELECT CONVERT(TIME(0),@TIME1)+CONVERT(TIME(0),@DURATION) I need to add two timings ...suppose if the @time1 is '10:00' and the duration is '15' mns then it should show 10:15 ... Any help highly...

    Muralihan5 pointsBadges:
  • Ageing Report T-SQL

    Im trying to write a query to retrive debtors ageing report in sql I have two tables [strong]1. Billing(billAmount,BillDate,AccountNo)[/strong] [strong]2.Payments(payAmount,payDate,AccountNo)[/strong] I need the output to show ageigng [strong]0-30, 31-60, 61-90, 91+[/strong] with the balances for...

    Sanisto45 pointsBadges:
  • t-sql and AS400

    I want to develop a TSQL query. First I need to determine if all the numbers in one of the fields are in numerical order and also find the missing holes in the number sequence. Secondly I need to sort by another field and by a particular criteria.  The words that I need to sort-by would be...

    CompEng1,230 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