I have a somewhat complex select, which is supposed to return appointments that need notified bewteen today and the appointment date. Sounds simple, but, the appointments have a notification d...
i have a table with students details in it, i want to select all the students who joined a class on a particular day and then i need another query to select all students who joined classes ove...
Hi Experts,
How can we convert a variable @presentdate to varchar?
Declare @presentday as datetime
select @PresentDay = convert( datetime, convert( varchar(10), getdate(), 101 ))
selec...
Hi.
I have a large number of databases on my MS SQL server.
There are files .MDF and .LDF files. From what I can tell (and I may well be VERY wrong here), the MDF file is the REAL data. ...
Hi,
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
This error happen when I tried to insert a value too long i...
Hi,
Anytime I start the PC the following message appears: "SQLWriter SQLDUMPER library failed initialization. Your installation is either corrupt or has been tampered with. Please uninstall t...
How do I list all the tables in a database?
I'd like to cycle through all the tables in a database and push the contents into an ado.net dataset for export to an XML file.
This would be fo...
Hello,
In SQL-Server, I'm trying to find the equivalent of the following SQL statement:
"CREATE TABLE employees AS SELECT * FROM all_emp"
I know you can do this with to create a...
Can someone give me the syntax to add a default value to a column?
Somehow it doesn't want this
ALTER TABLE BOM ALTER COLUMN MFD DEFAULT 0 )
table is BOM, column is MFD (bit field) a...
ALTER TABLE dbo.TCONTACT_TEST ADD
LVL_SYS_NR INT AFTER ACC_NR_TE,
CNT_FAX_NR_TE VARCHAR(15)AFTER CNT_PHN_EXT_TE
----This brings up an error on the word AFTER
I have read every possible article but cannot setup a new instance of SQL Server 2005
I have XP SP2
SQL Server 2005 Enterprise Edition
and i dont know how.
Please help
Hi,
We are developing a report in MS-Word through VB application. Our database is SQL Server 2000. We are getting the following error while generating the report:-Error Number -2147467259,...
When I run an online report sometimes I get the following error pointing to my ASP page
How can I stop this from happening....This happens when the user requests lots of data.
Is there any w...
Here is my statement:
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = SIM20050214) DROP TABLE SIM20050214
Here is the error:
Server: Msg 207, Level 16, State...
I am attempting to create a stored procedure that, in part, places into a temp table the results from another stored procedure. Ideally I'd do something like:
Insert into #Temp
EXEC MyDatab...
I have table with some columns and want to copy it's strcture in a new table inorder to add some more columns to that table in sqlserver.
how do i copy it structure to the other table.
creat...
In SQL we can do the following
insert into Test(va1, va2, va3)
select va1, va2, va3
from Other
where ......
How do I do the same thing like above but in format of update-select ?
Hi All,
I am taking a chance on this.I am using SQL Server 2005 with t-sql syntax.
Now this is a bit of a guess that this would work as the other ways didnt:
I have 2 databases.
I am ...
T-SQL, SQL 2005, VS 2005, ASP.NET, C#, Windows XP Pro
How can I trim outside spaces and blank lines from a TEXT field? I have a function that parses out each line of a TEXT Field into separa...
I have an Excel Source component hooked to an OLE DB Destination component in my SSIS 2005 Data Flow Task. After I mapped the excel columns to the OLE DB table columns i get these errors belo...
Hello,
The following snippet is from a sp that I am trying to get working:
DECLARE @TSql nvarchar(200)
SET @TSql = 'SELECT TOP 1 * INTO #Store_OrderDetailsTemp FROM Store_OrderDetails W...
I keep getting this "warning" when I run certain scripts:
Warning: Null value is eliminated by an aggregate or other SET operation.
It's not a "fatal" error, so the script still runs,...
I have a SQL Server 2005 Express installed on my Intranet server that resides in my DMZ.
I have access from my LAN to my DMZ open.
I have the SQL Server configured to allow remote connec...
Hey, I was wondering if there was a way in MS SQL (2000 specifically) to cast out a character, like in FoxPro
For example, in fox pro you could have
SubStr(alltrim(field), 1, at('$', al...
I have a table with the following columns
ACCOUNTID CATEGORYID
1001 10
1002 10
1003 10
1004 10
..... ...