How To Find List Of All Mondays In 2006
Jul 3, 2006I have a one problem in my sql server. I would like to find out the list of all Monday's dates in the year 2006. Can anybody help me out?.
View 14 RepliesI have a one problem in my sql server. I would like to find out the list of all Monday's dates in the year 2006. Can anybody help me out?.
View 14 Repliesin footer of my report i show a current date by this
=Format(Today(), "d")
as a result i gave those
3/21/2007
but wont date like this 03/21/2007
How ?
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[code]....
I am trying to display all records older then 5 Mondays span..so far I got this and it is working fine but it is excluding the records with Id 2 and 4 (Sundays) I would like to include these records as well.
Also , is it true that Grants to service accounts should go through roles as it is against audit & compliance standards? If yes, than how to find out the list of users who has direct grant to a service account ?
- Then how to revoke this grant from service account and than how to grant through the role ?
- Is there a script that i can run and find the list of users in each SQL server instance ?
Hi all,
I want to find the list of filenames associated with the SQL server instance programmatically. As VDI is concerned with taking backup of SQL server. Can we find the list of filenames associated with a DB using VDI ? or Is there any other way to know filenames?
Thanks in Advance,
Ram
I'm using this to find duplicates where a person has the same email but varying firstname and lastnames:
select distinct t1.booking_id, t1.first_name, t1.last_name, t1.email_add, t1.booking_status_id
from [aren1002].[BOOKING]
as t1 inner join [aren1002].[BOOKING]
as t2
on t1.last_name=t2.last_name and t1.booking_id<>t2.booking_id
where t1.booking_status_id = 330
order by last_name asc
Sample data:
3927 Greg Smith greg@emailno1.com 303
5012 John Smith greg@emailno1.com 303
6233 John Smith greg@emailno1.com 303
4880 Dulcie Abuud dulcie@theiremail.com 303
However it is listing the non duplicate rows, For example: The record with Abuud as the last name, doesn't have any duplicates in the table, so I don't want it listed.
The data should be like this:
3927 Greg Smith greg@emailno1.com 303
5012 John Smith greg@emailno1.com 303
6233 John Smith greg@emailno1.com 303
how to find the names of the tables owned by the particular user in sql server and how to display the distinct object types owned by the particular user.
View 1 Replies View Related
Hi,
I am trying to use the SQL "Contains" method and full text indexing for some search functionality in an application.
I understand that full text indexes will break data using certain word breakers which are dependent on which language the index is created with. However, I cannot seem to find a list of the what the actual word breakers are. I cannot find these online or in Books Online ... please can you let me know where I can find out more about this?
Many Thanks
Hi,
I was wondering if there was a SQL query I could run that would list all the current jobs in a SQL 2005 database? I would like to check to ensure a job exists before I call it, but was having trouble finding a way to determine if it existed.
Thanks for any advice!
-Flea#
How to find out the list of all tables and views owned by a particular user in any database by querying the system tables?Thanks.
View 2 Replies View RelatedThe views are in XYZ production database and user needs the list of indexes on the tables on which the views has been created.
query to find list of indexes on the tables on which the views has been created.
I have installed the SharePoint adapters from codeplex and they show OK in SSIS 2008R2. But in SSIS 2012, I can't find them and their is no SSIS component tab to pick it and add it to the toolbox.
View 2 Replies View RelatedGot following query:
SELECT
event_data.value('(event/data/value)[4]', 'bigint') AS cpu_time,
--database name
event_data.value('(event/data/value)[5]', 'bigint') AS duration,
--estimated cost
--estimated rows
--nest level
[code]...
Basically, is a simple T-SQL query that reads the local file for my already setup extended event sessions. But I can't find the way to retrieve the following attributes as part as the T-SQL query:
--database name
--estimated cost
--estimated rows
--nest level
--object name
I am trying to find a BOL or some MS link with the full list of possible values for event_data.value but can't find one.
Is there anyway,can we find the list of servers by querying at active directory?
View 3 Replies View RelatedNeed a script to capture current date modify table list(12 AM to 11:59 PM PST) in a database.
View 7 Replies View RelatedWe have more that 500 crystal reports and we would like to find out list of stored procedure used by crystal reports. Can we find out ?
View 4 Replies View RelatedHow to find the list of queries currently running in the Database with User Login Information.
Since my database application is running slow, to find the slow queries.
This is the result I get in Word as I handle a document that merges datafrom the database. The field «Date_Fin_Membre» returns me this resulteven if the query stipulatesWHERE (dbo.Membre.Date_Fin_Membre = CONVERT(Char(10),dbo.Membre.Date_Fin_Membre, 101)). I have also tried other types ofconversion without any success.thanks
View 6 Replies View Relatedhello
I store date like 01012006 for 01/01/2006
I store them as type varchar
and I have to use them in query (where date='01012006')
do you think I should store date as normal format as datetype?
Hi,
Does SQL 2000 support mutiple IPs in a proxy server (ISA2006) senario? i.e. can SQL 2000 serve both intranet and extranet, with extranet being separated by firewall?
Extra info: SQL 2005 can clearly listen to mutiple IPs, but SQL 2000 does not seem to have such feature.
Thanks in advance.
Kevin
Hihow to conert (number) 200611 to string 'Nov 2006' ?thanks
View 4 Replies View RelatedHas anyone else had difficulties using SQL CE with MapPoint 2006?
I had assumed that since they both 'talked' OLEDB, they should be compatible with one another.
I have approx 15,000 rows in a SQL CE Table with Lat and Long columns that I'd like to import or link with MapPoint.
I've created a .udl file with the OLEDB connection string and sdf filename like so:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=c: estsqlcompactdb estdata.sdf;
Which I can select from the MapPoint Import/Link wizard and it lets me choose a table to import.
It shows a preview of the data in the table, lets me choose column mappings, and if I'm attempting to link data it asks me to choose a column to use as the primary key.
If I attempt to import data it essentially spins forever importing row
'15588 of -1 records mapped; 0 not mapped', (ie. it cycles through all the rows that exist in the table but never completes, then only thing I can do is press 'Cancel') and if I attempt to link data I just get an error message. "Failed to link data"
My workaround for this behaviour is potentially to write small process using System.Data.SqlServerCe or ADO to import the data into MapPoint by calling the MapPoint DataSet APIs directly, but I think you ought to be able to link the data right in using the udl datalink method.
Hi,
I want to convert/write from my source to my text file: the date column.
I have a date column of : 2006-03-13 00:00:00.000
but when it writes to flat destination i only want to write: 2006-03-13
Any ideas, Please assist!
Regards
I use Delphi 2006 to connect MS SQL Express 2005. When I save record, it shows the following error message:
Database Server Error : Cannot create new transaction because capacity was exceeded.
Does anyone know what happen and how to solve?
Thanks!
I have Windows XP Home Edition SP2 English Version. I installed MS SQL Server 2005 Developer Edition and after reboot I Installed SP 1. Now I try to install SP2 CTP November 2006. In Installation Progress dialog when Setup Support Files are in progress I get an error message - Unexpected Error Occured Unable to create backup folder and show me second message box with error Hotfix.exe has encountered a problem and needs to close.
Regards
Maciek
my Current DateTime Format is 01/08/2006 9:15:00 AM
i want to set it to 01/Aug/2006 9:15:00 AM
what parameter will be pass in "SET DATEFORMAT"?
plz help and give me a chance of thanks.
i have a table full of cars, from many makes and years (along with other info).
but I DONT want 2005 Ferrari's, or 2006 Ferrari's.
tried making a SQL statement, but it seems to filter out ALL ferrari's.
Here is the SQL i've tried:
SQL Code:
Original
- SQL Code
--SQL Stm #1
select COUNT(*)
from items
where account_id in (1667) and
items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND
( (items.Make != 'Ferrari' AND items.Year != '2005')
OR (items.Make != 'Ferrari' AND items.Year != '2006') )
--SQL Stm #1
SELECT COUNT(*) from items
where account_id=1667 AND
items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND
(items.make!='ferrari' and (items.year!=2005 OR items.year!=2006))
--SQL Stm #1SELECT COUNT(*) FROM items WHERE account_id IN (1667) AND items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND ( (items.Make != 'Ferrari' AND items.Year != '2005') OR (items.Make != 'Ferrari' AND items.Year != '2006') ) --SQL Stm #1SELECT COUNT(*) FROM items WHERE account_id=1667 AND items.ad_status IN (3,4) AND items.vehicle_type = 'passenger' AND(items.make!='ferrari' AND (items.year!=2005 OR items.year!=2006))
both takes out all ferrari's ?
I have been trying literally for months to get SQL Server 2005 Express to work on my Dell Dimension WinXPPro machine. I have installed and reinstalled both the server and the 'Management System'. I have shut down and restarted all of the related Local Component Services on my machine (with the exception of the SQL Server Active Directory Helper which will not start ??).
I have reviewed much of what is in this Forum related to SQL Server 2005 Express and I find that many have had similar problems. When a connection is attempted, the following message or some minor variation appears:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
In desparation, and at the suggestion of one of this forum's moderators, I went to try to download the SQL Server 2005 Express, Service Pack 2. I threaded my way through what I felt was an unecessarily complex set of links and finally reached a download site - but it was unclear whether or not the service pack was for SQL Server 2005 or the Express version. Giving up in dispair, it turn to you (once again BTW, I received no real help with this same question about a month ago).
Even though I seriously doubt if anyone will help me, I am willing to give it another try - mainly because I am home sick with the flu and having nothing better to do on a Sunday afternoon.
Thanks
Hello ...
Using Ent. Library Jan. 2006 release and .Net Framework 2.0, I'm connecting to SQL Server 2000 using Microsoft.Practices.EnterpriseLibrary.Data.Sql.
I have a windows service that processes jobs asynchronously and from time to time, I'm getting the following error --
"A connection was successfully established with the server, but then an error occurred during the pre-login handshake. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (TCP Provider error: 0 - An existing connection was forcibly closed by the remote host. "
What's surprising is the error message saying SQL Server 2005. Has anyone encountered and resolved this?
Thanks.
allanroy
in the class library i written the code name :customer is the lib name
using System;
using System.Collections.Generic;
using System.Text;
namespace Customer
{ class Entites
{
public int inTest;
public int inTest2;
}
}
Now in the Class1.cs i written the code
i am getting the data from the database by using enterprise lib 2006 connection function
now HOW TO BIND THE DATA TO LIST AND RETURN TYPE IS LIST
PLEASE CHECK THE CODE AND REDEFINE THE CODE
using System;
using System.Data ;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using System.Collections;
using System.Xml.Serialization;
using System.Data.Common;
using Customer;
namespace Customer
{
class Class1
{
public List<Entites> getdata(int id)
{
Database db = DatabaseFactory.CreateDatabase("mycon");
System.Data.Common.DbCommand cmd ;
cmd = db.GetStoredProcCommand("GET_CUSTOMER");
cmd.CommandType = CommandType.StoredProcedure;
db.AddInParameter(cmd,"@CID",System.Data.DbType.Int32,id);
List<Entites> objEntites = new List<Entites>();
using (IDataReader dr = db.ExecuteReader(cmd))
foreach (Entites obj in dr)
{
objEntites.inTest = obj.inTest;-----------------------------------------------ERROR LINE
// objEntites.Add(obj);
}
return objEntites;
}
}
}
Error 2 foreach statement cannot operate on variables of type 'System.Data.IDataReader' because 'System.Data.IDataReader' does not contain a public definition for 'GetEnumerator' D:KOTI_PRJSEnterpriseCustomerClass1.cs 34 13 Customer
I'm happyguy and this is the first time to post my problem. Thanks a lot
here is a SQL query that I know how to write in Oracle, which is
Select * from AttandanceRecord where date like '%__/Apr/2006%'
but, now i'm developing my system with using Ms Sql Server 2000, so I don't know how to write a query with same output as above...
Please, can somebody help me??
Edit : spam removed...comments remain
warning
this not advertising or spam. It file I want share you. sorry if , you think it disturbs ,
well this is a strange one.
i have a sql 2005 server express running on a pc. it has an xp embedded database on it.
i can connect to it from one pc using component database manager.
however, if i try this from another pc it fails with the following code
2006-09-13 15:24:18.07 Logon Error: 18456, Severity: 14, State: 16.
2006-09-13 15:24:18.07 Logon Login failed for user 'HOSTNAMEGuest'. [CLIENT: XX.XX.XX.XX]
.
i have simple file sharing turned of on the remote pc that fails to connect.
what is my problem.