Missing Operand After Like , SQL Help Please
Apr 7, 2008
Hi guys
need some help, someone has given me some code to help me filter a gridview by the surname field by the selected letter of a dropdown list.
My code is below, however if i select a letter from the dropdown and click the button i get an error, can someone take a look please.
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dset As New Data.DataSet
Dim dview As New Data.DataView
dview.Table = dset.Tables("modelRegistration1")
dview.RowFilter = "surname LIKE" + surnameFilter.SelectedValue.ToString() + " % "
GridView1.DataSource = dview
GridView1.DataBind()
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td style="width: 100px">
Surname Filter:</td>
<td style="width: 100px">
<asp:DropDownList ID="surnameFilter" runat="server" AppendDataBoundItems="True">
<asp:ListItem> - Please Select -</asp:ListItem>
<asp:ListItem Value="A">A</asp:ListItem>
<asp:ListItem Value="B">B</asp:ListItem>
<asp:ListItem Value="C">C</asp:ListItem>
<asp:ListItem Value="D">D</asp:ListItem>
<asp:ListItem Value="E">E</asp:ListItem>
<asp:ListItem Value="F">F</asp:ListItem>
<asp:ListItem Value="G">G</asp:ListItem>
<asp:ListItem Value="H">H</asp:ListItem>
<asp:ListItem Value="I">I</asp:ListItem>
<asp:ListItem Value="J">J</asp:ListItem>
<asp:ListItem Value="K">K</asp:ListItem>
<asp:ListItem Value="L">L</asp:ListItem>
<asp:ListItem Value="M">M</asp:ListItem>
<asp:ListItem Value="N">N</asp:ListItem>
<asp:ListItem Value="O">O</asp:ListItem>
<asp:ListItem Value="P">P</asp:ListItem>
<asp:ListItem Value="Q">Q</asp:ListItem>
<asp:ListItem Value="R">R</asp:ListItem>
<asp:ListItem Value="S">S</asp:ListItem>
<asp:ListItem Value="T">T</asp:ListItem>
<asp:ListItem Value="U">U</asp:ListItem>
<asp:ListItem Value="V">V</asp:ListItem>
<asp:ListItem Value="W">W</asp:ListItem>
<asp:ListItem Value="X">X</asp:ListItem>
<asp:ListItem Value="Y">Y</asp:ListItem>
<asp:ListItem Value="Z">Z</asp:ListItem>
</asp:DropDownList></td>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" Text="Filter:" OnClick="Button1_Click" /></td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
</table>
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="getModel" AllowPaging="True" EmptyDataText="N/A" PageSize="15">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:BoundField DataField="applicationDate" HeaderText="Sign Up Date" SortExpression="applicationDate" />
<asp:BoundField DataField="firstName" HeaderText="First Name" SortExpression="firstName" />
<asp:BoundField DataField="surname" HeaderText="Surname" SortExpression="surname" />
<asp:BoundField DataField="dateOfBirth" HeaderText="DOB" SortExpression="dateOfBirth" />
<asp:BoundField DataField="postcode" HeaderText="Post Code" SortExpression="postcode" />
<asp:TemplateField HeaderText="Male" SortExpression="isMale">
<ItemTemplate>
<asp:CheckBox ID="isMale" runat="server" Checked='<%# Eval("isMale") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Female" SortExpression="isFemale">
<ItemTemplate>
<asp:CheckBox ID="isFemale" runat="server" Checked='<%# Eval("isFemale") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="getModel" runat="server"
SelectMethod="GetDataBySurname" TypeName="KayKayDataTableAdapters.modelRegistration1TableAdapter">
</asp:ObjectDataSource>
</asp:Content>
error message is
Server Error in '/KayKay' Application.
Syntax error: Missing operand after 'LIKEC' operator.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand after 'LIKEC' operator.
Source Error:
Line 6: Dim dview As New Data.DataView
Line 7: dview.Table = dset.Tables("modelRegistration1")
Line 8: dview.RowFilter = "surname LIKE" + surnameFilter.SelectedValue.ToString() + " % "
Line 9: GridView1.DataSource = dview
Line 10: GridView1.DataBind()
Source File: E:InetpubwwwrootKayKayAdminupdateModels.aspx Line: 8
Stack Trace:
[SyntaxErrorException: Syntax error: Missing operand after 'LIKEC' operator.]
System.Data.ExpressionParser.Parse() +3158
System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +109
System.Data.DataView.set_RowFilter(String value) +171
ASP.admin_updatemodels_aspx.Button1_Click(Object sender, EventArgs e) in E:InetpubwwwrootKayKayAdminupdateModels.aspx:8
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921
View 7 Replies
ADVERTISEMENT
Feb 8, 2004
hello everyone,
i want to do something like this in stored procedure
declare @Dop as varchar
declare @AnyVar as int
set @Dop = '>'
select * from Table1 where Field @Dop @AnyVar
but it dont work
what can i do ?
Thank you
View 4 Replies
View Related
Dec 21, 2005
I have a stored procedure that works fine on SQL Server 2000 or 2005,but when run on an machine running MSDE, I get the Operand type clash,int is incompatible with text data type error. The data type isactually text and text is the type of data being passed. Anyparameters not being used are defaulted to null. Any ideas why thiswould happen on MSDE and work fine anywhere else?Thanks so much.
View 2 Replies
View Related
Sep 11, 2006
Hello!I am trying to update a DetailsView but I keep getting the error of Operand type clash: int is incompatible with text. I have double checked the stored procedure but I don't see any obvious offending parameters. ID is the only parameter that is an interger. I am not trying to update the ID at all, just for the filter purposes to update the records. ALTER PROCEDURE [dbo].[proc_update] /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @BUILDING_SV float, @BUILDING_ADDS float, @BUILDING_DEL float, @BUILDING_TOTAL float, @ME_SV float, @ME_ADDS float, @ME_DEL float, @ME_TOTAL float, @PATTERNS_SV float, @PATTERNS_ADDS float, @PATTERNS_DEL float, @PATTERNS_TOTAL float, @SS_VALUE float, @SS_TOT float, @COMMENTS text, @OCCUPANCY_TYPE varchar(255), @REVISED_BY varchar(255), @DRAWINGS float, @INVENTORY float, @TOTAL float, @DIVISION varchar(255), @LOCATION varchar(255), @LOCATIONCODE varchar(255), @ADDRESS1 varchar(255), @ADDRESS2 varchar(255), @ADDRESS3 varchar(255), @ADDRESS4 varchar(255), @PROP_ID float, @POST_DATE smalldatetime, @ID intAS /* SET NOCOUNT ON */ UPDATE dbo.PROPERTY_VALUES SET BUILDING_SV = @BUILDING_SV, BUILDING_ADDS = @BUILDING_ADDS, BUILDING_DEL = @BUILDING_DEL, BUILDING_TOTAL = @BUILDING_TOTAL, ME_SV = @ME_SV, ME_ADDS = @ME_ADDS, ME_DEL = @ME_DEL, ME_TOTAL = @ME_TOTAL, PATTERNS_SV = @PATTERNS_SV, PATTERNS_ADDS = @PATTERNS_ADDS, PATTERNS_DEL = @PATTERNS_DEL, PATTERNS_TOTAL = @PATTERNS_TOTAL, SS_VALUE = @SS_VALUE, SS_TOT = @SS_TOT, COMMENTS = @COMMENTS,OCCUPANCY_TYPE = @OCCUPANCY_TYPE, REVISED_BY = @REVISED_BY, DRAWINGS = @DRAWINGS, INVENTORY = @INVENTORY, TOTAL = @TOTAL, DIVISION = @DIVISION, LOCATION = @LOCATION, LOCATIONCODE = @LOCATIONCODE, ADDRESS1 = @ADDRESS1, ADDRESS2 = @ADDRESS2, ADDRESS3 = @ADDRESS3, ADDRESS4 = @ADDRESS4, PROP_ID = @PROP_ID, POST_DATE = @POST_DATE WHERE [ID] = @ID RETURN Help! Thanks.
View 13 Replies
View Related
Apr 18, 2013
I'm getting this error when trying to insert data into a table.
"Operand type clash: int is incompatible with date"
This is the SQL I used to create the table:
Code:
CREATE TABLE customers(
customer_id int IDENTITY(1,1) NOT NULL,
member_yn char(1) NOT NULL,
membership_number int NOT NULL,
date_became_member date NOT NULL,
[Code]....
This is the SQL I am using to add data: (Note that there are two dates in each line, scroll to the side.)
Code:
INSERT INTO customers VALUES ('y', 156, 2010-08-29, 'John', 'Smith', '1235 Main Street, Dunmore, PA 18512', 6963287654, 'jsmith@hotmail.com', 1986-06-23);
INSERT INTO customers VALUES ('y', 159, 04/15/2011, 'Mary', 'Jones', '235 Ardmore Blvd, Pittsburgh, PA 15221', 3429831594, 'jones_mary@gmail.com', 01/12/1992);
Each of the lines above to add data uses a different data format because I tried both, while commenting out the other, hoping for the problem to go away with the change in format.
Here is the SQL code to create a primary key for this table:
Code:
ALTER TABLE customers ADD CONSTRAINT pk_customers PRIMARY KEY (customer_id);
View 4 Replies
View Related
Feb 24, 2014
I am trying to combine columns and add it to an existing table
insert into Future_Link.dbo.tbFLink (Fastighet, Anlaggning)
values (
(select strFastbeteckningTrakt + ' ' + strFastbeteckningBlock + strFastbeteckningTecken + intFastbeteckningEnhet
from EDPFutureGagnef.dbo.tbFuAnlaggning),
(select strAnlnr
from EDPFutureGagnef.dbo.tbFuAnlaggning)
)
Generate error:
Msg 206, Level 16, State 2, Line 1
Operand type clash: int is incompatible with text
View 2 Replies
View Related
Aug 18, 2006
Im trying to insert a new record into tblMessages...the unique ID generated for MessageID is the value I want to use as a value for the MessageID field when inserting a new record in tblUsersAndMessagesI have the following sp:
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE spNewMessage
@UserIDSender nvarchar(256),
@MessageTitle nvarchar(50),
@MessageContent text,
@MessageType int,
@MessageID uniqueidentifier,
@UserID uniqueidentifier
AS
Begin
Set NoCount on
DECLARE @WhateverID uniqueidentifier
INSERT INTO tblMessages(UserIDSender,MessageTitle,MessageContent,MessageType)
VALUES (@UserIDSender,@MessageTitle,@MessageContent,@MessageType)
Select @WhateverID=@@Identity
INSERT INTO tblUsersAndMessages(MessageID,UserID)
VALUES (@WhateverID,@UserID)
End
GO
And here are my tables:tblUsersAndMessages allow nullsMessageID uniqueidentifier falseUserID uniqueidentifier falseNew bit false *default set to ((1))
tblMessages allow nullsMessageID uniqueidentifier false *PK default set to (newid())UserIDSender uniqueidentifier falseMessageTitle nvarchar(50) trueMessageContent text trueSentDateTime datetime false * default set to (getdate())MessageType int false
Now when I try to add my SP I get this error:Msg 206, Level 16, State 2, Procedure spNewMessage, Line 22Operand type clash: numeric is incompatible with uniqueidentifierWhat can this be?!?
View 4 Replies
View Related
Oct 4, 2006
I uploading an image from a web page into Sql Server 2000 database. I call a stored procedure with the parameter @Flag of type Image. When I tried to pass a null value to this parameter I got the error:"Operand type clash: nvarchar is incompatible with image".I was adding the parameter like this:sqlCmd.Parameters.AddWithValue("@Flag", DBNull.Value);After trying few different things I found a workaround using the following:sqlCmd.Parameters.Add("@Flag", SqlDbType.Image);sqlCmd.Parameters["@Flag"].Value = DBNull.Value;Possibly a bug in the SqlCommand.Parameters.AddWithValue method ?
View 1 Replies
View Related
Jun 13, 2014
I am using the below query for calculation and I get this error.
Operand data type nvarchar is invalid for sum operator.
'$ '+ REVERSE(SUBSTRING(REVERSE(CONVERT(varchar,(CAST(round(isnull(sum(t7.[Pre Override Cost]),0),0) as money) + 1 -
cast(round(isnull(sum(t8.[Shared Dollars]),0),0)as money)),1)),4,255)) as [PreOverride L2],
'$ '+ REVERSE(SUBSTRING(REVERSE(CONVERT(varchar,(CAST(round(isnull(sum(t7.[Post Override Cost]),0),0) as money) -
cast(round(isnull(sum(t8.[Shared Dollars]),0),0)as money)),1)),4,255)) as [PostOverride L2]
View 6 Replies
View Related
Jul 3, 2015
This is a piece of my code:
SELECT TOP 1000 *...
case when Rownum<= datediff(day, salesdate, baseenddate)
then DATEADD(mm, RowNum, salesdate) /*error at this point*/
else 0 end as subscriptionrowdate
FROM Subsrow
Rownum is an integer type. DATEADD is the part when the error is but i dont know how to convert this to int
View 4 Replies
View Related
Sep 16, 2006
Hi all I am trying to convert the string "(null)" in the [PASSWORD] column of my table to an actual NULL value. I have tried to use two different forms of a conditional operator to achieve this end. However I am getting the below errors both can be summed up with the following statement.
DT_STR operand cannot be used with the conditional operation. The expression directly below however is using a type DT_I4 in the conditional clause as this is what FINDSTRING returns. Hence the equivalencey test to the literal integer 0. So I must say I am somewhat confused by this. Does anyone know why neither of the below statements are working?
Also is there an easy way to accomplish what I am trying to do - convert the string "(null)" in the [PASSWORD] column of my table to an actual NULL value?
FINDSTRING([PASSWORD], "(null)", 1) == 0 ? [PASSWORD] : NULL(DT_STR, 255, 1252)
Error at Administrator Data Flow Task [Derived Column [1985]]: For operands of the conditional operator, the data type DT_STR is supported only for input columns and cast operations. The expression "FINDSTRING(PASSWORD,"(null)",1) == 0 ? PASSWORD : NULL(DT_STR,255,1252)" has a DT_STR operand that is not an input column or the result of a cast, and cannot be used with the conditional operation. To perform this operation, the operand needs to be explicitly cast with a cast operator.
LOWER( TRIM( [PASSWORD] ) ) != "(null)" ? [PASSWORD] : NULL(DT_STR, 255, 1252)
Error at Administrator Data Flow Task [Derived Column [1985]]: For operands of the conditional operator, the data type DT_STR is supported only for input columns and cast operations. The expression "LOWER(TRIM(PASSWORD)) != "(null)" ? PASSWORD : NULL(DT_STR,255,1252)" has a DT_STR operand that is not an input column or the result of a cast, and cannot be used with the conditional operation. To perform this operation, the operand needs to be explicitly cast with a cast operator.
View 4 Replies
View Related
Oct 23, 2015
I get this error "Operand data type varchar is invalid for divide operator".
select V.[Parent Name],
[ID],
round((V.SoftValue/VTMValue)*100,0) 'SPercentage',
round((V.HMUValue/VTMValue)*100,0) 'HPercentage2',
round((V.PrimaryValue/VTMValue)*100,0) 'PPercentage2'
[code]...
I have even converted the values to float.
View 5 Replies
View Related
Jun 6, 2008
Hi i have a sorted procedure that create a @temp table that return strNomObjet,strNomDescripteur,strReponse,Percentage
I need to calculate the Percentage for strReponse for each strNomDescripteur. strReponse can be = to A,B,C, or D
To calculate the Percentage i have no problem my is that something it possible that a certain strNomDescripteur that will have only A,B and D and there no C i need to put 0%.
Here what i have
DECLARE @Temp table
(
strLastName varchar(50),
strFirstName varchar(50),
strReponse char(10),
strNomObjet nvarchar(200),
strDescripteurOrdre char(10),
strNomDescripteur nvarchar(200),
strObjetOrdre char(10)
)
INSERT INTO @Temp
Select te.stdlastn,te.stdfirstn,COALESCE(NULLIF(REPLACE(tr.T3,'*',''),' '),REPLACE(tr.T2,'*','')),tob.Nom,tob.Affichage,td.Nom,td.Affichage
fromBulletin.dbo.tblEleves as te
INNER JOIN Bulletin.dbo.tblBulletin as tb ON te.stdnumber=tb.NoEtud
INNER JOIN Bulletin.dbo.tblNomBull as tnb ON tb.NoBull=tnb.ID
INNER JOIN Bulletin.dbo.tblSection as ts ON ts.ID_Bull = tnb.ID
INNER JOIN Bulletin.dbo.tblObjetas tob ON tob.ID_Sec = ts.ID
INNER JOIN Bulletin.dbo.tblDescripteur as td ON td.ID_Obj = tob.ID
INNER JOIN Bulletin.dbo.tblReponse as tr ON tr.ID = tb.ID
whereintActif = 1 and
tb.NoBull not like '%EdPhy%'
and tnb.Nom not like '%EdPhy%'
and tnb.Date = '2006-2007'
and te.STDGRADeID = 3
and te.schoolid = '1202'
and ts.Nom = 'MATHÉMATIQUES'
and tr.[Desc] = td.ID
and tr.T2 <> 'NULL'
and tr.T3 <> 'NULL'
and (tr.T2 <> '' OR tr.T3 <> '')
ORDER BY tob.Affichage,td.Affichage
SELECT t1.strNomObjet,t1.strNomDescripteur,t1.strReponse,
t1.ReponseCount * 100.0/t2.PersonCount AS Percentage
FROM
(
SELECT strNomObjet,strNomDescripteur,strReponse,count(*) AS ReponseCount FROM @Temp
GROUP BY strNomObjet,strNomDescripteur,strReponse)t1
INNER JOIN (SELECT strNomObjet,strNomDescripteur,count(*) AS PersonCount FROM @Temp
GROUP BY strNomObjet,strNomDescripteur)t2
ON t2.strNomObjet=t1.strNomObjet
AND t2.strNomDescripteur=t1.strNomDescripteur
This will give this result :
As you can see it always A,B,C,D A,B,C,D
Except for "FORMES utilise les transformations géométriques pour" it only A,B,C there no D.
So is there a way that i could insert D = 0
So if i don't find any A,B,C or D for certain strNomDescripteur put that letter = 0
Thanks for your help in advance!!
FORMES utilise la mesure pour résoudre des problèmesA 47.222222222222
FORMES utilise la mesure pour résoudre des problèmesB 38.888888888888
FORMES utilise la mesure pour résoudre des problèmesC 8.333333333333
FORMES utilise la mesure pour résoudre des problèmesD 5.555555555555
FORMES utilise les figures géométriques pour résoudre A 61.111111111111
FORMES utilise les figures géométriques pour résoudre B 25.000000000000
FORMES utilise les figures géométriques pour résoudre C 11.111111111111
FORMES utilise les figures géométriques pour résoudre D 2.777777777777
FORMES utilise les transformations géométriques pour A 62.857142857142
FORMES utilise les transformations géométriques pour B 28.571428571428
FORMES ET ESPACE (géométrie)utilise les transformatC 8.571428571428
NOMBRE ET OPÉRATIONSdémontre une compréhension A 69.444444444444
NOMBRE ET OPÉRATIONSdémontre une compréhension B 16.666666666666
NOMBRE ET OPÉRATIONSdémontre une compréhension C 5.555555555555
NOMBRE ET OPÉRATIONSdémontre une compréhension D 8.333333333333
View 4 Replies
View Related
Dec 13, 2006
Hello all,I hope someone can help me; if got a value in a cell (040 1234567),when I run a queryin the Analyser I got as respons only 40 1234567, so missing the zero(0) not the whole number is displayed. When I run a query on a cellwith value 1234567 I received the number 1234567 and that's oke. TheData Type of the Column is Char.Thanks,Marko
View 6 Replies
View Related
Apr 18, 2007
Why is is in SSMSE or through code in VB.NET when running a query on a linked server that is an Excel spreadsheet is the first row not returned?
My spreadsheet has 320 rows with no column headings.
My select query within SSMSE returns only 319, the first row is ommitted, I beleive treated as a column heading.
If I insert a row at the very beginnning and enter any jibberish this row is ommitted and I get all my data.
Now I dont really want to have to tell my users that to get the import function of my app to work correctly they have to do this?
Is there a way to configure it to not treat first row as headings?
Thanks
View 1 Replies
View Related
Dec 20, 2006
When I log in to Windows (XP Pro SP2), I get the following message displayed in the Application Event Viewer.
"The ASP.NET DLL (Path: C:WINDOWSMicrosoft.NETFrameworkv2.0.40607aspnet_isapi.dll) (Version:2.0.40607.0) is missing"
The message is quite correct in its assertion that the file is not where it says it is. There is a copy of the noted DLL however, in C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 and in C:WINDOWSMicrosoft.NETFrameworkv1.1.4322
Why is the Report Server looking for that particular version? Why can't it point at the later version?
View 4 Replies
View Related
Jun 25, 2007
I'm trying to access some files on a file server in CLR code and I have to impersonate the windows login to get permission. I am using the classic example of SqlContext and i can see that after calling the impersonate method it changes. I always get false from the System.IO Direcotry and File functions to see if there are any files or even if the directory exists. The permissions are correct on the file share and the batch submission is using the correct login.
Directory.Exists ALWAYS returns false.
Slimmed down code
WindowsImpersonationContext OriginalContext = null;
WindowsIdentity CallerIdentiy = SqlContext.WindowsIdentity;
try
{
OriginalContext = CallerIdentiy.Impersonate();
bDirectoryExists = Directory.Exists(@sSourceDir);
finally
{ OriginalContext.Undo(); }
Any ideas????
View 8 Replies
View Related
Dec 12, 2006
hi,
I am using time series algorithm.and my prediction query is like this
SELECT PredictTimeSeries([Performance]) FROM [Stud_Model]
The output is like this
Date Perf
9/11/2006 90
10/11/2006 92
11/11/2006 93
12/11/2006 -- (no prediction)
1/11/2007 --(no prediction)
I dnt know why there is no prediction after certail date?
Thanks,
Karthik
View 1 Replies
View Related
Sep 9, 2006
When I sign on to my computer I get this message, MSVCR70.dll can not be found try to reinstall it this may fix the problem, BUT CAN'T find the dll that is missing to reinstall it, HOW DO I FIX THIS please HELPPPPPPPPP!!!!!!
View 6 Replies
View Related
Feb 18, 2008
I have a normal nvarchar(50) field in a table that has a single comma in it but when i read it using OleDbDataReader the comma gets removed.
any ideas what i am doing wrong ?
many thanks
View 4 Replies
View Related
Sep 24, 2003
In the console, when right clicking on a table name...then selecting 'open table', the toolbar at the top of the page is not displaying. This is the graphical bar with the 'SQL' button that lets you filter the results.
How do I get the toolbar back, is it a setting?
Thanks!
Carl
View 1 Replies
View Related
Jul 21, 2004
Hi,
Recently I installed MSDE and then Analysis services and also applied SP3's for both...
However I have noticed that the FoodMart Database which was automatically installed previously with Analysis services is not installed. Is there any way to get that?
Many TIA.
View 3 Replies
View Related
Jan 4, 2006
Hello
I'm missing an RDL file... I've deployed the report to the server. Is there any way to recover the report as a RDL file again?
I'm using SQL Server 2000.
Many thanks
robhob
View 2 Replies
View Related
Aug 20, 2004
SELECT SkillNo, SkillName FROM [Skill] WHERE SkillName = " & oRs.Fields(lngCol).Value
whats wrong with this
View 2 Replies
View Related
Nov 2, 2004
Newbie SQL Question.
I need to build a results grid that reports totals or zero for an attribute
SELECT ClaimType, VendorNumber,
COUNT (ClaimNumber) AS ClaimCount
FROM ClaimHeader
GROUP BY VendorNumber, ClaimType
ORDER BY VendorNumber ASC;
THe underlying data has two claim types (UB, and HCFA). Some vendor numbers have only UB claims or only HCFA claims. I want my totals to show a zero for those vendor numbers. Example
VendorNumber ClaimType ClaimCount
234 UB 21
234 HCFA 12
235 UB 0
235 HCFA 15
My current group by doesn't give me the 3rd row in my example. How do I change my query to add those rows that have no claims as a zero. Put another way, every vendorNumber has to report a HCFA total and a UB total, even if they're zero.
Thanks.
View 4 Replies
View Related
Dec 8, 2004
Hi,
I have encountered an issue with one of my log files which has me somewhat puzzled.
I receieved notification at 00:02:16:36 that the Log file was full:
The log file for database 'TDS' is full. Back up the transaction log for the database to free up some log space..
A large number of these same messages have followed.
Prior to these messages starting the log file was backed up successfully at 00:00:01:10
Shortly after this there is a message - and this is the bit that confuses me - at 00:02:16:35 that says:
d:mssqldata ds_log.ldf: Operating system error 112(error not found) encountered.
So from what I can tell the log file was backed up successfully. Then approx 1 minute later the system can't find the log file???
Then I keep getting these log file full messages - until the next log backup (60 min later)...then everything is fine. HUH?
When looking at the log file for SQL it is sitting there, and isn't new, as it's created date is back when I setup the database initially.
Can anyone shed any light on what this message might mean and whether there is specifically something that I can do to circumvent it in the future.
Oh yeah we have nothing tricky in terms of replication or log shipping or anything like that.....
Thanks in advance for any assistance.
Troy
View 2 Replies
View Related
Sep 27, 2005
Hi all,
I would greatly appreciate a boost with this problem. I'm trying to 'script' the mundane task of adding descriptions to my tables (I know this can be done from Enterprise manager via Diagrams, but I have a huge (did I mention huge?) amount of tables and I really don't want to have to go to the properties of each and every table.
Now, if I read BOL right I can use sp_addextendedproperty (and here is their example):
sp_addextendedproperty 'Caption', 'Caption Test Table', 'user', dbo, 'table', TestExProp <--- Does this not add a description to the the table?
Well, I tried it and No Joy ! When I look at the table properties from the Diagram (w/in Enterprise Manager) I have a nice big EMPTY Description Box.
I tried changing it from 'Caption' to 'Description' thinking that would work but alas, I sit here and wonder where I went wrong ....
What have I missed?
Any input would put me out of my misery and make me a productive individual (at least for today !)
Schimelcat
View 5 Replies
View Related
Mar 18, 2008
I installed SQL server 2005 on a win2003 server box.
When I open the Connect to Server dialog box, I choose server type: Database Engine. There is no Servername listed, so I put in the name of the PC.
I get a long error message when I try to connect:
Cannot connect to PCName....
...error: 40 - Could not open a connection to SQL Server)...
When I try to go into the Surface area Configuration, I get this message:
"No sql server 2005 components were found on the specified computer. Either no components are installed, or you are not an administrator on this computer. (SQLSAC)"
I am logged in as Administrator in the PC, so did I do something seriously wrong with the installation?
In the services window, I can not fine MSSQLserver (not sure if this is relevant).
regards,
Jozi68
View 3 Replies
View Related
Apr 13, 2008
Hi
i need to finrd the find the missing records from a table based an formdate and todate,where the dates are not arranged in proper manner.
please helpme to find these records.
Rajesh
View 1 Replies
View Related
May 8, 2008
hi guys,
i have to check first the missign dates between dates 1/1/1999 till current date how many dates are missing and for those dates i have set - update quantity=0 for all those missing dates. docdate is datecolumn in saleshsitory and quantity is in salestable.
can anybody help me to solve this problem.
thanks a lot!
View 3 Replies
View Related
Nov 3, 2005
by accident the .ldf file has been deleted and no more avalible.
Is any way to receate log file and attached to my .mdf file?
pls help,
regards, Prakash
View 3 Replies
View Related
Jul 29, 2006
Hi,
Recently my server harddisk crashed and I Lost a one of the secondary data files of sqlserver database.
I have the main file intact and the recent data was also in that file only, but I was unable to attach the database as it required the other data files also.
Is there any way to create the database again from the existing data file( unfortunately there is no backup also which we can use to recreate the missing data file)
thanks
Anupam
View 3 Replies
View Related
Sep 14, 2007
Hello. We have a smaller system on one of our servers where a couple of users where beta-testing. This system used a SQLExpress 2005 database (databaseName_data.mdf).
But yesterday we saw that we couldn't use the system anymore, we got errors about the connection to the database. We open SQL Management Studio and connected to the SQL Server and we saw the name of the database in the list, but it was completly empty. Nothing. Not the "folder" for Tables, Programmability, Security... nothing.
We then browsed to the folder where the MDF file used to be, and there we only found the LDF file. The MDF file was gone.
We "know" that no one here have been shutting down the SQL Service and then deleted the DB, so we are trying to figure out what has happen.
It's not a major issue, because it's just a beta-test, but we don't want this to happen later on again...
Does anyone have a clue of what might be going on?
We are using three instances of SQL Express on this test machine btw... One for the public system (wich used this db), one for development and one for some random tests...
The public server and develop server used databases with the same name, but of course, different files on the hdd (and different instances of SQL Express).
//J
Edit: I might add that we hadn't backed this db up yet... Is there some way to use the LDF-file to restore some of the data?
View 10 Replies
View Related