What Is Purpose Of Semi Colon After Procedure Name

Jul 23, 2005

I've seen some system sp's that have a semi colon and number after the
the name such as
create procedure sp_procedure_params_rowset;2
what does this do?

View 1 Replies


ADVERTISEMENT

Pass Semi Colon Delimited Parameter To Stored Procedure

Sep 16, 2013

I have a table with the following structure:

Code:
[tabid] [int] IDENTITY(1,1) NOT NULL,
[tabname] [nvarchar](50) NULL,
[description] [nvarchar](50) NULL,
[url] [nvarchar](50) NULL,
[parent] [int] NULL,

[Code] ....

I wrote a stored procedure that takes a string of values, seperated by semicolon as parameter. The procedure is below;

Code:
ALTER PROCEDURE [dbo].[selectUserTabsByRoles]
@var varchar(max)
AS
BEGIN
SELECT distinct * from tbl_tabs
where ( PATINDEX('%'+left(@var,1)+'%', roles) > 0
or PATINDEX('%'+right(@var,1)+'%', roles) > 0 ) AND parent is null and tabstatus =1
ORDER BY tabposition
END

My problem is, when I pass a parameter like 1; it fetches all rows with roles having 1. But I realised that the last row in the sample data does not have 1 as roles, but rather 11.

View 5 Replies View Related

Insert Semi-colon

Feb 22, 2007

Hi. I need to insert a semicolon into one of my fields in a sql server 2000 database. I have a height column and i was trying to insert height. i know i can't insert 4'5" b/c of the apostrophe and double quote, so i was trying to insert it like: 4'7"now i'm running into a problem with the semicolons. how can i insert the semicolons? thanks!edit:aparently this is removing the same things: here's what i'm talking about:http://www.thoughtreactor.com/img-0009.png

View 11 Replies View Related

How To Insert A Semi Colon Into A Table

Mar 15, 2004

How to insert a semi colon into a table is this possible

View 1 Replies View Related

Power Pivot :: List Separator Not Properly Recognize Semi-colon Instead Of Comma

May 19, 2015

I am using Excel 2013 64bit and use an english Excel version, but with a comma as a decimal seperator and semi-colon as a list seperator.

In Excel everything works fine, but PowerPivot does not properly recognize that I use a semi-colon for formulas.

PowerPivots lets me write formulas with the semi-colon and not the comma, so that is fine.

However, two issues appear:

the yellow smart formula help box that appears when you start typing a formula, thinks I have to use commas, so when I use semi-colons instead, it does not jump to the next parameter.This problem also causes parameters where I have to enter a table or field to not suggest me table and fields when I start typing.Sometimes the formula validation even throws me an exception, that my formula syntax is incorret, ebcause Id id not use a comma. However, commas also do not work. I have to do some weird playing around until it finally accepts my formula.

I hope this buggy behaviour gets fixed, but is there a way I can work around this without changing my formula/list seperator? I also do not want to use a German Excel version, because I am used to the english formulanames.

View 2 Replies View Related

Full Text Search With Characters Such As Colon Or Semicolon

Jun 20, 2008

Hi, I'd like to know if there's a way to get sql server NOT to ignore the colon when performing a full text search (CONTAINS) for a string "sometext:". At this moment the query works, only the results are not narrowed to the ones containing the specified colon. I've read about this and I saw that these kind of characters (word breakers and stemmers) are ignored and want to know if there's a way to work around this (obviously performing well - so LIKE fails the test). Thanks

View 2 Replies View Related

Semi-complex Query

Sep 6, 2007

Hi. I'm trying to figure out this query and I'm just having the hardest time with it. I've gotten my entire query figured out except for this last part. Basically, I have an events table (ClientEvents) which has events listed for clients. I'm trying to find out which clients have not completed their service. The begin service event is EventID=27 and the end service event is EventID=28. I'm trying to find the clients who are "missing" (well, not really missing b/c they are technically in the process of their service) EventID=28. This events table keeps a record of service so I can't really use the NOT EXISTS b/c a lot of clients have been serviced before. Does anybody have any ideas? Thanks!

View 9 Replies View Related

Deleting Semi Duplicates

Jul 20, 2005

