A CAST That Appears To Use A Template. Is This Correct?
Feb 22, 2008
I need some feedback on how this sql is perfroming a cast. I have used CAST before, but I am
looking at a stored procedure, and the CAST looks slightly different. Usually when I do a
cast, it is of the form CAST(ColumnName,DataType) but this cast is slightly different as they
appear to be using some type of template to cast with. Here is the code. I will put line numbers in for reference.
1 CREATE TABLE #Groups
2 (PartyId uniqueidentifier)
3 INSERT INTO #Groups (PartyId)
4 SELECT PartyId
5 FROM ttg_sfGroupsByPartyId(@PartyId)
6
7 IF (@PortalId = CAST('00000000-0000-0000-0000-000000000000' AS uniqueidentifier) AND8
8 @TabId = CAST('00000000-0000-0000-0000-000000000000' AS uniqueidentifier))
0 BEGIN
Also just to let you know, the the values PartyId, and PortalId are GUIDS.
So, I guess my question is, are they using a kind of template to format the data? So look at lines
7 and 8. Are they using some type of template to signal the compiler, that the data will be of that
format and will be seperated by dash symbols?
I have SQL Server 2000 SP3 and the default Code Page is:
I have a Table with a column of the type 'text'. In this column sometimes it's necessary introduce the euro symbol (€). Now, when we write this symbol, after the SQL Server show it with a '?'.
I tried change the column collation to 'Latin1_General_CI_AI', ‘SQL_Latin1_General_CP1_CI_AI’ and ‘SQL_Latin1_General_CP850_CI_AI’ but there is the same problem.
Here's what I did to a VS2005 Smart Device application.
Removed the reference to System.Data.SqlServerCe.dll. Set a reference to C:Program FilesMicrosoft SQL Server Compact Editionv3.1SDKinwce500 System.Data.SqlServerCe.dll. While it€™s loading in the emulator I notice that it appears to still be loading SQLCE3.0 instead of 3.1. Deploying 'C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0wce500ARMV4isqlce30.ppc.wce5.armv4i.CAB' Deploying 'C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0wce500ARMV4isqlce30.repl.ppc.wce5.armv4i.CAB' Deploying 'C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0wce500ARMV4isqlce30.dev.enu.ppc.wce5.armv4i.CAB'
When I start "SQL Server Business Intelligence Development Studio" from the start menu it fires up Visual Studio 2005 with no SSIS project options. I appear to have it installed as the service is present in the Services control panel, and DTExecUI.exe and DTExec.exe are present, but there does not appear to be an integration with Visual Studio 2005. I have attempted to start up the SQLServer configuration application from the Add/Remove Programs control panel, however it always exits with an error. What do I need to do to get this running in Visual Studio 2005?
Okay, i'm learning VB.NET (and having quite a bit of fun with it). Well, I had the old beta version. Anyway, went away for a week and found I could no longer use it. Why?
"Beta period is over.".
Yeah, it sucks.
Well, I uninstalled it via the uninstaller. I upgraded my .NET framework, etc, and redownloaded VB.NET. Everything installed okay, save for the SQL server. It repeatedly fails.
I have hunted down and shot each component quite ruthlessly, but I don't know what beta component remains. I can't get it to install because it says I have beta components left.
And VB.NET works. Barely. I had to disable the hosting process, otherwise it gives me a message about an invalid binding handle. Not often that a Beta product works better than the production one.
The uninstall tool won't work for some reason. I'm this close to just reformatting.
We are running SQL Server 2000 SP3 + security patches on Windows 2000 Advance Server.
After we did the security updates released before Jan 8th,
We are getting the below error 2 times within a month and the sql server is not responding after this error. After rebooting the server, it responds and works normally.
please give me a solution for this
2005-02-13 07:16:22.54 server Error: 17883, Severity: 1, State: 0 2005-02-13 07:16:22.54 server Process 89:0 (12a68) UMS Context 0x129E1EE8 appears to be non-yielding on Scheduler 0.
2005-02-13 07:16:26.27 server Stack Signature for the dump is 0x00000000 2005-02-13 07:16:26.27 server Error: 17883, Severity: 1, State: 0 2005-02-13 07:16:26.27 server Process 86:0 (1418c) UMS Context 0x12A36D98 appears to be non-yielding on Scheduler 5.
My @subject in an xp_sendmail job is appearing in the email subject where it's supposed to, but also as the first line of the body. Does anyone know of a way to disable this behavior?
I'm using VS2005 and I'm trying to create a report but two of the parameter, I think, have the same heirarchy? Well, I am getting this error when I go to view the report:
An error occurred during local report processing. An error has occurred during report processing. Query execution failed for data set 'dsWorkItemHistory' The System_State heirarchy already appears in the axis1 axis My problem is I want one parameter to be WorkItemType and another parameter to be WorkItemState. For WorkItemTypeParam I have:
Parameter: WorkItemTypeParam Dimension: Work Item Hierarchy: Work Item.Work Item Type Multi-Value with Default All For WorkItemState I have:
Parameter: WorkItemState Dimension: Work Item Hierarchy: Work Item.State Multi-Value with Default All My Dataset is:
All of my reports that are formatted 11x8.5 are outputting to PDF correctly. When I open the PDF in Adobe Acrobat, it appears in Landscape on the screen. However, when I click the print button, by default it is printing it in portrait. I can go to File-->Print Setup and change the orientation from Portrait to Landscape, but why doesn't it translate from the file orientation? This may just be a bug in the Adobe Acrobat software, but I want to make sure there isn't something I can do.
Hello I have a piece of VB.NET code that generates an email on the SqlDataSource Inserted event. It appears to be executing twice because it is sending two emails. If I place the code on any other event, it just sends the one email. Does any have a suggestion on how to handle this? Protected Sub SqlDataSource1_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SqlDataSource1.Inserted Dim MailServerName As String = "alvexch01"Dim Message As MailMessage = New MailMessage Message.From = New MailAddress("sender@email.com")Message.To.Add("receiver@email.com") Message.Subject = "Near Miss" Message.Body = "Test" Message.IsBodyHtml = True Message.Priority = MailPriority.NormalDim MailClient As SmtpClient = New SmtpClient MailClient.Host = MailServerName MailClient.Send(Message) Message.IsBodyHtml = True Message.Dispose() End Sub
Environment: Clustered SQL Server 2K sp3a (single instance) Product version: 8.00.760 Problem: I end up in error 17883. I am aware that the solution is to apply this patch: 821277 MS03-031:Security Patch for SQL Server 2000 Service Pack 3. I am also aware that after you install this cumulative patch you will end up in this problem: 826161 FIX: You are prompted for password after you change a standard SQL Server login. After reading this one I found that there are 2 possibility to solve this problem, one if you have already installed the security patch from MS03-031 and another one if you do NOT have installed this patch. Question: Do I only need to apply this last one (is it also cumulative?) or do I need to first apply MS03-031 and then later the FIX 826161? Please advise. Kind regards.
I have several DTS packages saved 'locally' to the SQL server. I want to duplicate a package, so that I can make some changes then replace the original. I certainly don't want to rebuild the entire package from scratch. So, I open up the original package, go to the 'Package' menu and choose 'Save As', then give it a new name and press OK. No errors, all appears well, the title bar even shows the new name of the package. But, when I close the package and go the the 'local' package list, it (the new package name) doesn't appear in the list. Refresh, exit SEM, reboot - doesn't show up. I even looked in the MSDB table where packages are supposed to be stored (at least the name / package id / etc), and it doesn't show there as well. Tried from several client machines.
OS: Windows 2000 Server (advanced) SP2 SQL: SQL 2000 Server (no SP's)
I have a simple powershell script, that is writing single row to remote SQL server as sort of keepalive solution for branch machine. It opens System.Data.SqlClient.SqlConnection, SqlBulkCopy writes table, and closes connection.
Sometimes script throws an error in form of - Cannot access destination table.
We are not managing internet connectivity in that place, so I don't know for sure, but can this error be caused by connection timeout that comes when script tries to write ?
When I import data from MS Access databases, some fields appear as "<Long Text>" in SQL. I cannot edit these fields in SQL. I have to export the table to Access, update the field, and then import again.
There's got to be an easier way. What am I missing here?
Hi below sample data incoming from a source that cannot be changed. Please ignore the mishandling of zls. Obviously it is not insurmountable - I am just interested in why it is happening because I cannot explain it. DECLARE @t TABLE(the_data CHAR(73)) SET DATEFORMAT dmySET NOCOUNT ON INSERT INTO @tSELECT ' 11'+SPACE(5)+'1649KN889001 2'+space(10)+'0'+space(10)+'08 01 2002'+space(10)+'04 10 2002'UNION ALLSELECT ' 11'+SPACE(5)+'1649KN889001 2'+space(10)+'109 08 2004'+space(20)+'21 07 2005'UNION ALLSELECT ' 11 13026721XX198734 1'+space(10)+'0'+space(10)+'XXXXXXXXXX'+space(10)+ '09 01 2003' SELECT CAST(REPLACE(REPLACE(date1_text,' ','/'),'XXXXXXXXXX',NULL) AS SMALLDATETIME) AS date_1_prob,CAST(REPLACE(REPLACE(date1_text,' ','/'),'XXXXXXXXXX','') AS SMALLDATETIME) AS date_1_ok_ish,CAST(NULLIF(REPLACE(date1_text,' ','/'),'XXXXXXXXXX') AS SMALLDATETIME)AS date_1_fine, date1_textFROM--derived table - selecting relevant substring(SELECT LTRIM(RTRIM(SUBSTRING(the_data, 44, 10))) AS date1_textFROM @t)AS der_t date_1_prob date_1_ok_ish date_1_fine date1_text----------------------- ----------------------- ----------------------- ----------NULL 2002-01-08 00:00:00 2002-01-08 00:00:00 08 01 2002NULL 1900-01-01 00:00:00 1900-01-01 00:00:00 NULL 1900-01-01 00:00:00 NULL XXXXXXXXXX Can anyone explain the result in the first row first column? Thanks
I am using a dial up connection to the Internet and to an online SQLServer database.I have a problem in that when I use Enterprise Manager to access evenmy local server , or even, it appears, when it is just open with noconnection to any SQL Server, I experience very slow data transferover my normal dial up connection.I am reasonably sure it is Enterprise Manager causing the problem aswhen I close it and redial I have an acceptable rate of data transferusing my dial up connection.Can anyone:a. support my conclusion that Enterprise Manager is the probablecause of the slow connection.b. suggest a solutionBest wishes, John Morgan
I created a virtual directory in IIS that points to a folder on c: where my images reside. I use a URL to reference one of those images in my report heading. It appears as it should in designer's preview tab but only as a big red X in Report Viewer from my browser.
Directory security on the virtual directory is set to Integrated Windows.
Right clicking on red x in IE7>properties shows a path to report server instead of the special virtual directory I created.
we defined a xml schema. ONe node was defined as decimal data type. When the coming data of this node in this XML file is more than 999, then it will add a comma in the figure , looking like 1,024.00. then SSIS can not regard this as a decimal.
Any experience to share ? i dont wanna change the schema from decimal to string.
We are using SQL Server 2005 (not on SP1), and keep getting the following message in the SQL Server log:
IO Completion Listener (0x15e8) Worker 0x00B7E0E8 appears to be non-yielding on Node 0. Approx CPU Used: kernel 0 ms, user 0 ms, Interval: 35092.
After receiving this message, the server slows down considerably and we receive numerous messages saying:
SQL Server has encountered 61 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [xxxxx.MDF] in database [xxxx] (22). The OS file handle is 0x00000CDC. The offset of the latest long I/O is: 0x000000fa21a000
I have not been able to find any documentation or explanation of what the IO Completion Listener message is about or how to correct whatever problem is causing it.
I have a field in a table that contains addresses e.g
15 Green Street 5F Brown Steet 127 Blue Street 1512 Red Road
I want to output the numbers into one column and the address to another column as i need to produce a report that only shows streets and roads but no numbers.
So basically no matter how many characters before the first space which can be numbers or letters i want these output into two columns.
I installed SQL Server 2005 SP2 recently. After that when I try to deploy a solution in SSRS 2005, I get a dialog box with title: "Reporting Services Login". It has my server listed as the first row: "http://localhost/reportserver" and then it has two text boxes asking for Username and Password.
I checked my IIS settings and only Integrated Security is checked for the Reports Server folder (and for the entire website). I tried to change that to Allow Anonymous Access = Checked, but still the same problem.
I have been working on an application which require as much percision as we can get. We have defined all numeric values as (38,16) however when ever we divide a number by the result of a built in function it truncate the percision to 5 decimal place this cause us to have a small but enoying loss in the numbers being caculated we need a minimuim of 8 decimal places or better is there a work around or solution for this problem in sql server 2005. The more percision the better.
example: select tna/(select sum(tna) from taum) from taum where fund_id = 2345
the result is always 5 decimal places even though fund_id tna = 2569698.23 and sum(tna) =98745612325879.36 which should equal .00000002602341683313994 instead the result = .00000
Hi I have picked up the same problem that quite a few folks have identified.
I have created a SSRS Solution and have a report which I am trying to deploy to the Report Manager. The project 'builds' locally but when I try to deploy it, a User Login Box pops up.
Has any one been able to ascertain what causes the problem and how does one go about resolving the problem. I am using Window Authentication on WIndows XP SP2 with SQL Server 2005 Developers Edition and Visual Studio 2005 Professional I have not 'tinkered' with IIS,.
Any help would be greatly appreciated. regards Steve
I need to import data from a CSV file into a db I'm designing. I figured I'd use DTS (which I understand now uses VS in the form of a 'Business Intelligence' (BI) project). My problem is that my only choices for BI projects are: Analysis Service Project, Import Analysis Services 9.0 Database, Integration Services Project, Report Server Project Wizard, Report Model Project, Report Server Project. No "Data Transformation Project". I have SQL Server 2005 Developer's Edition. Might it be that DTS is not included in that version? If I can't use DTS, what choices do I have?
Hi! I'm new to SQL Server 7 and I hope I could get some help. I'd like to duplicate an empty database and use the duplicate for the transactions. I want the empty database to somehow act like a template so, whenever I want to, I could create a new instance of it. Problem is I don't know if it is possible to do that on SQL server (it's possible in Access). If it is possible, I hope any of you could tell me how. Thanks.