Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score how to set variable using CASE?
Phill - 22 Jul 2006 11:31 PM - 4 messages
How do I set a variable using CASE.  This is my mess: IF DATENAME(dw,CAST(@strFromDate AS DATE)) = 'Monday' SET @i=6         --WHEN 'Tuesday' THEN         --    5 ...
Score Size of column of datatype Image
Jonas Mandahl Pedersen - 22 Jul 2006 7:36 PM - 6 messages
Dear NG I have a table in my database where I store key / value pairs for a dynamic form designer. It has the definition: ID INT, DATATYPE TINYINT, VALUE Varchar(250) ( I asume each row takes 4+1+length(value) bytes? ...
Score Get list of connected users on database?
Retf - 22 Jul 2006 5:39 PM - 5 messages
Hi All, How I get list of users that stay connected on my data base? Thanks ...
Score SQLCMD vs BCP
Lawrence - 22 Jul 2006 3:35 PM - 2 messages
Hello, I have the following BCP bcp.exe "SELECT * FROM LAW.dbo.A" queryout "C:\Test\Test.txt" -c -q -C1252 -T -S "SEA2-LawrenceB1" -t "," Current ResultSet (3 columns - 2 varchar, 1 int) Seattle,Lawrence,1 New York,Jeanette,2 ...
Score Temporary Tables
Chamark - 22 Jul 2006 1:26 PM - 5 messages
Using MS-SQL2000 User Level - Beginner My application needs to take variables from a Web form pass them to a table for my multiple Views to use. Currently I am using an already created table and doing a delete each time the application is run. I know this method can ...
Score T-SQL Query Help
Andrew - 22 Jul 2006 11:53 AM - 9 messages
Hi, I have the following SQL: select * from tblProducts where prod_name like '%example%' or prod_description like '%example%' How do I order the results such that the results found by the prod_name clause come first, followed by those found by the prod_description clause? ...
Score XQuery and case sensitivity
Helmut Woess - 22 Jul 2006 11:08 AM - 5 messages
Hello, i am trying to read values from an xml variable. In this i have the data from some records. And the records can (but must not) contain at first position a field called 'id'. And i want the value from 'id', if field ...
Score datetime filtering
Sa¹o_Zagoranski - 22 Jul 2006 9:37 AM - 10 messages
Hi, I have problem with forming a select statement and I was hoping someone could help... In my application the user can enter the date that the project started and the date when it ended. However, because some parts of the date can be null the dates are stored ...
Score Is it possible to join the resultsets of two stored procedures?
Curious Trigger - 22 Jul 2006 7:25 AM - 4 messages
Hi there, I want to use the stored procdures as parametrized views: for each table with historical information (and columns StartDate smalldatetime, EndDate smalldatetime) I want to create a stored procedure. Those procedures have a parameter 'Timepoint smalldatetime' and fetch all records from the ...
Score PRINT command in trigger
Curious Trigger - 22 Jul 2006 7:17 AM - 5 messages
Hi there, where can I see the output of a PRINT command which runs inside a trigger? May I configure SQL Server 2005 to write those PRINT-outputs to the eventlog or to a file? I know that PRINT outputs are shown on the 'message' tab in query analyzer, ...
Score query ???
x taol - 22 Jul 2006 6:53 AM - 5 messages
fDate    fProduct    fClr    fIn    fOut    fStock 03/06/2006    aa    xx1    3    2    1 ...
Score Unknown symbol: #
KTN - 21 Jul 2006 10:39 PM - 3 messages
I found this in a old stored procedure and wonder if anyone has seen it before?  I check BOL and could not find any explanation.  Thanks! select  columnA  from   TableABC where  ColumnB = @Val1   and ColumnC = #Breakout.Col1 ...
Score OLE Automation Failure Executing DTS via stored procedure
Pegasus40218 - 21 Jul 2006 9:25 PM - 6 messages
Our IT group has been running a number of DTS packages via stored procedures (the sp_OA... procedures) for some time.  Recently, we've started having a lot of problems with the OLE automation procedures failing.  The sp_OACreate procedure seems to work all the time, but the ...
Score datetime index
Kevin Jackson - 21 Jul 2006 8:58 PM - 2 messages
SQL Server 2005 SP1 I have a table with a datetime column called CreatedOn .  CreatedOn is indexed. This query uses the index and is lightning fast select     sum(compressedfilesize)  / (1024 * 1024) as 'Repo growth today' ...
Score Which Version of BOL is Installed?
Jordan S. - 21 Jul 2006 8:56 PM - 2 messages
SQL Server 2005. How can I discover if a particular computer has BOL SP1 installed (vs if SP1 for BOL is not installed)? Thanks. ...
Score Data warehousing primer?
Ronald S. Cook - 21 Jul 2006 8:53 PM - 2 messages
I'm looking for a 1-pager that will explain data warehousing simply, and preferably with examples (so I can prssent to/sell my boss). I.e... We have our normal OLTP database with tables like... Here is a simple star schema and why it's what we do ...
Score Global search and replace in SQL Server with data type ntext
msnews.microsoft.com - 21 Jul 2006 8:22 PM - 2 messages
Hello, I want to do a global search and replace in my SQL database where the data type could also be "ntext". I did find the code which works for (char, vachar, nchar, nvachar) Thank you for your help regards ...
Score Combining 2 select statements
randy1200 - 21 Jul 2006 8:20 PM - 8 messages
I have two select statements. The only different between them is in the where clause. Instead of returning "Community, Monthly Total" and "Community, YTD", I'd really like one statement to return "Community, Monthly Total, YTD". Any suggestions? Thanks, Randy ...
Score Tuning
markrr - 21 Jul 2006 7:50 PM - 2 messages
(I had posted this in another group that I realized is probably not the right one). I have a fairly complex SELECT statement.  It is running on a server with 8 CPUs and 8GB RAM (using about 6.5GB).  The statistics that I get ...
Score Log not shrinking
Scott - 21 Jul 2006 7:25 PM - 2 messages
I have an offline database that gets occasional updates maybe once or twice a week.  The attached script runs every night and each morning I check it for successful completion.  Today the log showed a size of 12 ...
Score SQL Server 2005 throught OLEDB : Named parameter problem ?
Sylvain Devidal - 21 Jul 2006 7:05 PM - 2 messages
Hello, I'm designing a web application that must be able to connect different databases. So I decided to use OleDb connector instead of SqlClient. While with SqlClient, I can run queries like "select * from mytable where col = @param" then giving a value to the parameter, I get an error when ...
Score significance of COLLATE
steve02a - 21 Jul 2006 6:56 PM - 3 messages
What is the significance of COLLATE in a database script file? I have db script I use for a piece of software I've created - and I have (and understand its meaning: COLLATE SQL_Latin1_General_CP1_CI_AS My DB works with or without that statement - so I'm trying to figure ...
Score Only text pointers are allowed in work tables. never ... image col
chieko - 21 Jul 2006 6:55 PM - 3 messages
Hello, I am using an insert statement in a stored procedure that insert and image datatype column into a table on a different sql server, same edition server 2000. It was working a few days ago in a job, but I had to stop the server to ...
Score Changing resultset to 1 row and 1 column
MittyKom - 21 Jul 2006 6:50 PM - 8 messages
Hi All How can i change the resultset of a query from being a column and several rows to just 1 column and 1 row? eg select * from tb1 The resultset is as below: Col1 ------ ab ac ad I would like it to come as below (that is as 1 column and 1 row): ...
Score Ingnorant about encryption with symmetric key and certificates
Dave - 21 Jul 2006 6:32 PM - 3 messages
I created a master key in my database...    create master key encryption by password = 'pw'; Then I created a certificate...     create certificate my_cert     with subject = 'encrypt cc numbers'; Then I created symmetric key... ...
Score Tuning
MarkR - 21 Jul 2006 6:31 PM - 6 messages
I have a fairly complex SELECT statement.  It is running on a server with 8 CPUs and 8GB RAM (using about 6.5GB).  The statistics that I get when I run it are below.  It is not the first time that I ran it so the execution plan ...
Score add a count column
Aussie Rules - 21 Jul 2006 6:16 PM - 3 messages
Hi all, I select two cols from a table, but I want to add another column that is just a number count. For example, selecting the top ten selling books returns Book A, ISBN Book B, ISBN Book C, ISBN ...
Score DateTime Formatting Question
Tom Andrecht - 21 Jul 2006 6:11 PM - 7 messages
I have a datetime field that I'm storing entries for activities in, but I need to retrieve the dates and times seperately (no problem there, Convert() saves the day for seperating them), but I need the Time in a 12 hour format ...
Score sql query testing
sakcee - 21 Jul 2006 5:43 PM - 2 messages
Hi I need to make test plans for some sql select queries, what conditions or things I should test? I was thinking of testing where clause for data types etc? any help is greatly appreciated thanks ...
Score Slow update on SQL Virtual Server 2000 on WIN2003 cluster
ikaliy - 21 Jul 2006 5:18 PM - 6 messages
Hello, I have noticed the difference in transaction handling between SQL Server 2000 EE installed on local WinXP machine and SQL Virtual server on WIN 2003 failover cluster. And this difference put me in big trouble. For example: If you need to update 100000 record (update of one integer field), ...
Score Need help with windows service being "database aware"
rhaazy - 21 Jul 2006 4:46 PM - 2 messages
My situation is this. using mssql 2000: I have a series of tables.  Each table is designated for a particular "profile" There are lets say 4 profile tables.  Each table has a list of assets in them.  Then the information pertaining to that particular profile ...
Score Stored Procedure Lock?
Lionstone - 21 Jul 2006 4:32 PM - 7 messages
Is there a way to keep a stored procedure from executing more than once simultaneously?  That is, if three commands to execute the procedure arrive nearly simultaneously on different connections, how can I make the requests queue up so that the procedure executes one at a time with no overlap, the ...
Score Help wit a complicated query
BK-Chicago - 21 Jul 2006 4:27 PM - 4 messages
I have a dataaset  like the one below: Qualifier    Date    Whole/Partial    Partial Count A    1/12/2000    W    NULL A    1/3/2001    P    1 ...
Score Developer Edition / Reporting Services
Brian Shannon - 21 Jul 2006 4:21 PM - 2 messages
I installed SQL server 2005 Developer edition on an XP box.  The Reporting Services option was grayed out so I was unable to install that module. Is that normal? Thanks. ...
Score Interesting Fundamental Questions about Tables
Rajesh - 21 Jul 2006 4:02 PM - 3 messages
Good Morning Sql Gurus  Please give me some inputs on the following issues. create table x (     col1    int not null,     col2     int null ) alter table x add constraint xpk primary key (col1) ...
Score grouping problem
Phill - 21 Jul 2006 3:51 PM - 3 messages
I am trying to return a result set in a cross-tab format.  My problem is that my date field has the time, thus returning more than one record for date instead of summing it.  How can I fix this?  This is my query: ...
Score Database/ Table Property
aacftc - 21 Jul 2006 2:57 PM - 5 messages
I have an applictaion where when I update/ insert any record in child tables, it calls update statement for parent table (poorly designed) so I want to know if there is any database/ table property which I can set to check run ...
Score Question on QUOTED_IDENTIFIER
John - 21 Jul 2006 2:43 PM - 5 messages
I have a very strange problem, it only happen to one SQL Server, other SQL Server seems to be fine I got the following error when trying to run a sp against one of the SQL  Server: SELECT failed because the following SET options have incorrect ...
Score Is there a function can convert a comma delimited string to int se
NeilB - 21 Jul 2006 2:27 PM - 4 messages
This might be a stupid question, i got a string "20,30,40", I want to use the string in the following SQL stmt: @user_id_list VARCHAR(400) .... -- now @user_id_list is "20,30,40" .... SELECT user_id from user_table where user_id IN ( ...
Score Case statement question
Goran Djuranovic - 21 Jul 2006 2:03 PM - 8 messages
Hi All, Is it possible to update a specific field based on the case statement? Something like this, for example: UPDATE Person SET CASE     WHEN HB = '1' THEN HasBrother = '1'     WHEN HS = '1' THEN HasSister = '1' ...
Score Any function in SQL Server similar to decode function in oracle ?
Amit20 - 21 Jul 2006 12:26 PM - 4 messages
Hi, Is there any function in SQL Server similar to decode function in oracle ? Thanks, Amit ...
Score SQL Server returning hierarchical records
archon - 21 Jul 2006 11:16 AM - 4 messages
does SQL Server 2005 have something similar to Oracle's START WITH CONNECT BY sql syntax, for returning hierarchical records? ...
Score ++ IIS + SQL (Not enough storage is available to complete this operation)
tolgay - 21 Jul 2006 10:34 AM - 4 messages
Sometimes we got an error (Not enough storage is available to complete this operation) from one of our servers which on win2000 sp 4 iis5.0 (all hotfix installed) sql server sp4. mdac 2.81. It occures random and we could not ...
Score vb and c# in single project?
NH - 21 Jul 2006 10:11 AM - 4 messages
I am pretty sure this is possible in .Net 2.0...? I  will build a web service in vb which will also include calling object written in c#. This will work wont it? ...
Score insert multiple row copies for lookup without cursor
adam - 21 Jul 2006 9:58 AM - 4 messages
I'm after some help with an insert that uses a select cursor that probably should not. The schema if for an existing application and cannot be altered. I do not have access to the source for this application [Table: Forms] ...
Score column dataType
simonZ - 21 Jul 2006 9:09 AM - 9 messages
I have function, which returns the dataType of some column in some table: declare @columnType nVarchar(50) set @columnType=dbo.colType('myTable','myColumn') It works, the result is for example 'varchar(50)'. Now, I would like to declare variable of this column type. ...
Score strong performance problem with a parameterized query
Silvere - 21 Jul 2006 8:49 AM - 3 messages
We have a strong performance problem with a quite complex query. The query executes in approximately 7 seconds in Query Analyser (which is okay for us), but takes much more time from ADO.NET : it timesout after 30 sec, or after 240 sec if we increase the timeout to that value. ...
Score Applying a function to a subquery
Steve - 21 Jul 2006 8:17 AM - 4 messages
Hi there, I have a function that splits data into intervals based on their timestamp as follows: ALTER  FUNCTION intervals(@begin DATETIME, @end DATETIME, @lengthInSeconds INT) RETURNS @intervals TABLE(interval INT PRIMARY KEY, interval_begin DATETIME, interval_end DATETIME) AS BEGIN ...
Score how to set null value from vb to sql server
vincentstudy - 21 Jul 2006 7:47 AM - 3 messages
hi to all,                 i am using sql 2000 server now i want to set null value to my table from visual basic code. i am try to some update query shown ...
Score Query from a dynamic table
Steven - 21 Jul 2006 7:46 AM - 7 messages
Hi All, I want to have a SQL statement which query from a dynamic table inside a store procedure. However, I have no idea on how to get it done. For examples: DECLARE @TABLE AS VARCHAR(10) SELECT @TABLE = 'MyTable' ...
Score Execution plan vs real life
Ole Kristian Bangås - 21 Jul 2006 7:29 AM - 6 messages
I hope the code sample below is well enough formatted and easy enough to read. In short: 1. Creating a table of 250k random data in tempdb 2. Run a batch of two statements, with actual exectuion plan on.    Execution plan tell these queries have the same cost, or very ...
Score Output Parameter Problem
Bahman - 21 Jul 2006 5:24 AM - 2 messages
Hi! In Studio 2005, I get nothing for my output parameter except sometimes the error: problem converting char to int (where you have @outputpar = @declarevar, etc.) The parameters are varchar(50). I tried char, nvarchar, etc. where should I look? Thank you! ...
Score Stored Procedure can not work perfectly for Big5 characters issue
Joseph - 21 Jul 2006 3:50 AM - 4 messages
Hi, all I have a question :         I created a stored procedure with 1 string type parameter [input], it can work perfectly when I use an input string with  Big5 characters if I ...
Score help on delete statement
S.G. - 21 Jul 2006 3:29 AM - 3 messages
Hi, I'm using SQL 2000. I have 2 tables, Invoice and Products. In 'Invoice' table, there are 2 cols: Invoice/invoicedate In Products table, there are 2 cols: Invoice/Productid At the front end 'Access", these two tables are linked using 'invoice' ...
Score 2005: Script Each Object To Own File
Jordan S. - 21 Jul 2006 2:50 AM - 2 messages
Is it possible in SQL Server 2005 Management Studio - to script multiple database objects; each to its own file (and NOT all into one single file)? This was obvious to accomplish in EM, but I didin't see how to do it in ...
Score Need help connecting to SQL Server using Windows account
Sam - 21 Jul 2006 1:52 AM - 9 messages
Hi, I want to use Windows authentication to connect to SQL Server 2005 from Access 2003 projects. I have two users in the company who need to access our SQL Server 2005 from an Access 2003 front end. I'm one of them but because ...
Score which version of SSMS is for developers?
=== Steve L === - 21 Jul 2006 12:06 AM - 2 messages
i have sql2k5 enterprise version installed on the database server. my question is what version of SSMS (client tool) I should install on developer's worksation? our developers mostly deal with .net applications and also report design, so they need to be able to deploy reports to reporting server. ...
Score Joining 2 select statement with like fields
Stopher - 20 Jul 2006 11:12 PM - 9 messages
Hi All, I have 2 select statement that return 2 sets of data. The tables have one field with like results. What I am trying to do is list the like field on the left and the 2 sets of results beside each other on the same data set ie. ...
Score Time And Only Time
Jim - 20 Jul 2006 11:04 PM - 5 messages
In SQL Server 2005, is there a way to retrieve only the time portion of a date/time field and ignore the date part? I have a DATETIME field and I do not care what the specific date is, I ...
Score Writing SQL: query builder or through the query analyzer?
VMI - 20 Jul 2006 10:14 PM - 4 messages
How do you guys prefer to write queries, by hand or by using the query builder? I'm used to writing it by hand, but a co-worker loves the query builder(he even hides the sql part). Should I just switch to query builder? ...
Score pure query question
x taol - 20 Jul 2006 9:33 PM - 2 messages
fld0             fld1      fld2     fld3 BRKT STRAP        36        3        54 ...
Score set datetime month from int
randy1200 - 20 Jul 2006 9:11 PM - 4 messages
The problem with the code below is that it ADDS the value of @year to the current @thedate value. I need to SET @thedate.year to the @year value. Any suggestions? Thanks, Randy declare @month int set @month = 3 declare @year int ...
Score * Question about SQL 2000 query
David R. - 20 Jul 2006 8:36 PM - 4 messages
In SQL 2000 Enterprise Manager, when I type this query: SELECT     * FROM         Users u, Companies c where u.CompanyID = c.CompanyID it always converts to: SELECT     * ...
Score TSQL to view a table's DDL
JohnnyMagz - 20 Jul 2006 8:06 PM - 3 messages
I want to script out a table's DDL (create table statement). I can do this through the GUI, but I don't know how to accomplish this using TSQL. Can anyone point me in the right direction? Many Thanks! ...
Score Is there a way to use a function like Replace on a Text data type?
awd - 20 Jul 2006 8:04 PM - 4 messages
Hello, The subject really says it all. Is there a way to perform the same job as Replace when the column is a Text data type? Thanks, Anthony ...
Score Views and CTEs performance problem
Rich - 20 Jul 2006 7:34 PM - 10 messages
I have a hierarchical structure to contain objects which maps users (belong to roles) to an ACL table for permissioning on these objects. I then need to create hierarchical XML based on the data hierarchy with the ACL access included. My lookup on the data is peachy, but I'm noticing that ...
Score varchar(8000) data being truncated to 4096
kbutterly@yahoo.com - 20 Jul 2006 7:20 PM - 5 messages
Good afternoon, all! I have a stored procedure that has an input parameter, @chvComments defined as text. The comments are getting in with the proper length, as shown by printing out len(@chvComments) in the body of the stored procedure. ...
Score Calculaing # of days elapsed between each visit
Eeraj - 20 Jul 2006 6:36 PM - 3 messages
given this dataset: CustomerNum        VisitNum        DateofVisit        1            1        12-Jan-2005 ...
Score User's default schema
dev648237923 - 20 Jul 2006 6:23 PM - 4 messages
I can query who the current user is (sp_who or select current_user) -- is there a a way to determine their default schema? Thank you! ...
Score SQL Server Job Notification
ameen.abdullah - 20 Jul 2006 5:54 PM - 3 messages
Hi Guys, Is there any stored procedure or sql statement to add notification for a job? The senerio is i have to create a job by using sps and i cant find any procedure for enabling/disabling "write to application event ...
Score Adding a space in a field
Eli Feng - 20 Jul 2006 5:44 PM - 20 messages
A workaround to fix an application issue requires to insert a space in an Address field. Using UPDATE tablename SET Address = ' ' in Query Aanalyzer seems do not fix the issue. This Address field is varchar and allows nulls. I'm not sure if I hit the space bar in the Default Value line under the ...
Score Document management is SQL Server
Wes - 20 Jul 2006 5:03 PM - 2 messages
Current sturucture: We have a small web server farm that includes two machines. One machine contains the folder where all uploaded document are stored. The other machine links to the documents vai a mapped drive. Meta data about the files is stored in a group of tables in a SqlServer 2005 ...
Score Another Instance of SQL Server
Rafael Chemtob - 20 Jul 2006 4:56 PM - 2 messages
hi, i created another instance of MS SQL Server on server BESQL01.  this new instance is called BESQL01A.  i'm trying to connect to it from a web page and it's giving me an error saying the server doesn't exist. ...
Score incrementing a counter in sql
Kelly - 20 Jul 2006 4:44 PM - 4 messages
I need to create a table with two values - old no and new no the old no should come from an existing table and the new number should begin with a starting value and increment by 1 how do i do this???? From [link] Posted via DevelopmentNow.com Groups [link] ...
Score UPdating a table column with substring of another column
mavrick_101 - 20 Jul 2006 4:36 PM - 3 messages
Hi, I want to update a column based on substring  of another column (of the same row and same table). How can I do that? Thanx. ...
Score Can't use Shared Memory protocol to connect
Mike Kansky - 20 Jul 2006 4:21 PM - 12 messages
I have .NET web application that connects to SQL 2005 using the following connection string: server=(local);database=db1;uid=sa;pwd=pasword;min pool size=0;max pool size=100;connect timeout=10; I assumed that if i use (local) for the server name, and the .net ...
Score scripts fails under ADO but no error returned.
Otis Bricker - 20 Jul 2006 4:07 PM - 5 messages
I am trying to run a script through ADO that changes the schema of a table. if not EXISTS (    SELECT *         FROM   dbo.syscolumns         WHERE (name = N'owner') and id = (SELECT id from dbo.sysobjects     ...
Score Easy question about combining queries
Jibber - 20 Jul 2006 4:04 PM - 3 messages
I am somewhat of a T-SQL beginner, so excuse the simple question. I need to perform the following queries, but I am sure they could be combined into a more efficient single query. How would I combine these into the most optimal ...
Score merge two date ranges with overlap from two tables
Jason - 20 Jul 2006 3:28 PM - 10 messages
Hi everyone:    I have two tables: pat01 record patient status1 from date to date. patientID       startdate             enddate          status1 ...
Score Default text case
john d - 20 Jul 2006 3:12 PM - 10 messages
In the database design - how can you force the input and output in a particular field to always be in UPPER CASE? re:  Field Name:    Net Qualifier    nvarchar 255 sample output   "oz"   required  "OZ" ...
Score Query to values from two different tables with outer join
jp - 20 Jul 2006 3:09 PM - 2 messages
Hi, Been looking at this a while and can't quite work it out. I want to add the values of columns over two tables. Ideally I'd like to be able to specify multiple pairs of columns, but initially adding a single pair would be a ...
Score Complex Query in SQL Server 2000
NJ - 20 Jul 2006 2:51 PM - 4 messages
I need to calculate the Amount in the Main table using the other three tables. Main: Account                Desc        Amount ...
Score Pls help! Recursive retrival function
Farmer - 20 Jul 2006 2:47 PM - 3 messages
Thank you for taking a look at my issue. Given schema and data below, I am trying to build a function that will do the following: Given an OrderItem that is oriIsMfg = 0, non manufactured item, and considering recursive relationship of this Bill of Materials, return the first parent manufacturable item  oriIsMfg = 1 that is scheduled on production order and its (prdID). ...
Score Inner join of one table with two aliases
VMI - 20 Jul 2006 2:33 PM - 5 messages
We have a one table that has a record with the summary and all the records of that summary.  For example, on this same table there may be a record with the summary of the product (i.e. "PC") and five other records with the components ...
Score Searching for Close Variations
Jordan S. - 20 Jul 2006 2:25 PM - 3 messages
A customer just asked me to remove all spaces from the FirstName and LastName columns because they want for searches for [for example] "De Leon" to return anyone with the name spelled "De Leon" or "Deleon". I'd rather not remove spaces. ...
Score Sql Server 2005 Database mail error message.
Naana via SQLMonster.com - 20 Jul 2006 2:20 PM - 3 messages
Hi All, I keep getting the below messsage, when I sent a test email message from a Database Mail. I have a profile setup and the user is also added to MSDB DatabaseMailUserRole. I did install MS Outlook on the same machine and sent ...
Score how to kick all users out of a database
PamelaFoxcroft - 20 Jul 2006 2:14 PM - 4 messages
Hi I am doing log shipping on sql 2000 and want to kick all users out of the database before applying the backup or the log. What  I am doing is writing a cursor which will read sysprocesses to ...
Score Dynamic SQL - Execute (@var1+@var2)
zomer - 20 Jul 2006 2:03 PM - 3 messages
Hi all, I have a SQL statement that is longer then 8000 characters. So I have split it up... store it in two variables.... after Execute (@var1+@var2).... i get a select statement with parameters in it and is run by SSIS dynamic SQL task. ...which should store it in a string ...
Score SQLCMD / OSQL / ISQL - Having to hit enter and then type go again.
JasonDWilson - 20 Jul 2006 1:39 PM - 2 messages
Is there any setting in SQLMCMD and hopefully in ISQL/OSQL as well, that when I type a query and hit enter it will run/submit the query without having to hit enter, then type go and hit enter again?  I was hoping a ';' would work, ...
Score Run Application Whit Parameter from Sp
taha - 20 Jul 2006 12:47 PM - 3 messages
Hi All How Can I Run Application Whit Parameter from Sp Example Run Notepad whit file name myfile.txt Thanks ...
Score Run Application Whit Parameter From Sp
taha - 20 Jul 2006 12:45 PM - 3 messages
Hi All How Can I Run Application Whit Parameter from Sp Example Run Notepad whit file name myfile.txt Thanks ...
Score FOR UPDATE
JP - 20 Jul 2006 12:31 PM - 3 messages
Hi, Is there a equivalent to "FOR UPDATE" in sql server Select field1, field2 fom table1 for update Will lock the record being accessed by other transactions and release the lock when the transaction using it commits Thanks JP ...
Score SQL Parser
Bit Byter - 20 Jul 2006 11:41 AM - 3 messages
Hi, This may be a little OT, but I don't know exactly where else to post it. I am writing a little parser that generates valid SQL using "English like" text. I want to use this to allow non-technical users to ...
Score how to: INSERT IGNORE INTO?
R. Nachtsturm - 20 Jul 2006 11:04 AM - 8 messages
Hi, I have the following situation: a partitioned view as the target of a "insert into", with the source being an "select from" statement. the problem: the partitioned view requires a primary key, the source table however does not have either a primary nor a unique key and does have several duplicate ...
Score show dependencies of a fact table
Dia - 20 Jul 2006 11:00 AM - 3 messages
i have a fact table that a stored procedure use but have difficulting finding what populates the fact table... when i go to All Tasks > show dependencies on the fact table i get nothing? what's a quick way for me to find how this table is populated? ...
Score URGENT !!! SELECT * returning different set of records
Pradeep Kutty - 20 Jul 2006 10:50 AM - 7 messages
Hi All, On my production server, I see a peculiar behavior starting today morning. The issue is : I run select * from a  table which has 20165, but it keeps on returning 9000, 32000, 3000, 10000 etc.(never got the exact records) ...
Score SQL Server 2000 conversion of varchar to smallint
stainless - 20 Jul 2006 9:59 AM - 7 messages
I am selecting a column from table B that is a varchar and want to insert directly into a smallint column in table A. The value will always be an integer in display format e.g. 1, 2, 3 etc. So the varchar ...
Score TSQL bit manipulation up to 128 bits???
CyberDwarf - 20 Jul 2006 9:46 AM - 7 messages
Hi y'all Does anyone out there have a solution to the problem of bit manipulation when you need to operate on something bigger than a BIGINT? I have a requirement to manipulate up to 128 bits... Anyone tried bit-shifting and masking with a VARBINARY? (Joke) ...
Score dynamic sql in UDF
ivan - 20 Jul 2006 9:33 AM - 8 messages
Hello! I need to use dynamic sql in UDF. There are a lot of function in the database like: ALTER FUNCTION ...... (@Date1 int, @Date2 int) RETURNS @Result TABLE (a int, b int) AS BEGIN     INSERT INTO @Result ...
Score Timeout sql+asp
praeclarus - 20 Jul 2006 8:15 AM - 7 messages
Hi, I have a problema of query in an asp page, if I run the query in sql query analizer is time running it's about 3-4 seconds, if I made the same query in an asp page it create the error of timeout for the ...
Next » 2 3 4 5 6 7 8 9 10