Suppose that I have a table that contains a lot of records that areidentical except for an id field and a date-time-stamp field. ForexampleId Unit Price DTS1 A 1.00 Date 12 A 1.00 Date 23 A 1.00 Date 34 B 1.25 Date 45 B 1.50 Date 56 B 1.50 Date 67 C 2.75 Date 78 C 2.75 Date 89 C 2.75 Date 910 C 3.00 Date 10I want to cull out records that are duplicates in the units and pricefields. I want to use the max DTS as the criteria for which record ina set of "duplicates" will remain. So, If I get the right query, Ishould return withId Unit Price DTS1 A 1.00 Date 14 B 1.25 Date 45 B 1.50 Date 57 C 2.75 Date 710 C 3.00 Date 10Is this possible using a single query? If so, how? I am sure that Ican do this using code, but it will involve a bunch of loops andprocess time. I would prefer a cleaner, more elegant way. Thanks forany help.Jerry

View 4 Replies View Related

Left Anti Semi Join

Jul 20, 2005

Hi!Whether there is an example where is used "Left Anti Semi Join"?Join Bytes!

View 2 Replies View Related

Semi-additive Measure In Report

Aug 29, 2007

Hi, there,

I have a semi-additive measure in the report. This measure is additive across product groups (row) but not across the period (column). The period (column) can be drilled up to 1st Half (from Jan to June) and 2nd Half (from July to Dec).

How do I make the subtotal for 1st Half to retrieve from mth June and 2nd Half to retrieve from mth Dec?

Thank you.

Regards,
Yong Hwee

View 3 Replies View Related

Spooky Semi-dynamic Sql Update Statement

Nov 9, 2006

Hi,
I rewrote my working Sql statement to prevent Sql Injections. I copied some code I used in another project but this time I can't get it to work, possibly because it's an update statement and not an Insert one, which I used before.
Sorry for the boring question, but does anyone have a clue what's wrong with the syntax?
Here's the original code (I changed the parameter names for clarity and security):
    Dim conn As SqlConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)    Dim strSQL As String = "Update MyTable Set " & typ & num & " = '" & pname & "' WHERE personID = " & fid    Dim cmd As SqlCommand = New SqlCommand(strSQL, conn)
Here's the code from codebehind:
    Dim conn As SqlConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)    Dim strSQL As String = "Update MyTable Set (" & typ & num & ") Values (@" & typ & num & ") WHERE personID = " & fid    Dim cmd As New SqlCommand(strSQL, conn)    With cmd.Parameters       .Add(New SqlParameter("@" & typ & num, pname))    End With    TestLabel.Text = strSQL & "        " & pname    cmd.Connection.Open()    cmd.ExecuteNonQuery()    cmd.Connection.Close()   
Here's my test message; first the sql, then the new string to be inserted:
Update MyTable Set (picturename) Values (@pname) WHERE personID = 2       2_adin.jpg  
Here's my error code:
Line 1: Incorrect syntax near '('. 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.SqlClient.SqlException: Line 1: Incorrect syntax near '('.
Source Error:
Line 489:            TestLabel.Text = strSQL & "  " & pnameLine 490:            cmd.Connection.Open()Line 491:            cmd.ExecuteNonQuery()Line 492:            cmd.Connection.Close()Line 493:        End If 
I could understand it if I'd get an error in VWD Express for using dynamic variables, but they work correctly in the text message so I'm clueless. Any help is deeply appreciated!
Pettrer (VB, Sql Server 2000)
 
 

View 2 Replies View Related

Semi-Additive Measures Not Supported In MS SQL Standard Edition SKU

Feb 16, 2007

The Semi-Additive Measures feature of MS SQL Server 2005 is not supported in its Standard Edition SKU. How do solve this issue? What editions support the feature?

View 1 Replies View Related

What Is The Purpose Of Having SqlDataReader Here?

Jul 23, 2007

May I know what is the purpose of having SqlDataReader in Example A? I can see the same output when I tried out both. Should I use Example A or Example B? Currently, I'm using Example B since it is lesser code.Example A Dim objDR As SqlDataReader 'Create Data Reader

