|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
SQL Query Help
B. Mark McKinney -
22 Oct 2005 11:46 PM - 2 messages
Using the following as sample data: Create Table #Work ( GroupId int, ProductId int, Qty int) INSERT #Work VALUES(6, 1, 25) INSERT #Work VALUES(6, 1, 40) INSERT #Work VALUES(6, 1, 50) INSERT #Work VALUES(7, 2, 10) INSERT #Work VALUES(7, 2, 20) ...
Check for Duplicate values in Access
Fraser -
22 Oct 2005 9:07 PM - 6 messages
Hi, I'm creating a database that needs to check a value in a text field = = called JobCreate in a form called frmJobCreated against a table called = tblJobCreated which has a whole list of job numbers in a field called = ...
Help - using sp_executesql with dynamic query...dynamic parameters??
Lisa Forde -
22 Oct 2005 1:42 PM - 3 messages
Hi. I'm attempting to write a Stored Procedure that creates an SELECT statement. Belwo is an example of what I am tryign except that my actually query have many more parameters most of which can be eliminated. @sQUERy NVarchar(2000), ...
XMLA Sample Application
BI-Solutions -
22 Oct 2005 10:44 AM - 2 messages
Hi, Anybody tells me about sample application of XMLA. Regards, Stephen ...
Schema RowSets
BI-Solutions -
22 Oct 2005 10:34 AM - 4 messages
Hi, Sample Application of Schema RowSets. Regards, Stephen ...
Finding Correct Primary Key
Erdal Akbulut -
22 Oct 2005 10:15 AM - 7 messages
Hello, I could not reach a conclusion on this. Maybe someone helps me to understand better. I have a consolidated text extract from other systems and want to upload the data to an SQL table. Below is the fields in extract. ...
Performance Problem
ramnadh nalluri -
22 Oct 2005 10:01 AM - 16 messages
Hi, I am having a table which consists of 8 lakh records in it. I have removed 5 lakh rows from the table which are unused. Before removing the rows the pages are 8943 and after deleting the 5 ...
Backups doubling and halfing in size
hals_left -
22 Oct 2005 8:48 AM - 3 messages
This is probably something really obvious, but can someone tell me whats going on. I do daily full backups of a database to zip and looking at the sizes, they are growing at the normal rate but every other day halfing: ...
Prevent Double login
manK -
22 Oct 2005 8:21 AM - 6 messages
Hi Everybody Assume a user (A) opens my application on one computer and moves to another computer and opens the same application with the same user name (A). This will result in the user login in twice. Is there any of preventing this from happening when using MS SQL Server? ...
Parser to Convert User Search to Full Text
Will -
22 Oct 2005 6:57 AM - 2 messages
Is there a parser with source code available that would allow a user to enter a Google-like syntax for searches and then translate that to SQL Server full text search syntax? I'm not too picky about the language ...
CASE statement in dynamic query
Dan Slaby -
22 Oct 2005 4:52 AM - 2 messages
This query runs ok: SELECT Mission FROM tblProviders WHERE ProviderID = 'rnpo' When I pass the @providerID and @WhichOne values dynamically to this stored procedure: DECLARE @ProviderID varchar(15) SET @ProviderID = 'rnpo' DECLARE @WhichOne int SET @WhichOne = 1 DECLARE @QRY varchar(150) ...
Adding column problem
Karolus -
22 Oct 2005 2:12 AM - 3 messages
I consulted the SQL2K help for adding a table and copied the code and substituted my own variables, but I get an error message about incorrect syntax regarding the AS in line 1. I'm a newbie and am bummed that the code ...
Inserting records and running a stored procedure at the same time?
Kim Noer -
22 Oct 2005 1:36 AM - 13 messages
Hi there.. The target table got these two 'must be set columns', one called DATASET, and one called LXBENUMMER. Now, when I want to insert data into this target table I need to fill those two columns with the new records I'm inserting. DATASET is easy as it'll always be a ...
Internal SQL Server error
rdjabarov -
21 Oct 2005 11:02 PM - 13 messages
Running the script below will result in this error in SQL2K SP4 environment: create view dbo.vw_INTERNAL_ERROR as select top 100 percent * from (select top 100 percent [DateField]=getdate() order by 1) x1 go if exists (select 1 from dbo.vw_INTERNAL_ERROR) ...
Time only values
MurrayTh -
21 Oct 2005 9:53 PM - 5 messages
I have a table with time values in one field. The field is datetime data type with no date entered. During some processing, I want to offset the time in the schedule by a number of minutes, but keep the date value part "empty", ...
Date time trouble in JTDS.
tutm -
21 Oct 2005 9:36 PM - 3 messages
Hi all, I have data in the table myTable like following: myTable_oid, myTable_Time 1, 2005-10-21 10:58:34.531 ...
How to quickly create and populate a table 1GB?
MittyKom -
21 Oct 2005 8:57 PM - 5 messages
Hi All How do i create a table which is as big as 1GB? I have tried some thing below, but it it taking too long. Is there any quick way to do it? Here is my sample i have tried and it's taking too long: ...
@@ERROR Handling
Mark -
21 Oct 2005 8:40 PM - 8 messages
To All Gurus: I am trying to log some information to another table when @@Error returns an error. Below is the sample code to see how @@error works. In this sample code, I am purposely failing INSERT INTO TEST command and want to log ...
HELP Cant get connection to my server with SQLDMO
SteveM -
21 Oct 2005 8:22 PM - 3 messages
I am trying to learn SQLDMO for working with our SQL Server 2000 servers. I grabbed a demo program from: [link] called SQLDMO for C# from Kevin Goss I built the program successfully in VS 2003 ...
Trigger Problem
Ed Dror -
21 Oct 2005 7:58 PM - 2 messages
Hi there, I'm using MS SQL Server 2000 on Server 2003 One table emp and one empArchive I wanted every time that one record in the emp table will be inserted updated or deleted. Same thing will happend in the empArchive table. ...
Slpitting a string
Asher_N -
21 Oct 2005 7:02 PM - 4 messages
I have a badly designed legacy database. The product number column has the format 'xxx -yyy', where x is the style and y is the colour. Both style and colour have a variable length. They are always separated by 3 blamks ...
How to alter DBCC INPUTBUFFER text output
Chris -
21 Oct 2005 6:57 PM - 3 messages
DBCC INPUTBUFFER(12) - This command returns what spid #12 is doing. (1 row(s) affected) DBCC execution completed. If DBCC printed error messages, contact your system administrator. I am 99% confident the output above "DBCC execution completed..." is choking my VB.NET client on the objDataAdapter.Fill method... ...
DateTime - overlaping Timespans
mathiasfritsch -
21 Oct 2005 6:54 PM - 5 messages
Hi, I have a Table with reservations for Northwind Products: ReservationID ProductID StartDate EndDate Quantity I need to tell how much Reservations are still possible in a given TimeFrame. Is this possible without Cursor? Here is a sample: ID StartDate EndDate Quantity ...
COM+ Applications hanging
Eric Margheim -
21 Oct 2005 6:34 PM - 11 messages
I have two ATL Dlls that have multiple interfaces and run under two COM+ Applications. Each DLL accesses SQL Server db via ADO calls and one of the components also interacts with a 3rd party report server system. ...
How to determine last "monthversary" date of an account?
White Echo -
21 Oct 2005 5:17 PM - 9 messages
I work on a project where advertisers on a classifieds Web site have the possibility to place a certain number of ads per month. The difficulty comes from the fact that a month period starts at each "monthversary", meaning that if somebody created his account on June 15, I ...
Newbie : Hard sql query?
Sparticus -
21 Oct 2005 5:04 PM - 7 messages
Hey, I have a table that records all my bank transactions. So in it there is one entry per transaction. This entry has the date the transaction occured. All I want to do is perform a query that returns how many transactions ...
Error validating check constraint
Chris -
21 Oct 2005 4:57 PM - 3 messages
I am using Enterprise Manager to create a relationship between two tables (Bookings and BookingTypes). The relationship on column BookingTypeSerialNo (int) in both tables with no cascading actions. BookingTypes contains a column called OfficeCopies which is a tinyint. I've created a check ...
REPLACE query help plz!
Test Test -
21 Oct 2005 4:38 PM - 6 messages
Hello! I am posting this problem again. I have gotten somebody's help with the right solution but I have one more case to work on. I would appreciate your time and help on this. create table #temp (ID int, Cust varchar(80)) ...
Zero Truncated
docsql -
21 Oct 2005 4:30 PM - 2 messages
We have a float (length = 8) field in the table. We want to store values out ot 4 decimal places. In some cases, where a value ended in 0 or 00, the places are probably truncated (e.g., 38.9560 = 38.956 or 38.6500 = 38.65). I ...
Dates from multiple fields
Blasting Cap -
21 Oct 2005 3:35 PM - 3 messages
I have fields that are listed as nvarchar in a table. Field1 contains the month, Field2 contains the day, Field3 contains the year. I need to pick stuff off this table with a "date" >= 12/10/2004. How do you construct the "date" from the 3 fields above? ...
Automate Admin Activities
Tarek -
21 Oct 2005 3:13 PM - 4 messages
Hi, I want to automate some administrative activities (Check Integrity, Shrink DB Log Space after backup, rebuild indexes...). I'm using Database Maintenance Plan, is this ok? After I run these jobs, in the job history and in the log generated I just ...
Who Added Indexing to Table?
Colette -
21 Oct 2005 3:02 PM - 18 messages
Is there a script to query a table that will tell me the user that added the Indexing or the user that changed on table on a specific date? It appears to me this is not an option in SQL 2000. ...
Add composite primary key
Rick Charnes -
21 Oct 2005 2:52 PM - 4 messages
I'm a bit unclear on the syntax to add a composite (multiple columns) primary key to a table. The columns already exist. Thanks. ...
Retrieval of IDENTITY after "bulk" insert?
lmcphee -
21 Oct 2005 2:44 PM - 5 messages
I will be inserting large numbers of records into a table with an Identity column. I need the Identity value back to use for subsequent inserts to other tables which link to 1st table on the ID. I can insert to "parent" table one-by-one, retrieving the ID each time. ...
Full-text Catalog
bob -
21 Oct 2005 2:39 PM - 3 messages
I am have an application that uses a full-text catalog for word searching. I need to dsitribute this application so is there a way to distribute the full-text catalog with a script like I do for the database, sp's and ...
Database Design
max -
21 Oct 2005 2:32 PM - 2 messages
Hello, I am not so experienced in database design and in my job now I have to design a database for publications. The problem is the design should be worked out as soon as possible.:( The publication database should contain the ...
sql weird
Jose G. de Jesus Jr MCP, MCDBA -
21 Oct 2005 2:02 PM - 14 messages
create proc SQLweird as select * into #temp from employees exec('select * into #temp from employees') select * from #temp where is the result of or how can i access the result of the exec() statement ...
ETL Tools for EDI to DB Import
Joseph George -
21 Oct 2005 2:01 PM - 4 messages
Hello, We're trying to come up with a solution for loading large EDI (X12) batch files into a SQL Server 2005 system. We tried using Altova Mapforce which now has a code generation feature which can be compiled and run, but it does not seem to scale well for ...
Current Date Format
Madhivanan -
21 Oct 2005 1:49 PM - 3 messages
How do I know the current Date Format of the Database? Madhivanan ...
ETL Tools for EDI to DB Import
Joseph George -
21 Oct 2005 1:45 PM - 2 messages
Hello, We're trying to come up with a solution for loading large EDI (X12) batch files into a SQL Server 2005 system. We tried using Altova Mapforce which now has a code generation feature which can be compiled and run, but it does not seem to scale well for ...
Primary Key Foreign Key Tables
thomson -
21 Oct 2005 1:41 PM - 4 messages
Hi All, i do have two table a Master and a Detail which has a primary key on the Master Table and Foreign key on the Detail Table How do i insist that when ever there is a entry in the Master table ...
Move a table from filegroup??
Tarek -
21 Oct 2005 1:35 PM - 4 messages
Hi, I created a table in a wrong filegroup. Is it possible to move it to another filegroup? If yes how? Do I need to drop the table and create it in the new filegroup or this can be done online (like oracle's alter table t move ....). ...
Sort Warnings / Multi Pass Sort
parasada -
21 Oct 2005 12:12 PM - 2 messages
I traced my app for some perf related issues and found that a proc is giving Sort warnings (EventClass) and Multi Pass Sort (EventSubClass). Where in the query should I start looking into the problem? when do we get these warnings ...
Trigger to capture the new record only
MartinTeefy -
21 Oct 2005 11:58 AM - 3 messages
Hi, I want to write the second field from customer table (cm_name) to another table to act as a lookup. This table LICENCINGLOOKUP has two columns (LookupType,LookupValue) For this insertion the first is set to 'CUSTOMER' but it appears all records ...
ADOMD.NET Sample
BI-Solutions -
21 Oct 2005 11:37 AM - 2 messages
Hi, Anybody tells me about any sample application available for ADOMD.NET. Regards Stephen ...
please solve timeout error
raghu veer -
21 Oct 2005 11:14 AM - 4 messages
i am facing timeout error problem on my server using dot net applications how to solve this will no lock option causes this ...
SQL Query
savvaschr -
21 Oct 2005 9:09 AM - 2 messages
Well Actually I have this situation I have a table with AccCode, AccMovement, AccYear, and AccPeriod and my data looks like this AccCode AccYear AccPeriod movement 110401 1998 02 541870.00 ...
NOLOCK
Lara -
21 Oct 2005 9:08 AM - 9 messages
Hi can any one tell me about the use of NOLOCK. Whrere can we use it and where dont ? pros and cons of the above ? rgards lara ...
Creating multiple Stored procedure on SQL Server through ADO
Pushkar -
21 Oct 2005 9:05 AM - 4 messages
Hi, I want to create a set of procedures through my application on SQL Server, through ADO. My Scipts is something of the form: Use DB1 Go create procedure <procedurename> as < procedure text> Go Create Procedure <procedurename> ...
Getting ASP.NET 2.0 user name in Sql Server 2005 trigger
Mike Kelly -
21 Oct 2005 9:04 AM - 4 messages
Hi. I'm using ASP.NET Membership and Role Management (Forms authentication) to secure my web application (accessible to a restricted user base via the Internet). This is such a great feature of ASP.NET 2.0. My app accesses data ...
multiple distinct and time...
Petr SIMUNEK -
21 Oct 2005 8:59 AM - 2 messages
Here comes the table: Id_Prices | Shop | Product | Price | tStamp -------------------------------------------------------------------------------------- 1 eMall Pen 10 20.5.2005 ...
T-SQL...How to set column collation to database default?
throat.wobbler.mangrove -
21 Oct 2005 8:59 AM - 3 messages
Hi, Does anyone know the T-SQL code I need to set the collation of a column to the database default? Following books online, I have tried: ALTER <TABLENAME> ALTER <COLUMNNAME> COLLATE DEFAULT GO but this doesn't seem to be correct. I'd be grateful for any ...
Aggregate Functions - and no records
Rebecca York -
21 Oct 2005 8:41 AM - 3 messages
Is the following statement documented/supported? I can't find it documented in BOL the results for Aggregate functions when there is no input data. If a Aggregate function gets 0 records input, it returns null. eg. SELECT MAX( Field ) AS ReturnsNull ...
NEED HELP ABOUT CURSOR
savvaschr -
21 Oct 2005 7:55 AM - 5 messages
Hello, I have this Store Procedure and i am new in "Cursor" programming The store Procedure is this CREATE PROCEDURE Testing_Cursor AS DECLARE @AccCode varchar(12) DECLARE @YEAR varchar(4) Declare CODE CURSOR FOR SELECT DISTINCT(NLAcc_Code) FROM NLMovement_TMP OPEN CODE ...
NEED HELP ABOUT CURSOR
savvaschr -
21 Oct 2005 7:55 AM - 1 message
Hello, I have this Store Procedure and i am new in "Cursor" programming The store Procedure is this CREATE PROCEDURE Testing_Cursor AS DECLARE @AccCode varchar(12) DECLARE @YEAR varchar(4) Declare CODE CURSOR FOR SELECT DISTINCT(NLAcc_Code) FROM NLMovement_TMP OPEN CODE ...
What is wrong with this SQL statement
Steen Persson (DK) -
21 Oct 2005 7:46 AM - 3 messages
Hi When I run the query below in QA, it works fine and gives me some results. When I try to run the same query in Microsoft Query from an Excel sheet, it fails. I get the error "No column was specified for ...
info about sysprocesses
Enric -
21 Oct 2005 7:37 AM - 2 messages
Dear all, I want to know all the possible values for the status field bring up for sysprocesses table. Values such 'running' or 'sleeping' seems very evident but there is one so-called 'DEF-WK...' or something like that which ...
OLE DB error
Squirrel -
21 Oct 2005 7:34 AM - 3 messages
I have a stored procedure that consists 4 set of statements (delete rows and then insert rows from excel files with openrowset). It returns error when execute the 4th insert statement. The error message is: OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. ...
multiple distinct and time...
Petr SIMUNEK -
21 Oct 2005 6:30 AM - 4 messages
Here comes the table: Id_Prices | Shop | Product | Price | tStamp -------------------------------------------------------------------------------------- 1 eMall Pen 10 20.5.2005 ...
Memory Usage
Reggie -
21 Oct 2005 6:23 AM - 5 messages
Hi and TIA! Problem I'm having is after or during when I work in SQL EM designing views/sp/tables etc and I close down EM and I then start noticing a degraded performance on my computer. I view task manager and notice that ...
Newbie - Student - Help
Deanna Cusic -
21 Oct 2005 6:22 AM - 6 messages
I am working on an assignment that was due at midnight. The question is using the "Northwind database write the following SQL statements to be executed against on of the tables within the "Northwind database" a.) Alter a table and add a column ...
Bulk Insert from Excel file
bill_morgan -
21 Oct 2005 2:42 AM - 4 messages
Hi ... Having trouble getting Bulk Insert to work with .xls file. Following code works fine for text file: BULK INSERT MyTable FROM 'C:\bulkinsert.txt' with (fieldterminator ='\t', datafiletype ='char') Anybody know what changes I need to make to above code so it works for Excel ...
Add Permission Stored Procedure!
Adam Knight -
21 Oct 2005 1:25 AM - 3 messages
Hi all, Just wondering, is their a system stored procedure i can use to grant permission to all objects in a specified db to a specified user ? Cheers, Adam ...
Return Results Horizontally
David -
21 Oct 2005 12:47 AM - 5 messages
All I have a table as illustrated with the DDL below and I would like to group the records and return the results horizontally as per the desired results below. Any assistance would be appreciated. Thanks CREATE TABLE colours ...
Update Query
JoseM -
21 Oct 2005 12:07 AM - 5 messages
Please help! I want to run an update query to match the service price (serprice) of a specified service code ("1") from another ("2") in the same table. Here is a sample that doesn't work. UPDATE t1 ; SET t1.serprice = t2.serprice ; ...
SQL Agent Mail Issue
Andre -
20 Oct 2005 11:25 PM - 3 messages
I am trying to setup my Agent mail. When I go to the properties of SQL Agent the mail profile is grayed out completely. I have looked around but cant find the answer. If anyone can shed some light I would greatly appreciate ...
Edit data with Query Analyzer
Rick Charnes -
20 Oct 2005 10:51 PM - 8 messages
Is there any way I can use Query Analyzer to edit data in a table via a graphic grid, i.e. actually changing individual values in cells? Using SQL statements is too cumbersome for my purpose; I need to have more ...
Export?
Adam Knight -
20 Oct 2005 10:39 PM - 3 messages
Hi all, I am needing to export the data contained in my database as series of sql insert statements? How do i do this in SQL Server? Cheers, Adam ...
Output query to email
J1C -
20 Oct 2005 9:57 PM - 7 messages
How could I email the output results of a query to an HTML table? ...
Nested join
xauxi@yahoo.com -
20 Oct 2005 9:56 PM - 4 messages
ID IAParent Entry Level 110 95 Request [NULL] 4 111 95 Install [NULL] 4 ...
compare mdf for success restore of data and file storage
Ram -
20 Oct 2005 9:48 PM - 6 messages
Gurus, I have a scenario where in if i restore a database file(mdf) onto say some AppManager,i want to make sure its restored properly comparing with the mdf that it came from(i take this as base).i hope iam making sense here. ...
Grouping... and grouping... and grouping...
David Lozzi -
20 Oct 2005 9:34 PM - 6 messages
Hello, I have a table with about 30 fields in it. I am returning to asp.net a distinct selection of class. From there, I also need to provide a count of 2 other field specific values, count of males and females and count of race. ...
Linked Server Query
vibs -
20 Oct 2005 9:04 PM - 3 messages
When I execute the SQL Statement in the SQL Query Analyzer, I get the results returned in 4 seconds but when I use the same query from a stored procedure and execute it from SQL Analyzer, it is taking too long about 50-55 seconds. ...
Linking Microsft Access in Sql
bob at zachys -
20 Oct 2005 8:41 PM - 2 messages
Is it possible to link a Microsft Access table in Sql? What I am hoping to do is to update an Access table using a DTS package. I need to join a SQL table and a Access table and use the results to update anouther Access table. Is ...
Last 10 minutes
J1C -
20 Oct 2005 8:26 PM - 6 messages
How could I return all records in the last that were entered in a single table in the last 10 minutes? One of the columns is datetime ... ...
Ordering a heap
Raul -
20 Oct 2005 8:01 PM - 9 messages
I have created and populated a table with no indexes and would like to order the data prior to creating an index. I realize I can use "order by" in my queries to get my output the way I want it, but I was wondering if: ...
3 questions
Art -
20 Oct 2005 7:30 PM - 7 messages
Hi -- I'm new to SQL and thus also new to SQL Server. I'm working on a project that has data stored in 4 databases. I want to create a 5th database for my work. I will need to retrieve data from those ...
Question about subquries and logic
mindjuju -
20 Oct 2005 7:21 PM - 4 messages
i'm trying to create a sql statement that will feed a report. it will pull from 3 tables. to get the exact data i need, 1 of the tables i'm pulling data from is hit 3 times. ...
INSERT table (column1, column2) (@variable, '100')
tom -
20 Oct 2005 6:47 PM - 16 messages
Generally, you can't use a variable in this way, correct? INSERT table (column1, column2) VALUES (@variable, '100') Do I need to be learning about stored procedures to make something like this work? Do I need to restructure the insert statement? ...
Hello World for Service Broker doesnt work
Bob Zigon -
20 Oct 2005 5:59 PM - 2 messages
Gang I am running the Sept CTP of SQL 2005 on Windows 2000 Server with SP4. When I run the setup and send scripts for Hello World for the Service Broker ... it works just fine when the db is AdventureWorks. ...
Fix Replace function plz!
Test Test -
20 Oct 2005 5:34 PM - 8 messages
Hello! I need to replace a string which starts from "DBX:" and ends to "Addr1:" with a word "APPLE". The cloumn is Name in #temp table. I am captuting it correctly but not using the replace function the right way. It is ...
Simple JOIN turned ugly - Help!
Michael Strange -
20 Oct 2005 5:21 PM - 10 messages
All: Thanks in advance for any insight. I got turned on to associative ("bridge?") tables by an MCAD friend, but he hasn't had the time lately to show me how to really utilize them. This is my first post, and I'm relatively new to MSSQL, so I hope I'm ...
Check Foreign Key integrity of existing data
ESPNSTI -
20 Oct 2005 5:15 PM - 4 messages
Hi, I'm in the process of writing a script that inserts or updates default data for a database. I came to the conclusion that I have to temporarily disable certain foreign keys. At the end of the script however, I'd like to check existing data to verify ...
invalid character value on 7000th record
naomi -
20 Oct 2005 4:54 PM - 2 messages
Our developers are trying to pinpoint why a function keeps bombing out (email below). The database was created using the same setup as other dbs, none of which have had this problem. I ran a trace, which showed ...
Get AD Data via Sequel
Bahman -
20 Oct 2005 4:29 PM - 2 messages
Hello! Sorry if duplicate question: Is there a way to get data from the AD via the sequel? I would want things like 'name' and 'email' and 'phone'. Off the topic of the fourm but: If not through sequel, how do I set up a ...
Is the SQL Server Service Running?
Guadala Harry -
20 Oct 2005 3:53 PM - 11 messages
Can Enterprise Manager tell us *definitively* if the SQL Server service is running/started on a particular SQL Server (where the SQL Server is not the local machine on which EM is running)? What is the most reliable way to determine if the SQL Server service is in ...
Problem with GROUP BY/COMPUTE : error message 8120
Laurent CLAUDEL -
20 Oct 2005 3:42 PM - 5 messages
Hi, I have this query ( it is Ok with Sybase SQLServer) select 'Voie'=NVOI,'Mois'=datepart(mm,DPSTVOI) ,'Année'=datepart(yy,DPSTVOI),'Période'=CPST,'Nombre'=count(NVOI) from HREH3M group by CPST,NVOI,datepart(yy,DPSTVOI),datepart(mm,DPSTVOI) ...
space(0) and replace('123-45', '-', '')
loop -
20 Oct 2005 3:34 PM - 8 messages
Hi all. If anyone can help me please do. What should the following query return. I am getting different results from different servers. replace ('123-45', '-', '') Sometimes I get '123 45'. Othertimes I get '12345'. ...
Simple Query
kiran -
20 Oct 2005 3:07 PM - 8 messages
Hi, This looks simple but I couldn't get it right For eg. Table1 has 1 ABC 2 DEF 3 GHI Table2 has 2 DEF I need the result as(basically all the records of table1 and the matching record of table2 must be at the top) ...
Deleting Indexes
JD -
20 Oct 2005 2:59 PM - 4 messages
Is there a way to delete the indexes on all the tables for a specific database in SQL Server using Query Analyzer without knowing the exact name of the Index? I am able to do this using SQLDMO, but I need to know if there is ...
Grouping,Paging Logic
xslspy -
20 Oct 2005 2:28 PM - 19 messages
Can any one give me the optimized Paging and Grouping Logic in SQL Server, my Grouping shoul like the below.... Group By Filed Name = Group By Filed Value Group count: 2 --------------------------------------------------------------- Row ----------- 1 ...
Returning customised strings in a column
Christopher Carlander -
20 Oct 2005 12:58 PM - 5 messages
Hi, I'm fairly new to SQL Server, but have at least basic knowledge of SQL (as language). Building a web application I normally process retrieved data directly in code, but after having read about and begun to realize the power ...
Problem -- not using current login to search for owner of tables
orwellnelson -
20 Oct 2005 12:34 PM - 5 messages
I'm having a problem with SQL Server 2000. I have created a user called "abc". I created a slew of tables, procs, etc. When I look in Enterprise Manager, I see they are all owned by "abc". ...
Database backup
vanitha -
20 Oct 2005 12:08 PM - 5 messages
hi, I took backup of the database and restored in some other location say mirror database. In the mirror database, I add some constraints by eliminating duplicates and foreign key constraints. In the meantime some data would have been updated or inserted inside the ...
sql server agent job failing on an error I am handling in code
Kevin S -
20 Oct 2005 11:35 AM - 4 messages
I have a sqlserver agent job which simply executes a procedure to load data from intermediate tables to corresponding application tables. Withing the procedure, I am handling errors so I can log which records are causing problems, while continuing processing so any subsequent correct ...
using .NET with a view
Yaniv -
20 Oct 2005 11:09 AM - 7 messages
Hi, I have a C# code that selects from a base table OK, but when selecting from a view referencing the base table I receive an exp stating 'Invalid object name <view_name>' (where view_name is the corrcet name of my existing view). ...
Problem after clustering an index.
Harshad Phadnis -
20 Oct 2005 11:07 AM - 3 messages
Hi, After reading yesterday's mail by Tibor, I clustered all the indexes(on primary key) of all the tables in my database. Then I ran my application which uses this database. It generated some errors & when I ...
Fill up missing months.
maciek -
20 Oct 2005 10:58 AM - 7 messages
Hi, I've got this resultset: year month group value 2005 5 a 10 2005 6 a 20 ...
sORTING ACROSS MULTIPLE COLUMN
weichung [MCSD, MCDBA] -
20 Oct 2005 10:49 AM - 14 messages
I have a sample table like the following way: Col1 col2 Col3 ------------------------ 3 4 6 7 4 7 ...
how would you apply MSF to database moddeling
Jose G. de Jesus Jr MCP, MCDBA -
20 Oct 2005 10:23 AM - 2 messages
hi all How would you apply MSF and UML to database modeling. ...
DELETE all records within 2 tables for each user based on unique identifier with one DELETE statemen
Next »
|
|||||||||||||||||||||||