I have a Date Field that returns the date and time. I only want the date. Is there a way to lop off the time???
Thanks
- Marc
I'm trying to write my first ever stored procedure and I get an invalid obect name 'dbo.spRPT.rptSLR_Imprt_LC' when I try to run it. I have pasted my stored procedure below. What am I missin...
I have a single table T with three fields F1, F2, and F3. I want to group by F1, sort by F2, and select the first occurence of F1, F2, and F3. So if my table looks like:
F1 F2 F3
01 01 A
...
We get these periodically on servers distributed across our environments. In particular, this pertains specifically to some SQL 2000 servers that are in a different subnet then my DC's. Look...
Hi EE,
I have the following query in sql although Im not confident with multiple inner joins.
Can you please help with why this fails.
As you can see I have five tables in the query, outl...
Hi,
I have a DATETIME field:
SELECT DATEFIELD
FROM TABLE1
DATEFIELD has fields like: 11/11/2004 10:20:32 PM
How would I remove the date part (11/11/2004) and keep only the time, bu...
Hi experts
My SQL query :
SQL = SQL & " AND ((cint(ShipOther1) <= " & ProdWeight & " AND " & ProdWeight & " <= cint(ShipOther2)) "
SQL = SQL & " OR (ShipCost1 <= " & ProdWeig...
I run this:
SELECT count(open_time)as Count,DATENAME(mm, open_time)AS Month
FROM probsummarym1
WHERE (datediff (mm, getdate ( ) ,Open_Time) > -4)
GROUP BY DATENAME(mm, open_ti...
Can somebody help me with this error :
//===STORED PROCEDURE CODE START
CREATE PROCEDURE web_ApplyCallCharges_Intl
@Month_Table varchar(50),
@Call_Zone varchar(5),
@Call_Type varchar(...
Hi,
I hope someone out there can shed some light on what is going on here.
We have a Java application which is running for 24 hours and we have implemented our own connection pooling. ...
I have a table with many columns, and here are the relevant ones:
group_id
user_name
task_id
task_type
action_dt_tm
caller_id
...
Each user will perform many tasks in a day. What I...
Hi!
I'm using the SQL BETWEEN-operator in one of my queries and I was wondering something.
I have a thick SQL manual and I use an online manual which is quite extensive, both say that the ...
How can I use a GROUP_CONCAT function in ms sql. is there any alternative to this? I have a table likethis
Name---------------------------Favorite Color ID
Jim---------------------------...
Hi, I'm getting the foloowing error:
"The database owner SID recorded in the master database differs from the database owner SID recorded in database 'mydatabase'. You should correct this si...
Hi,
How can I convert hours into minutes eg, 02:35:00 = 155:00
When running a query after attaching a database, I get the following error:
The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space....
The problem described occurs under SQL Server 2005. This problem did not exist using SQL Server 2000.
My production environment has two computers, each of which is running an instance of SQ...
I have a file that gets exported from an Excel spreadsheet. The time in the spreadsheet is saved in 24 hour format as a number in Excel (ex: 0900 or 1530). When import SQL simply sees these ...
Does anyone know a simpler way to get a YYYYMMDD format using a SQL Server date? I've done the following, but I'd rather have something cleaner:
select left(convert(varchar,benefitStartDate...
Hello, have the below code in a stored procedure (Visual Studio 2008/MSSQL 2005), that is tied to a GridView control. It currently returns/shows a column of regional office names ('ro' field)...
I'm in the middle of what's becoming a rather heated discussion with a client. The thiong is that I developed a Reporting Services report against three joined views/tables, and it worked grea...
Hello all,
my database's LDF file has grown to 22 Gigs. I would like to delete it permanently.
How can I perform this action?
Then I would like to set it a 1 Gig max size.
Any help w...
I'm considering replacing a Sqlite3 database with MS SQL, but I want to make sure I'm not going to have problems with converting some of the non standard SQL commands.
In Sqlite3, you can i...
I created a Mait Plan to back up all DB's except systems and 60 DB's back up fine execept this one. It gives me an error all the time. I was hopping that someone can give me some insite as to ...
Hi,
Does anyone know a way to replace '' (blank) with NULL in the select statement without using a case statement?
i.e.
convert this to a select statement using replace, stuff, or?
S...