LoginConn.Open()
strSQL = "SELECT CountryID, CountryName FROM Country ORDER BY CountryName "
cmd = New SqlCommand(strSQL, LoginConn) objDR = cmd.ExecuteReader() 'Populate the DataReader ddlNationality.DataSource = objDR ddlNationality.DataBind() ddlNationality.SelectedValue = dvUserProfile.Item(0)("Nationality")LoginConn.Close()  Example BLoginConn.Open() strSQL = "SELECT CountryID, CountryName FROM Country ORDER BY CountryName " cmd = New SqlCommand(strSQL, LoginConn) ddlNationality.DataSource = cmd.ExecuteReader() 'Populate the DataReader ddlNationality.DataBind() ddlNationality.SelectedValue = dvUserProfile.Item(0)("Nationality")LoginConn.Close()

View 2 Replies View Related

SQL Replication For DR Purpose

Sep 26, 2005

Can you really use the SQL replication to mirror data to another server for the purposr of DR ? What is the best method ? I would want to be able to switch to DR very quickly, allowing users to continue work. Or is there something I should know ? I would be very grateful for any help. :D

View 3 Replies View Related

What Is The Purpose Of Using WITH NOLOCK

Aug 12, 2013

What is the purpose of using WITH(NOLOCK)?

View 3 Replies View Related

Purpose Of The Sql Row Type

Oct 30, 2007

From a research paper I got to know that in transformation of one to many relation ship, in the "many type we have collection atribute consists of attribuet key from the one type. If we have a single key we will use a collection of simple type. Otherwise, we will have a collection of ROW type.

My probelm here is,is there any conditions to be cecked before using ROW type?Can't we use MULTISET instead of ROW type alone?

Please help me out by ansereing this.

Thanks

View 1 Replies View Related

What Is Purpose Of N In SQL Examples?

Jul 23, 2005

What is the purpose of the "N" preceding the parameter values in theSQL examples?Here is an example copied from Books Online, SP_ATTACH_DB:EXEC sp_attach_db @dbname = N'pubs',@filename1 = N'c:Program FilesMicrosoft SQLServerMSSQLDatapubs.mdf',@filename2 = N'c:Program FilesMicrosoft SQLServerMSSQLDatapubs_log.ldf'I've found that my sp_attach_db routine works without the "N", but Ineed to know what it is that I don't know.Thank you everybody for all your help.

View 1 Replies View Related

Purpose Of 0E0, 100E0

Mar 28, 2008

In Chapter 7 of Microsoft Press "Inside Microsoft SQL Server 2005: T-SQL Querying" about use of TOP and APPLY, the authors use "TOP(0E0) PERCENT to TOP(100E0) ". What is the purpose of this 0E0, 100E0 notation?

View 5 Replies View Related

PURPOSE OF TRIGGERS IN SQL SERVER

Feb 21, 2008

WHY DO WE USE TRIGGERS IN SQL SERVER2005.
 WAT IS ITS IMPORTANCE.
AND SOME SAMPLES
PLEASE GIVE ME SOLUTIONS

View 2 Replies View Related

Purpose Of Dtproperties Table

Feb 4, 2002

What is the purpose of the dtproperties table? I looked in BOL and the references are pretty thin.

View 1 Replies View Related

What Is The Purpose Of A Database Owner

Dec 28, 2013

What is the purpose of a database owner i.e. the dbo.DBNAME that comes before the name of the database?

View 7 Replies View Related

What Is The Purpose Of Cube And ROLLUP?

Mar 30, 2007

Hai all !

What is purpose of Cube and Rollup?
Can u explain with small example?

Regards
Umapathy

Umapathy

View 1 Replies View Related

What Is The Purpose Of The ROWGUIDCOL Property?

Dec 4, 2007

Greetings,What is the point of Microsoft defining a ROWGUIDCOL property that canbe attached to a 'uniqueidentifier' column? This is defined as a columnthat is 'globally unique', but doesn't the uniqueidentifier datatypealready guarantee that? To make matters more confusing, they tell youin Books Online to add a Unique constraint because ROWGUIDCOL does notguarantee uniqueness...so what's the point?Apparently the only functionality attached to this property is that onlyone such column can exist per table and that it can be queried using the$ROWGUIDCOL keyword in SQL.Can anyone tell me the rationale for when to use this and when not to,or what the purpose of this property is?Thanks,Sam BendayanDB ArchitectUltimate SoftwareJoin Bytes!*** Sent via Developersdex http://www.developersdex.com ***

