Viewing 15 posts - 4,876 through 4,890 (of 26,490 total)
You want something like this:
create table #TestData (Data varchar(5));
insert into #TestData
SELECT
Data
FROM (VALUES
(CAST('1' AS VARCHAR(5))),('11'),('2'),('A1'),('A10'),('A11'),('246'),('AB1'),
('AB10'),('100'),('256'),('B1'),('B2'),('124'),('20'),('B21'),('B31'),('32'),('68')
) d (Data);
select * from #TestData;
select cast(Data as int) from #TestData where Data not like...
July 8, 2015 at 8:55 am
Looks like I'll miss the SQLSaturday in Denver, I'll be at a U18 Girls soccer game since I am the head coach.
July 8, 2015 at 8:42 am
From your post:
-- #3 Table ------------------------------------------------------------------#3 Table
/****** Object: Table [dbo].[Orders] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Orders](
[OrderID] [Int] IDENTITY(1,1) NOT NULL,
[CustomerID] [int] NOT NULL,
[OrderNumber] [nvarchar] (50) NULL,
[OrderDate] [datetime] NULL,
CONSTRAINT [PK_Item]...
July 7, 2015 at 2:51 pm
halifaxdal (7/7/2015)
You are the only one who can tell us which is correct. We can't see your data and you really haven't told us what the expected results should look...
July 7, 2015 at 12:21 pm
halifaxdal (7/7/2015)
halifaxdal (7/7/2015)
Thank you. Of the two queries, which returns the correct result?
In some cases they give me same result, in some cases, different number. That's why I don't understand...
July 7, 2015 at 11:45 am
Nilssond (7/7/2015)
INSERT INTO ANCILLARY VALUES(CUSNO, STARTDATE, ENDDATE VALUELIST) VALUES('66655544401', 01/01/2015, NULL, 'RX0001,RX0002')
INSERT INTO ANCILLARY VALUES(CUSNO, STARTDATE, ENDDATE VALUELIST) VALUES('66655544402', 01/01/2015, NULL,...
July 7, 2015 at 11:09 am
halifaxdal (7/7/2015)
Thank you. Of the two queries, which returns the correct result?
You tell us.
Try providing us with the DDL for the table(s), sample data for the table(s), and expected results...
July 7, 2015 at 11:02 am
Still would help to know what you are trying to accomplish. We can't see what you see and don't understand the problem you are trying to solve. From...
July 7, 2015 at 10:06 am
Ranzz (7/7/2015)
the date logic is used in SQL agent t-sql code which runs @ 6AM in morning and exports a CVS file.
when the job runs at 6AM it...
July 7, 2015 at 10:01 am
Here is a framework to build on:
declare @TableName sysname,
@SQLCmd nvarchar(max);
declare TableNames insensitive cursor for
select
tab.name as TableName
from
...
July 7, 2015 at 9:02 am
Jeff Moden (7/6/2015)
jckfla (7/6/2015)
Steve Jones - SSC Editor (7/2/2015)
Lynn Pettis (7/2/2015)
Work to live, not live to work.yes
+1 and Amen
By the same token, work does allow you to live. It's...
July 7, 2015 at 8:23 am
Lynn Pettis (7/4/2015)
Jeff Moden (7/3/2015)
andrew gothard (6/26/2015)
Jeff Moden (6/25/2015)
July 4, 2015 at 3:35 pm
Jeff Moden (7/3/2015)
andrew gothard (6/26/2015)
Jeff Moden (6/25/2015)
July 4, 2015 at 3:30 pm
SQLBill (7/2/2015)
Lynn Pettis (7/2/2015)
Sean Lange (7/2/2015)
Lynn Pettis (7/2/2015)
July 2, 2015 at 3:11 pm
GilaMonster (7/2/2015)
Do you get the feeling that IT people, especially ones at the top-end of the field, are...
July 2, 2015 at 3:09 pm
Viewing 15 posts - 4,876 through 4,890 (of 26,490 total)