|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
query question
tom taol -
24 Sep 2005 11:44 PM - 8 messages
there are the 2 tables. tbl_1 id animal fruit 1 "monkey" "apple" 2 "bear" "grape" 3 "rabit" "orange" 4 "cat" "banana" tbl_2 id xxxx number 1 "banana" 5 2 "orange" 3 ...
two tables select fields
jkmambo -
24 Sep 2005 9:33 PM - 3 messages
Suppose I have two tables A and B Table A has fields A1, A2, A3, ... A9 Table B has fields B1, B2, B3, ... B9 I want to select all fields in A and only B3 in table B. I dont want to ...
Security.
Colin Dawson -
24 Sep 2005 8:09 PM - 3 messages
Hi all. I have a security issue which I could do with some advice on. To date the solution to this issue has been to create a single static user on with admin rights to the entire server, but I don't like that there is a user with that ...
select 1 to 100 except recorded values
kursatturkay -
24 Sep 2005 7:17 PM - 1 message
is it possible without using union ? I have to get a query like this: for examaple : there is a number pool - range is from 1 to 100 and I have 3 records in a table that has numbers taken from this number ...
sql2005
JFB -
24 Sep 2005 6:34 PM - 3 messages
Hi All, I have XP pro with sp2 and I want to explore SQL 2005 developer edition beta 2. It's a way to connect to a database from sql2000 server from 2005 so I can continue with my work while I'm testing. ...
Key Lock
Ed -
24 Sep 2005 6:23 PM - 5 messages
Hi, I tried the following statement with two QA. Use Northwind Begin Tran Update customers set country = 'Mexicos' where country = 'Mexico' -- without commit/rollback here I open another QA with Select * from customers -- of course it is now showing anything since it is being blocked ...
Integer Arrays?
Joe Delphi -
24 Sep 2005 6:12 PM - 4 messages
Hi, I am writing a stored procedure and I was wondering if it is possible to declare an integer array as a local variable. I want to do something like this: DECLARE iRevenueTier(6) Integer ...
Locking selected rows for update
td -
24 Sep 2005 2:07 PM - 4 messages
Hi there, i've got the following problem: For the project i'm in, i have to design a application which is for inputing some data from scanned inventory sheets. There are a number of users, which have to have access to this sheets for type in. ...
Truncate / Delete
Ed -
24 Sep 2005 12:46 PM - 2 messages
Hi, I would like the know how Truncate and Delete both commands affect the result of backup / restore procedure(s) and how I am able to test it. Tks Ed ...
Passing Variable as parameters
free70@community.nospam -
24 Sep 2005 10:20 AM - 4 messages
I am trying to pass two parameters to a stored procedure that works fine when I use the code, for example: param_user.Value = "blahblah@com" The problem is the value I need is in a variable, but when I use: ...
using sp_attach_db in remote system
uday -
24 Sep 2005 7:47 AM - 3 messages
I have my application installed on one server and SQL server installed another system, which my application uses to log the data and rerieve the data. I want to check for the physical mdf and ldf files, if they are present, i ...
Triggers - run for multiple updated
Vanessa -
24 Sep 2005 5:18 AM - 20 messages
I am new to trigger and I have following question. I have two tables: "Customer" & "AccountDetails". "Customer" stored customer's personal information, so one customer will be at one row. "AccountDetails" stored all the accounts information which tie to each ...
parsing varchar fields
Scott Marquardt -
24 Sep 2005 4:53 AM - 22 messages
What are some good strategic approaches to using freeform text fields for data that needs to be queried? We have a product whose tables we can't change, and I need to count on a "description" field for storing a value. ...
Default Constraints (call: User-Defined Function or proc)
ReTF -
24 Sep 2005 4:17 AM - 3 messages
Hi Have any way to call User-Defined Function or proc of a Default Constraint?? INT CONSTRAINT test_df DEFAULT dbo.myFunc() Thaks ...
Stored Proc - DELETE FROM @TableName
hushtech -
24 Sep 2005 4:07 AM - 10 messages
I'm attempting to delete contents of @TableName where @TableName is an input arg to my stored procedure as follows. How do I execute this query? Or is there a simpler way to do this? This must be really trivial I suspect. ...
INSTEAD OF INSERT trigger
Just D. -
24 Sep 2005 1:36 AM - 11 messages
Is it correct to write this way? Does it mean that the trigger will not call itself as a recurse? I wrote a INSTEAD OF INSERT trigger working with the same table where it's stored, the trigger checks if the record with same properties already exists ...
Date Overlap Algorithm
YCI -
23 Sep 2005 11:45 PM - 2 messages
Hi all, I'm looking for an efficient algorithm that will aid us in date overlap comparisons. Everything we've come up with so far is not reasonble performance wise. Here is the scenario, I'll keep this as generic as possible: ...
UTC time difference between EM and Query Analyzer
dba56 -
23 Sep 2005 10:02 PM - 6 messages
I have a table that stores UTC dates. When I open the table in EM, the time is shown in 12 hour format. When I execute a select statement against the same table in Query Analyzer, I get the time in 24 hour ...
Best SQL IDE???
Robert Davis -
23 Sep 2005 9:26 PM - 6 messages
Anyone have any thoughts on the best IDE for SQL Server development? I'd like object explorer, drag-and-drop, code formatting, code completion, code analysis, execution, query builder, the WORKS! I've tried RapidSQL, having gotten excited by their online demo, but I have not found it well-behaved. ...
dynamic sql and replacing double quotes with single quotes
JT -
23 Sep 2005 9:06 PM - 3 messages
i know, i know, dynamic sql=bad idea... anyways, what is the correct way to write this statement in dynamic sql- i can't seem to get it right.. im just trying to replace all double quotes with single quotes in my ...
Looking at the scripts, I discovered that they both had something in common:
JT -
23 Sep 2005 8:46 PM - 3 messages
Today, I needed to compare summary totals between 2 different (but related) financial reports. Under normal circumstances, the reports are scheduled to run in sequential order, but I fired them off simultaneously in seperate Query Analyzer windows. These reports have never failed in production... until today. ...
service pack 4
bagman3rd -
23 Sep 2005 8:41 PM - 2 messages
Is there any possible reason that I should not go ahead and install SQL Server service pack 4 on my servers? Thanks. Archer ...
SQL Server 2000 to Oracle
parmel -
23 Sep 2005 8:24 PM - 5 messages
I need to access Oracle 9i from SQL Server 2000 to get the next number from an Oracle sequence. What is the simplest way to do this? Is a Microsoft ODBC driver the answer? ...
I keep getting this error when i send a large document into sql server with ADO.NET System.Data.SqlC
Daniel -
23 Sep 2005 7:51 PM - 3 messages
I keep getting this error when i send a large document into sql server with ADO.NET System.Data.SqlClient.SqlException: XML parsing error: Not enough storage is available to complete this operation. I have about 8 gigs of memory on the machine and sql server isnt using even half of it. any way to ...
locking question - hopefully a quick answer
unc27932 -
23 Sep 2005 5:34 PM - 7 messages
I've got two identical tables, Table A and Table B. Users are constantly entering data into Table A. I want to lock the data entry, move all the data cleanly from A to B, delete everything from table A, ...
Why does update run differently standalone vs in procedure?
Snake -
23 Sep 2005 5:14 PM - 8 messages
I have a standard update statement which runs for 5 hours in its stored procedure. When I cut/paste the update statement out of the procedure and run in Query Analyzer it runs in 2:16. There is one input parameter, so when I ...
SELECT different columns based on the value of another column
Chris -
23 Sep 2005 3:26 PM - 10 messages
Is it possible to select different columns in a query based on the value of another column. E.g. I have a query which has a column called MyYesNoField (bit). If MyYesNoField is 0 then I want to return 3 columns from a joined ...
Security, Procs, views and ASP .NET
DazedAndConfused -
23 Sep 2005 3:21 PM - 3 messages
For all access to the database I am forcing the ASP .NET account to use procs and views and allowing no direct access to tables, will that protect the database from access via IIS? Is that the common approach? ...
Subquery Question
Mike Labosh -
23 Sep 2005 3:09 PM - 10 messages
SELECT DISTINCT ssa.CMRKey, ssa.ContactphoneNumber FROM SampleSourceArchive ssa WHERE SampleSourceKey = @sampleSourceKey AND CMRKey IS NOT NULL -- is this line not needed AND ssa.ContactPhoneNumber > '' AND NOT EXISTS ( SELECT CMRKey, PhoneNumber FROM CMRPhone ...
copy table from a server to another server
Kevin -
23 Sep 2005 2:39 PM - 5 messages
hi guys, I have a question about copying a table's data from one server to another server. I want the fastest way to do it. basically, I'm using DTS wizard to copy but it takes more than 10 minutes because there are a lot of ...
question about yukon version
Kevin -
23 Sep 2005 2:30 PM - 4 messages
Hi guys, I know Yukon is still in beta 2. But I'm wondering if Beta 2 have different builds. I downloaded Yukon beta 2 6 months ago. So has Microsoft have a different builds since then? If they have, I will update to new build. Do you guys ...
Insert Error: Column name or number...
mlu -
23 Sep 2005 2:13 PM - 8 messages
I'm having: «Insert Error: Column name or number of supplied values does not match table definition.» with the following query: INSERT into table1 /* table1 is in SqlServer database */ SELECT * FROM table1 dest ...
Database Size
Aleks -
23 Sep 2005 1:26 PM - 4 messages
Hi, I have a web application (MS SQL 2000 / ASP). Database has grown from 20 MB to 400 MB in the last year or so. I am a little concerned about the size and how to be prepared when something needs to be done in this sense. ...
Question about referencing UDFs
Dwayne King -
23 Sep 2005 1:15 PM - 9 messages
OK - I've found pieces of the answer to this question in various places, but never a complete one. When referencing UDFs from TSQL, I know that table functions do not require a "dbo." prefix (or any prefix for that matter), and that scalar functions do ...
Cascading Triggers Part II
Michael Maes -
23 Sep 2005 12:57 PM - 1 message
Hi, Since Allowing Nested Triggers is DataServer-Wide, it is quite dangerous to "depend" on it. In Fact, someone (or some program) might turn them on/off... Is it therefore a good practice to include a Checking SP in every Trigger ...
which would be preferred
rodchar -
23 Sep 2005 12:38 PM - 8 messages
hey all, i have 3 fields in a table that are of interest for searching. Which would be better to do or faster or efficient? concat all three fields and perform my LIKE search over that field or saying (field1 like 'this') or (field2 like 'this') or (field3 like 'this') ...
Vertical to Horizontal
XXX -
23 Sep 2005 12:00 PM - 5 messages
I have a table which stores rows for same ID vertically: ID Attribute 1 1 1 2 1 XX ...
query based on a field in the same row
Helen -
23 Sep 2005 11:49 AM - 10 messages
I have two tables ItemsPinax , ItemPerson. The first table has these fields ItemPinax_CODE,ItemPinax_AMM,ItemPinax_FUNCTION with values: A0_01 1,37 ...
Insert into select problem
TomislaW -
23 Sep 2005 11:12 AM - 4 messages
example: use northwind DECLARE @TemporaryTable TABLE( Row int IDENTITY(1,1)PRIMARY KEY NOT NULL , CustomerID NCHAR(5), OrdersNumber int ) INSERT INTO @TemporaryTable SELECT distinct Customers.CustomerID,COUNT(Orders.OrderID) FROM Customers INNER JOIN ...
Duplicate row
balakarthik -
23 Sep 2005 10:26 AM - 8 messages
hi all, IF i had one table. in that table three records are there.all there have same datas.there is no primary key.how i can delete the second row in that table regards bala ...
Need help with sql-query using group by
SteveSu -
23 Sep 2005 9:53 AM - 5 messages
Hi! I have a table which look like this: Country | Ordinal | Value US 1 sjja US 2 ksjaj ...
almost duplicate records
Jason -
23 Sep 2005 9:32 AM - 4 messages
Hi, Is there a way to 'merge' almost duplicate records. I have records which are the same but the other duplicate record can differ from the other. Normally i just delete the duplicate records, but in this case i ...
Bug? pessimistic row size calculations
Hugo Kornelis -
23 Sep 2005 9:01 AM - 3 messages
Hi all, Just came across some strange behaviour - see the simplified repro below. Is this a known bug? -- Make a table with long rows. According to my calculation, -- maximum row size = 4 + 8000 + 40 (maximum data size) -- + 1 (NULL bitmap) + 2 (1 or more variable length columns) ...
Cascading Triggers
Michael Maes -
23 Sep 2005 8:34 AM - 7 messages
Hi, I have 3 Tables with After Update Triggers. They all cascade like City -> Province -> State (as a simplified example) If I Update a bit (A) in City, a Trigger Sets a bit (B) in Province. If I Update the bit B in Province, a Trigger Sets a Bit (C) in State. ...
Storedprocedure > Table name as parameter
Hari Krishna -
23 Sep 2005 7:39 AM - 2 messages
Here i am in confusion to slove my probem. pls help me Here i am going to develop project backend as Sql server Here i have a doubt in Storedprocedure. I think u can slove this. My problem is like this ...
Select qry is not working properly
K R Lal -
23 Sep 2005 7:37 AM - 3 messages
Hello, I am writing an sql qry for cursor function. the Select qry is not working properly. please check this and help me declare @m as varchar(20) declare @mm as varchar(400) set @m='r-01,r-002' set @m=char(39)+replace(@m,',',char(39)+', '+char(39))+char(39) ...
Sql2k in a xp home
Enric -
23 Sep 2005 7:01 AM - 3 messages
Dear folks, I'm trying to install sql2k into a workstation which have installed XP Home but the wizard is complaining telling that only clients tools will be installed and the server ones must be remote. Does anyone know how do I for avoid this? ...
Torn over a normalizing decision
Earl -
23 Sep 2005 6:34 AM - 12 messages
I'm still cleaning up this old app with its accompanying database. I've found an issue that I'm really torn about whether or not to normalize. I have a field in many of the pricing tables for the pricing method. At this ...
Time zone problem
JC Voon -
23 Sep 2005 3:39 AM - 4 messages
Hi: Our client in Australia will be using a centralized database server and Citrix for all the branches. Melbourne & Sydney are GMT+10:00 where Adelaide is GMT+9:30. How can i configure the SQL server so that the client in different ...
Access to SQL
Patrice -
23 Sep 2005 2:37 AM - 3 messages
Hello, How can I turn the following Access query into a SQL query? Every time I try, I get Cartesian product SELECT dbo_CLIENT.CLIENT_NUMBER, dbo_CLIENT.LNAME1, dbo_CLIENT.FNAME1, dbo_CLIENT.INIT1, dbo_CLIENT.LNAME2, dbo_CLIENT.FNAME2, dbo_CLIENT.INIT2, dbo_ADDRESS.ADDRESS1, dbo_ADDRESS.ADDRESS2, dbo_ADDRESS.ADDRESS3, ...
a query using GROUP BY or?
Just D. -
23 Sep 2005 1:36 AM - 4 messages
Is there a simple way to do the following? The database table has many records, each record has its own unique RecordID (PK, int), some of the records can have one text field like an intenrifier (SomeID) with the same value. A simplified schema is looking like this: ...
Scripting out permissions for stored procedures...
Brett Davis -
23 Sep 2005 12:56 AM - 2 messages
Hello, I want to be able to script out the permissions on my stored procedures e.g. the GRANT EXECUTE statement but NOT the stored procedures themselves. I noticed in EM that you can script the objects and INCLUDE the permissions on ...
Concurrent access problem...
Deep Silent Ocean -
23 Sep 2005 12:43 AM - 3 messages
Hi All I am developing portfolio management application. In this application i am fetching data from database and populate to dataset and that dataset is getting binded to the datagrid... it is multiuse application and one portfolio is getting accessed by more than one user. somehow i want to ...
float to decimal without rounding
Disney -
23 Sep 2005 12:12 AM - 2 messages
select 'Customer_Greeting_Section_total'= Case when Customer_Greeting_Section_total is null then 0.00 else left (ROUND(Customer_Greeting_Section_Total , 2, 1),4) end from DTSTEMP1 The col is defined as float When I run this I get Server: Msg 8115, Level 16, State 8, Line 1 ...
Unions and index by
tshad -
22 Sep 2005 11:43 PM - 7 messages
Is there a way to do a union of 2 tables, keep them separate and sort the tables separately? I know you can only have 1 "order by" per union. For example: SELECT id=convert(varchar(11), au_id), last_name = au_lname, ...
Avoid triggers in condition
Kirsten -
22 Sep 2005 10:57 PM - 7 messages
I have a insert/update trigger on MYTABLE. Is it possible to avoid/deactive this trigger under certain conditions? For example, when I run a stored procedure. Any ideas? Maybe setting somekind of temporary variable and unsetting it after the store proc has run? ...
Large Inserts, TempDB Growing
Mark -
22 Sep 2005 10:44 PM - 3 messages
I have a query that's joining a messload of tables to populate a single table used later for OLAP reporting. The source tables, and the OLAP table are in different databases. Basic Form: INSERT INTO OLAPDB.dbo.SomeTable SELECT lots_of_columns ...
GROUP BY and aggregate functions not supported with FOR XML AUTO
MittyKom -
22 Sep 2005 10:36 PM - 3 messages
Hi All I am trying to ouput the results from my query in the form of XML. The query is like this: SELECT a, b, COUNT(S.c ) AS x FROM s GROUP BY a,b ...
Help with Insert statemnt selecting from Access database
Alpha -
22 Sep 2005 10:26 PM - 9 messages
Hi, I need to select and later Update a database with information I select from a Access 2000 database. In the following T-SQL, I want to select only one record for each VName not already exists in my database. Since each ...
Need to return a column with '1' and '0' value as 'Active' or 'Disabled'
Robert G via SQLMonster.com -
22 Sep 2005 9:50 PM - 6 messages
Hello, I'm running a simple query that has a field named "Active". The "Active" field has either a value of "1" or "0" ('active' or 'disabled'). However, instead of returning a "1" or "0" (values stored in the db) I need ...
Mulitple Create Views in Query Batch
tshad -
22 Sep 2005 9:40 PM - 17 messages
I have a script that I am running from a Query Analyser that I want to put into a SP eventually. In the script, I have 5 Create Views (which I drop when the script exits). But I have to have "GO" after each Create View or I will get an error: ...
Return only the SUM of numbers in address field
James Ma -
22 Sep 2005 9:16 PM - 3 messages
I want to be able to return only the SUM of those numbers in an address field. What is the best way to do this? Address Field: 1746 Wellesley P.O. Box 3175 4141 65th Street 773 Florecita Terrace Should return: ...
sort of simple query i think....
Justin Rich -
22 Sep 2005 8:48 PM - 2 messages
I need to get the record count for all tables in a DB and get the description of that table (which is stored in another table) i need something like this. for each (exec sp_tables @table_type="'TABLE'") select count(*) as cnt from TABLE ...
Load from several CSV files
XXX -
22 Sep 2005 8:29 PM - 3 messages
I have to load around 68 CSV files into one table. I have named the files 1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to load these. I am not very proficient with VBScript ...
Database Design Advice
Yofnik -
22 Sep 2005 8:29 PM - 4 messages
Hello all, I am looking for some advice on the design of a database for a particular application I am tasked with. The database is part of an equipment monitoring application that records numerous equipment data readings and stores them to a database. The readings are taken every ...
only each first item from a select with group ....
Xavier -
22 Sep 2005 8:26 PM - 3 messages
i want to get only the first (max sum ) value of each grouped item after a select example of the returned records where: two columns (grouped value company and sum sell price) in the table there are a nr of entrys of each company ...
Rename and Stored procedure
microsoft.public.dotnet.languages.vb -
22 Sep 2005 7:52 PM - 3 messages
Hi All, I have been working on the following problem for more than two weeks but without any luck. We have ftp server on windows 2003 exchange server with IIS 6.0. There is a DSN to connect to SQL Server 2000 databases from the FTP site. ...
Adding an "indicator" number
Patrice -
22 Sep 2005 7:36 PM - 5 messages
Hi, I'm sure this is real easy, I just want to make sure that I do it the right way, so I'm going to ask the question. I need to put an "8" or "9" in front ...
Outer Join with 3 tables
Chuck -
22 Sep 2005 7:07 PM - 5 messages
Hope this is as easy as I think, but I am struggling to find answer in BOL, etc. I have 3 simple tables and want to link them on the same field, "ProductID". The first table has all productid's on open SalesOrders and the qty sold. ...
Strange Timeout problem.
Steve Zimmelman -
22 Sep 2005 6:33 PM - 15 messages
We have an application that has been running fine for several months. Then this morning everyone in the company is getting timeouts when attempting to save image data (tif). It seems to work if the image data is only a few a KB. But anything over ...
DTS Help
XXX -
22 Sep 2005 6:32 PM - 4 messages
I have around 400 different Select -- Insert queries getting data from 200+ tbles. Data in each table can vary from 1 million to 3 million. All the data is being inserted in the same table. What's the best way to do this? Insert statement obviously wouldn't work. Is ...
Returning numbers formatted as a percent
Ben -
22 Sep 2005 5:52 PM - 5 messages
I have a stored procedure that feeds a graph in an access ADP, and the numbers are being sent as 0.883838..... can i format the number being returned from the stroed procedure to a percent? (ie 88.38%)? and also, how ...
Q: Tricky question...
Visual Systems AB (Martin Arvidsson) -
22 Sep 2005 5:12 PM - 5 messages
Hi all gurus out there ;) I have a cutstomer table, now i want to find a span of customerid's in this table. Lets say the customerid's that are taken are: 1-10, 11-13, 15, 18, 20-33 and so on. ...
Convert real => decimal (3,2)
Stephan Zaubzer -
22 Sep 2005 5:11 PM - 4 messages
Folks, How can I convert a real value to a decimal value? As long as the real value is not zero I am getting an arithmetic overflow error. I tried both convert and cast. Does anyone have an idea? Cheers ...
EXEC SP w/Function
jroozee@gmail.com -
22 Sep 2005 5:09 PM - 9 messages
I have a stored proc called "dbo.SetSettlment" and a used defined function called "dbo.GetSIFByType". The function works great, and so does the sp. Problem is, I can't get them to work together. See below, I have three statement. The first two work fine, the last ...
Merging 2 varchar columns into 1
Drew -
22 Sep 2005 4:55 PM - 4 messages
We have a small application that holds text data for a report. Currently it looks like this, RegNo - ID of the person MostImportant SecondImportant ThirdImportant This has changed and now they only want Important (since it is hard to ...
Select Statement based on Date Criteria
Leslie -
22 Sep 2005 4:49 PM - 2 messages
I am trying to extract data based on the following: Select * from table where datefield < OneMonthAgo WHen I try the DATEADD, it gives me everything from one month ago to today. I want everything on the other side of one month ago. ...
How to find top 3 zipcodes in each of the top 5 counties
JJA -
22 Sep 2005 4:46 PM - 3 messages
Using SQL Server 2000, I am trying to produce a showing the top 3 zipcodes in each of the top 5 counties. I have tried lots of variations and I am really stuck. I get 393 rows in the final resultset where I ...
pulling my hair out over udf and dynamic SQL
simon.wilkinson -
22 Sep 2005 4:31 PM - 10 messages
Hi, I hope someone can help me. I have a stored procedure that creates some dynamic SQL which is used to populate a payroll system with timesheets information. As part of the SQL that is created a udf is called to calculate the employees base ...
How to: Find varchar columns in a table
JDP@Work -
22 Sep 2005 4:14 PM - 5 messages
How can I find all the varchar columns in a table? I'm looking for an existing empty or null column rather than add a column. There have been quite a few un-used columns that were added years ago for ...
Sql Server does not exist or access denied error
zombie -
22 Sep 2005 4:11 PM - 4 messages
Hi, I installed sql server 2000 developer edition (SP2) on Windows NT 5.2. This machine (SQL01) is on the same network. When I use enterprise manager on my desktop and try to add new sql server registration, I dont see SQL01 on the list ...
length of text in row in table
greg -
22 Sep 2005 4:00 PM - 7 messages
hello, we are using a third party issue management system. On the back end it uses SQL 200 sp3. it has different tables for different types of documents (issue, sir, rick, etc...) and columns for properties on the documents (created by, assigned ...
Book Recommendations
tom -
22 Sep 2005 4:00 PM - 14 messages
Hello - My background is networking and system administration. I know basic programming constructs, and have done .bat, VBA, and *nix shell scripting/programming. I am looking for, at most, two books that can help me in my new role as DBA. Most of my SQL work will be bringing ...
Counting People in time
Scott M -
22 Sep 2005 3:56 PM - 3 messages
I'm trying to count the number of people that I have in a building at any given hour from a table that basically looks like this.... CREATE TABLE InOutTimes ( In_Date smalldatetime NOT NULL, Out_Date datetime NOT NULL ) go INSERT InOutTimes VALUES ('8/1/01 08:00:00', '8/1/01 10:00:00') ...
SQL Injection Attack through DDL query
Pushkar -
22 Sep 2005 3:50 PM - 2 messages
Hi, I am creating database taking database name as input from the user. In database name I am replacing '[' with '[[' and ']' with ']]' and passing it to my query. Query has a sort of placeholder for database name where I use this database name. ...
trying to insert unique instances of information from select
jason -
22 Sep 2005 3:42 PM - 4 messages
i'm performing a massive database transformation, so this sample might seem completely bizarre, but it is only one small part of a 5000 line operation to perform transformations. so try not to read this in the context of "regular" database design, because at this stage the design ...
SPROC - Assigning query results to variable to use in another query?
Corky -
22 Sep 2005 3:38 PM - 4 messages
I am trying to figure out how to do this, and have run into a brick wall. Any help is appreciated. Within a SPROC, I need to retrieve a value from one query, assign it to a variable and use the variable in the next query. When I try to create ...
ALTER TABLE
Angel -
22 Sep 2005 3:19 PM - 9 messages
I sometimes use the ALTER TABLe to add certain fields in my table. I need to do it programatically. I will not get into why eventhough I have access to Enterprise manager and can use that to do it that way. ...
DMO Programming
rgn -
22 Sep 2005 2:54 PM - 6 messages
Hello All, I'm learning SQL-DMO programming via VBScript and I'm new to VBScript programming as well. Would anyone know of a News Group exclusively for DMO programming ? Thanks, Gopi ...
Question about functions
Amy -
22 Sep 2005 2:54 PM - 8 messages
Hi, I need to call a function in a sql query in a stored procedure to calculate time differences between various dates. I have a function that uses a cursor to sum up the totals of these numbers, but it runs ...
seperate SPs from UFNs in INFORMATION_SCHEMA.PARAMETERS...
kevin -
22 Sep 2005 2:47 PM - 2 messages
using SQL SERVER 2K 1. using INFORMATION_SCHEMA.PARAMETERS alone, how can I definitively know a user defined function from a stored procedure. I am currently doing this ********* SELECT * FROM INFORMATION_SCHEMA.PARAMETERS P JOIN INFORMATION_SCHEMA.ROUTINES R ON(P.SPECIFIC_NAME = R.SPECIFIC_NAME) ...
Implicit conversion from string to date
lizansi -
22 Sep 2005 2:43 PM - 12 messages
Hello, I am getting the message Implicit conversion from string to date.... Please help Protected Sub btnShowDetails_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnShowDetails.Click Dim startdate As String = txtStartDate.Text ...
xp_sendmail question
mike -
22 Sep 2005 2:34 PM - 3 messages
Hello. I'm trying to design an MS Access form that will fire off an email when a combo-box is changed. I need the email to consist of a brief message as well as the results of a query. ...
Is there a way to launch QA and tell it to open a stored procedure to edit...
John 3:16 -
22 Sep 2005 2:26 PM - 2 messages
Is there a way to launch QA and tell it to open a stored procedure to edit... I know you can do this from within QA after it opens but... I have an app that I use to stay organized. ...
DISTINCT w/ character data
alto -
22 Sep 2005 2:21 PM - 3 messages
Hello, I need to eliminate duplicates from records containing a text data type. Here is the query I try : --- select NewsGroup.NewsGroupID, (distinct (cast a.TranslatedText as varchar(8000))) as NewsGroupName -- Line 10 NewsGroup.OnlineFlag ...
Connectivity?
Rick -
22 Sep 2005 2:12 PM - 3 messages
Dev Tool: VB6 Server: SQL Server 2000. Environment: Windows 2000/Windows XP/Windows 2000 Server I have changed a user connectivity from WINDOWS NT trusted connection to SQL Server Authentication. I have granted the same permissions to the new user. ...
Random Cursor Results
jhaas -
22 Sep 2005 1:42 PM - 5 messages
Hello, I have a strange problem with a cursor that runs nightly. It only happens about once a month. The cursor takes Invoice information from a source table and places the information into a destination table in Document, Detail order; ...
How to put this code in a SP?
lorenzopp -
22 Sep 2005 1:27 PM - 1 message
Hy, I've been search in all the group, but I can't find an answer to this question ... The SP Stay in a DB ... USE My_FIRST_DB IF EXISTS (SELECT name FROM sysobjects WHERE name = 'SP_My_SP' AND ...
Size of Image from Image data type
maciu -
22 Sep 2005 1:18 PM - 2 messages
Hi all, I'm not quitely sure if it's the right group to write, but it's the best, that came into my mind. I was wondering if there is a way to retrieve the image size (height and width) of the image, stored in column of Image data type in MSSQL. ...
User defined Function and output parameter
Akbar khan is a Senior Database develope -
22 Sep 2005 12:15 PM - 2 messages
Hi Can I create a User defined function with output parameter? If yes then how? Thank You, Abdul Akbar khan ...
|
|||||||||||||||||||||||