I have the following stored proc (see below) which works very well to save a big chunk of text to a text file. How can this be modified to accept one line at a time and append the text to my ...
Client just had a lock up on Friday and unable to start MSSQL service due to what appeared is a copurpt Master database. When through the steps to recover and restore the master database. SQL ...
I have manually changed the service account for SQL Server Agent Service, SQL Server integration services, ful text indexing service from the local system account to a domain user account. The...
I'm creating a pair of temp tables to eventually use in a stored procedure that outputs a single recordset. The code at the end of my post is from the first of those two temp tables. I began ...
Where can I find an entire list of the trappable SQL error codes? I don't have easy access to the Books Online (the errors are listed in Books Online). I need to traverse through the list to...
I have a select statment where I am using case to determine whether to return detailed information about a person or just a full name depending on the customer type. I want to return multiple ...
how to use SELECT CASE in sql query?please give an example
also how to use IIF in sql query?please give an example
Hi Experts,
Does anyone know what determines the date time field format in a MS SQL database field?
Is it based on your local pc's regional settings or does MS SQL forced down its own form...
Lets say that I wrote this query:
SELECT * FROM t_client.dbo.members
And then deployed it as part of an application that cannot be modified. Then we found out that the database name rea...
How can I obtain the IP address for the SQL server installed on my network? How is the IP address defined for SQL Server? Was this part of the set up or do you have to assign after set up.
...
I need a store procedure to batch update some data.
Here is what I am trying to do:
CREATE PROCEDURE prUpdateForecast
AS
DECLARE @project_id varchar(50), @employee_id varchar(50), @inp...
Okay so If I do...
SELECT * from orders
the 'OrderDate' column is formatted like '2007-03-28 16:29:35.000'
but if I do
SELECT * from Orders where OrderDate = '2007-03-28' then not...
Hi,
I'd like to to increase the size of the 2 columns EQ_ID and EQ_STD on my DB SQL Server 2005.
EQ_ID char(50)
EQ_STD char (50)
How can I create a script to change the size of this column...
I have the following SQL statements created using MS Access, both look at the same table.
The first groups the data by customer/job/inv and totals invoices & payments to test for a zero bal...
Hi,
I have used MySQL for a long time in the WAMP setup but am unsure how I go about getting the WAMP setup with MSSQL.
This is probably an easy solution but a simple step through guide ...
I'm trying to use this SQL statement:
SELECT TTAXYR, TRECTN, TMAPN, TMAPA, TPARCL, TPICOD, TSPCIN, TNAME1, TNAME2, TSTADR, TTXAMT, TTXBAL, TGROUP, TTXPAD, TTXPEN, TTPPAD,
...
Hi,
Please kindly help resolve this error message.
Thanks.
Server: Msg 257, Level 16, State 3, Procedure user_master_verify, Line 6
Implicit conversion from data type varchar to varb...
Here's what I'm trying to do for a column in a SQL View:
If Value 2 is null, then:
(dbo.Table1.Value1) + ', ' + (dbo.Table1.Value3) + ' ' + (dbo.[Table3].Value4 + '.')
Otherwise:
(dbo....
Example:
col1 col2 col3 col4 col5 col6
1 0 0 3 0 2
1 1 2 0 0 2
1 2 2 4 3 1
I want to be able to create a column that takes the highest value amonst all these fields on their respective ...
I have a field in my sql server database that stores a date as example:2008-04-26 15:00:21
I would like to extract only the time from this field ias hh:mm am/pm.
I am currently using the fol...
I made a Conversion Program in vb6 (access to sql) with SQL having no Identitys in the table So i can preserve the RowID and then hoping after the converision to alter the column to put the ...
I'm running clustered SQL 2000 SP3 with Jet 4.0 SP8 and ADO 2.8
Within a stored procedure that is scheduled through SQL Agent to run several times per day, the following query runs:
sele...
Hi Gurus
I used MSDE and SQL Server 2000 Enterprise manager to run local tests on my web applications before I upload to the production server. My new machine (HP Laptop) won't install Enterp...
Hello,
when i run this stored procedure i get an error message saying :
"Server: Msg 203, Level 16, State 2, Procedure spUPLOADOUTOFSTOCKS, Line 27
The name 'INSERT INTO DBO.OOS_UPLOAD (SIT...
I have a field of type bit, and it is storing true/false values. I want to run a query against this table and convert this true/false to a "Yes"/"" string.
In Access I could use this: "IIf...