Viewing 15 posts - 9,646 through 9,660 (of 10,144 total)
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
August 28, 2008 at 12:54 am
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
August 28, 2008 at 12:53 am
GSquared (8/27/2008)
August 27, 2008 at 8:14 am
Andrew Peterson (8/27/2008)
August 27, 2008 at 7:29 am
Chandu (8/27/2008)
Exscellent.. Selcet * from t1 has worked.. Thanks to all for working out on the query.
Gald to be of assitsance, Chnadu!
August 27, 2008 at 7:23 am
Each BEGIN should have one corresponding END.
This is also likely to cause some problems...
SELECT distinct
...
August 27, 2008 at 7:16 am
Hi Chris, thanks for pointing this out, though I agree that the OP should do some of the work here! My solution will work where there are dupes in the...
August 27, 2008 at 6:44 am
Here is another possible solution:
[font="Courier New"]-- Create sample data
CREATE TABLE #Table ([no] INT, [name] CHAR(3))
INSERT INTO #Table ([no], [name])
SELECT 1, 'aaa' UNION ALL
SELECT 1, 'bbb' UNION ALL
SELECT 1, 'ccc' UNION...
August 27, 2008 at 5:59 am
Chandu (8/27/2008)
How do i display all the values in all 23 available columns of a table t1 when i don't know the number of rows available.
This should do the trick:
SELECT...
August 27, 2008 at 5:27 am
kumar99ms (8/27/2008)
EmployeeID Employeename Employeecode Passportcode
1 aaaa ...
August 27, 2008 at 3:43 am
[font="Courier New"]-- make some sample data
SET DATEFORMAT MDY
DROP TABLE #Temp
CREATE TABLE #Temp (FuelLogID INT, VehicleID INT, [Date] DATETIME, FuelQty INT, EndOdometer INT)
INSERT INTO #Temp (FuelLogID, VehicleID, [Date], FuelQty, EndOdometer)
SELECT 1,...
August 27, 2008 at 3:37 am
Sure Jack!
Multiply the decimal fraction by 4,
0.26 becomes 1.04
0.24 becomes 0.96
then Cast as INT to truncate
0.26 becomes 1
...
August 22, 2008 at 9:22 am
Whatever did we do without tally tables?
[font="Courier New"]DROP TABLE #ADPTimeDetail
CREATE TABLE #ADPTimeDetail (EmpID INT, [IN_Punch] DATETIME, [OUT_Punch] DATETIME, Job VARCHAR(3), [Punch_RecID] INT)
INSERT INTO #ADPTimeDetail (EmpID, [IN_Punch], [OUT_Punch], Job, [Punch_RecID])
SELECT 1,...
August 22, 2008 at 8:56 am
Good point Ryan:
[font="Courier New"]DECLARE @Delimiter VARCHAR(4)
SET @Delimiter = ':61:'
SELECT * FROM (
SELECT SUBSTRING([Message]+@Delimiter, number-LEN(@Delimiter),
LEN(@Delimiter)+CHARINDEX(@Delimiter, [Message]+@Delimiter, number) - number) AS MESSAGE
FROM Numbers, #t1
WHERE...
August 22, 2008 at 7:34 am
Using a few changes to the ever-popular uftSplitString function,
[font="Courier New"]
CREATE TABLE #t1
(
MESSAGE VARCHAR(8000)
)
INSERT INTO #t1
SELECT '
{1:F01PARBESMXFXXX0074301877}
{2:I950MLILGB4LXKSIN}
{3:{108:MMD0192030369000}}
{4:
:20:GL0710250013
:25:0000110405
:28C:00211/00001
:60F:C071024EUR778881,80
:61:0710221025DR108,84NDIVAJCD506148ES01//1AJCD506148
ES0111845014 AC.ABERTIS INFRAE
:61:0710251025CR1,31NDIVCD879992ES01//1CD879992
ES0109427734 AC. ANTENA 3
:61:0710251025CR1,31NDIVCD880006ES01//1CD880006
ES0109427734 AC. ANTENA 3
:61:0710251025CR1,31NDIVCD880008ES01//1CD880008
ES0109427734 AC. ANTENA 3
:61:0710251025CR1,31NDIVCD880025ES01//1CD880025
ES0109427734 AC. ANTENA 3
:61:0710251025CR1,31NDIVCD880029ES01//1CD880029
ES0109427734...
August 22, 2008 at 5:44 am
Viewing 15 posts - 9,646 through 9,660 (of 10,144 total)