Hello.
Using the solutions found on EE, I've created a stored proc that takes each row of a fixed width text file and bulk inserts it as a single string in a row in a temp table. The proc the...
Just quickie,
I need to return a string value based on data from a column.
For example, if data from a column contains "0" I need to return the string "Z", if it doesn't I need to return "...
Curious how to accomplish/correct syntax for the following in T-SQL...
Database Name: TestDB
Existing table name: MyTable
Existing Column Names: ID, NameFirst, NameLast, MyDate
Want to...
not familiar with sql server stored procedures. i am only knowledgable in oracle and informix.
i need to know if it is possible to return a loaded resultset from a sql server stored procedu...
I want to convert integer into date format.
Example :
Database 1 : import_date(field)(value is in format ddmmyyyy - e.g 10012003)
Datebase 2 : importdate(field) Format is datetime
I ...
hi experts, I created a script on sql server 2005 to make my database to sql server 2000, so i got the script and i run it, anyway, now i have the database to sql 2000, than i try to attach on...
Hi,
Sorry, I'm a DB newbie and this probably has a simple answer, but given that it's the week after Christmas there's no one anywhere to be found around here and the MSSQL docs aren't muc...
Hi Experts
I have a SP that creates a varchar(200) string that creates from a table entry such as (A+(0.75*B)) a string such as (0.093000000000+(0.75*0.004087939911))
I now need to evalu...
i need to truncate this log file, 8Gb
documentation says i have to back it up and select the truncate on checkpoint option.
only thing is, from the server manager, when i do the backup, the...
Hi,
I've wrote a search module for SQL Server 2000 a while back and it produces queries like:-
SELECT tblSection.SectionShortDesc as SectionShortDesc, tblPage.PageID, tblPage.PageName, t...
I need an SQL (SQL Server 2005) script that can drop one or more columns in a table if they exist. Below is the script I have in place that is not working.
if exists ( select * from INFORM...
In an sp i'm writing, I need to convert an integer value to a string. I usually do this with the cast() function. But this time, I need to left pad the string with zeros. So how do I do this?
...
I have a file located at c:\mydb.7.7.2006.bak. I need to restore it to a location on my local computer running win xp with sql express.
Here is what I have done:
restore filelistonly
...
When I issue this statement i get the following error
ALTER TABLE "Archived Greyhounds"
ALTER COLUMN "Whelp Date" DATETIME
GO
Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic ov...
Hi guys
Has anyone found a method in sqlserver 2000 to 'aggregate' strings in a Group By query. Like using 'Sum' for numerics...
e.g. table values:
cGroup cText
A L
A ...
To create a new instance I would normally reinstall SQL 2005 and create a new instance but this does not work. I have installed SP2 and currently have one instance with SQL 2005
When I use...
Why doesn' t the following work in the scalar valued function? I keep getting an error:
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value '10/16/' to ...
I have an existing stored procedure that returns a set with a single field in it.
My question is, in T-SQL what is the syntax for getting the value of this field in to a variable?
DECLAR...
Greetings!
I've written a stored procedure which pulls data and dumps it into a temp table...however, I'm trying to figure out if its possible to send the data (hundreds of rows) to a text ...
Is it possible to have a join in a delete query. Lets say i have a select statement that looks like this, is it possible to delete from the tblTemp table using a similar join, at the moment i...
What is the difference between the nvarchar and varchar datatypes? Which should be used? Also, what is the proper way to pronounce them?! :P
Thanks,
br
I am using Microsoft SQL Server 2000, now the log file size (.ldf) increase quickly up 50GB and the hard disk size can not handle anymore. I tried to backup the log file into a partition size ...
I want to convert some ntext fields in a table to varchar, keeping the same column name and data. Is there a way to do this in sql?
Thanks, Tom.
Is there such thing as a foreach statement in TSQL? or is a cursor the only option here?
I want to itterate through a small result set and it would be nice to have something more susinct th...
This is a easy one (Can't for the life of me figure it out)
I want to convert a number to a string by rounding to one decimal place and and then appending a '%' to it, so for example 17.547...