View 2 Replies View Related

User Without Login Purpose

Nov 16, 2006

HI, we have a database that has a user created without login. I was wondering why using a user without login? Is there a reason for this? Can we use this user and how since it is not mapped to any login?

Thank you,
Ccote

View 8 Replies View Related

Purpose Of OUTPUT Keyword In Sql Server

May 17, 2006

hello sirspurpose OUTPUT keyword with examples

View 3 Replies View Related

Purpose Of Writing Dates In This Format

Jan 15, 2007

hi Experts,what is the purpose writing a date in the following format:where x.event_date >= {ts '1980-01-01 00:00:00'}versus like this:where x.event_date >= '1980-01-01 00:00:00'what benifit does it add to later form of writing?Thanks in advance.schal.

View 4 Replies View Related

Any Idea What The Purpose Of This SPROC Might Be? (no Prizes, Sorry!)

Jan 19, 2007

I've been asked to document an application and I'm going through allthe Stored Procedures and trying to work out what they're supposed todo.Can anyone give me an idea of what the Stored ProcedurewsBookingListsGetAll below is trying to achieve? Is it incomplete? Ican't see any reason to pass in the Parameter, and what is the UNIONSELECT 0 all about?Many thanksEdwardCREATE Procedure wsBookingListsGetAll@DebtorIDvarchar(15)Asset nocount onSELECTfldBookingListIDFROMtblWsBookingListUNIONSELECT 0returnGO/* Table def */if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[tblWSBookingList]') and OBJECTPROPERTY(id,N'IsUserTable') = 1)drop table [dbo].[tblWSBookingList]GOCREATE TABLE [dbo].[tblWSBookingList] ([fldDebtorID] [char] (15) COLLATE Latin1_General_CI_AS NOT NULL ,[fldBookingName] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL,[fldAddressCode] [char] (15) COLLATE Latin1_General_CI_AS NOT NULL ,[fldEmail] [varchar] (250) COLLATE Latin1_General_CI_AS NOT NULL ,[fldFirstName] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL ,[fldLastName] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL ,[fldBookingListID] [int] IDENTITY (1, 1) NOT NULL ,[fldInvoiceNumber] [varchar] (15) COLLATE Latin1_General_CI_AS NULL ,[fldPayeeID] [char] (15) COLLATE Latin1_General_CI_AS NULL) ON [PRIMARY]GO

View 1 Replies View Related

Convert 0 Or NULL To 1 For Devision Purpose

Jul 20, 2005

hi,I have data like 0, null or some value in one column. I want to usethis column for devision of some other column data.It gives me devision by 0 error.how can I replace all 0 and null with 1 in fly.thanks in adv.t.s.negi

View 2 Replies View Related

What Is The Purpose Of The Rptproj.user File?

Dec 20, 2007

I'm concluding that...

.rdl files are critical and should be recorded in source control
.rdl.data is useful only in preview (saving trips) and therefore should not be recorded in source control
.rptproj file has useful datasource, path and deployment info and should be recorded in source control
.sln contains useful solution container info and should be recorded in source control
.suo contains user specific setting/preference info and should not be recorded in source control
.rds contains important data source info and should be recorded in source control

...but cannot find info on the purpose of rptproj.user file and therefore dont know if recording such files in source control is useful.

View 4 Replies View Related

What Is The Purpose Of [Reporting Currency].[Local] ?

Apr 28, 2007

Hello,



Below is the many to one currency conversion MDX query generated by BI wizard. I am having hard time understanding the purpose of [[Reporting Currency].[Local]. Can anyone explain, why do we need [Reporting Currency].[Local], how does it work in the conversion and where are the relationships established between [Reporting Currency].[Local] member and other measures/dimensions? Thanks.



// This is the Many to One section

// All currency conversion formulas are calculated for the pivot currency and at leaf of the time dimension

Scope

(

{ Measures.[Internet Sales Amount], Measures.[Reseller Sales Amount]} );

Scope( Leaves([Date]) ,

[Reporting Currency].[USD],

Leaves([Destination Currency]));



// Convert Local value into Pivot currency for selected Measures that must be converted with Measure rate [Average Rate]

Scope( { Measures.[Internet Sales Amount], Measures.[Reseller Sales Amount]} );



This = [Reporting Currency].[Local] * Measures.[Average Rate];

End Scope;



End Scope;



// This is the One to Many section

// All currency conversion formulas are calculated for the non pivot currency and at leaf of the time dimension

Scope

(

Leaves([Date]) ,

Except

(

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].Members,

{

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].[USD],

[Reporting Currency].[Destination Currency Code].[Destination Currency Code].[Local]

}

)

);



- SB.

View 1 Replies View Related

Get The Search Term From A URL For Reporting Purpose

Jul 10, 2007



Hi guys,

I have a field called URL in my table. I want to get the SEARCH TERM from a given URL and create a report based on that information. I'm getting difficulties, because the URL have different format depending up on the search engine
that the users use to browse. Some of the search engines are "google",".excite.com", "search.msn.","search.netscape", "search.lycos", "altavista", "search.yahoo" and many more.

Examples of the URLs from google :

http://www.google.com/search?q=S26+Collet+Chuck&hl=en&client=firefox-a&rls=org.mozilla:en-USfficial&start=30&sa=N -- The search term is S26 Collet Chuck
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLG,GGLG:2006-02,GGLG:en&q=kt21+kia -- The search term is kt21 kia
http://www.google.com/search?hl=en&q=Slagger+burning+Tables -- The search term is Slagger burning Tables


Does anybody have a sql query or used a CLR functions to get the SEARCH TERM from different search engine (URL).



Thanks in advance.

View 2 Replies View Related

Incorrect Use Of Update Trigger For Audit Purpose

Jan 24, 2001

I have a update trigger on a table which fires trapping the userid and time in the same record. The code is below. The tirgger only works if I have the recursive triggers option unchecked on databae properties. Is the way I am trying the only way to accomplish this in the update trigger or is there an more efficient way. Thanks

CREATE trigger tr_cmsUpdt_MARS on dbo.PATIENT_MEDICATION_DISPERSAL_ for UPDATE as
-- updates record with sql user and timestamp
--created 11-28-00 tim cronin
DECLARE @muser varchar(35),
@rec_lock_status int,
@ptacpt_status int
set @muser = current_user
begin
UPDATE PATIENT_MEDICATION_DISPERSAL_
set MODIFIED_BY = @muser,
MODIFIED_TS = getdate()
from deleted dt
WHERE PATIENT_MEDICATION_DISPERSAL_.RECORD_ID = dt.RECORD_ID
end
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO

View 2 Replies View Related

Create An Extra Table (for Audit Purpose)

Mar 28, 2008

Hi all, please help. I m trying to create an "empty" table from existing table for the audit trigger purpose.
For now, i am trying to create an empty audit table for every table in a database named "pubs", and it's seem won't work.
Please advise.. Thanks in advance.

Here is my code:


USE pubs

DECLARE @TABLE_NAME sysname
DECLARE @AUDIT_TABLE VARCHAR(50)

SELECT @TABLE_NAME= MIN(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES
WHERE
TABLE_TYPE= 'BASE TABLE'
AND TABLE_NAME NOT LIKE 'audit%'
AND TABLE_NAME!= 'sysdiagrams'
AND TABLE_NAME!= 'Audit'
AND TABLE_NAME = 'sales'

WHILE @TABLE_NAME IS NOT NULL
BEGIN

SELECT @TABLE_NAME= MIN(TABLE_NAME) FROM INFORMATION_SCHEMA.Tables
WHERE TABLE_NAME> @TABLE_NAME
AND TABLE_NAME = 'sales'

SELECT @AUDIT_TABLE = 'Audit'+''@TABLE_NAME''


SELECT * INTO @AUDIT_TABLE
FROM @TABLE_NAME

TRUNCATE TABLE @AUDIT_TABLE
ALTER TABLE @AUDIT_TABLE ADD UserAction Char(10),AuditStartTime Char(50),AuditUser Char(50)


SELECT @TABLE_NAME= MIN(TABLE_NAME) FROM INFORMATION_SCHEMA.Tables
WHERE TABLE_NAME> @TABLE_NAME
AND TABLE_TYPE= 'BASE TABLE'
AND TABLE_NAME!= 'sysdiagrams'
AND TABLE_NAME!= 'Audit'
AND TABLE_NAME NOT LIKE 'audit%'

END


Thanks. ..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved